OpenCores
URL https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk

Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc

[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [src_processor/] [aeMB/] [verilog/] [src/] [aeMB2_mult.v] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 alirezamon
/* $Id: aeMB2_mult.v,v 1.5 2008-04-28 08:15:25 sybreon Exp $
2
**
3
** AEMB2 EDK 6.2 COMPATIBLE CORE
4
** Copyright (C) 2004-2008 Shawn Tan <shawn.tan@aeste.net>
5
**
6
** This file is part of AEMB.
7
**
8
** AEMB is free software: you can redistribute it and/or modify it
9
** under the terms of the GNU Lesser General Public License as
10
** published by the Free Software Foundation, either version 3 of the
11
** License, or (at your option) any later version.
12
**
13
** AEMB is distributed in the hope that it will be useful, but WITHOUT
14
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
** or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
16
** Public License for more details.
17
**
18
** You should have received a copy of the GNU Lesser General Public
19
** License along with AEMB. If not, see <http:**www.gnu.org/licenses/>.
20
*/
21
/**
22
 * Two Cycle Multiplier Unit
23
 * @file aeMB2_mult.v
24
 
25
 * This implements a 2 cycle multipler to increase clock speed. The
26
   multiplier architecture is left to the synthesis tool. Modify this
27
   to instantiate specific multipliers.
28
 
29
 */
30
 
31
// 30 LUTS @ 20 MHZ
32
`timescale  1ns/1ps
33
module aeMB2_mult (/*AUTOARG*/
34
   // Outputs
35
   mul_mx,
36
   // Inputs
37
   opa_of, opb_of, opc_of, gclk, grst, dena, gpha
38
   );
39
   parameter AEMB_MUL = 1; ///< implement multiplier  
40
 
41
   output [31:0] mul_mx;
42
 
43
   input [31:0]  opa_of;
44
   input [31:0]  opb_of;
45
   input [5:0]    opc_of;
46
 
47
   // SYS signals
48
   input         gclk,
49
                 grst,
50
                 dena,
51
                 gpha;
52
 
53
   /*AUTOREG*/
54
 
55
   reg [31:0]     rOPA, rOPB;
56
   reg [31:0]     rMUL0,
57
                 rMUL1;
58
 
59
   always @(posedge gclk)
60
     if (grst) begin
61
        /*AUTORESET*/
62
        // Beginning of autoreset for uninitialized flops
63
        rMUL0 <= 32'h0;
64
        rMUL1 <= 32'h0;
65
        rOPA <= 32'h0;
66
        rOPB <= 32'h0;
67
        // End of automatics
68
     end else if (dena) begin
69
        //rMUL1 <= #1 rMUL0;
70
        rMUL1 <= #1 rMUL0; //rOPA * rOPB;       
71
        rMUL0 <= #1 (opa_of * opb_of);
72
        rOPA <= #1 opa_of;
73
        rOPB <= #1 opb_of;
74
     end
75
 
76
   assign        mul_mx = (AEMB_MUL[0]) ? rMUL1 : 32'hX;
77
 
78
endmodule // aeMB2_mult
79
 
80
/*
81
 $Log: not supported by cvs2svn $
82
 Revision 1.4  2008/04/26 17:57:43  sybreon
83
 Minor performance improvements.
84
 
85
 Revision 1.3  2008/04/26 01:09:06  sybreon
86
 Passes basic tests. Minor documentation changes to make it compatible with iverilog pre-processor.
87
 
88
 Revision 1.2  2008/04/20 16:34:32  sybreon
89
 Basic version with some features left out.
90
 
91
 Revision 1.1  2008/04/18 00:21:52  sybreon
92
 Initial import.
93
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.