OpenCores
URL https://opencores.org/ocsvn/aemb/aemb/trunk

Subversion Repositories aemb

[/] [aemb/] [trunk/] [rtl/] [verilog/] [aeMB2_mult.v] - Blame information for rev 120

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 120 sybreon
/* $Id: aeMB2_mult.v,v 1.2 2008-04-20 16:34:32 sybreon Exp $
2 118 sybreon
**
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
/**
23
 * Two Cycle Multiplier Unit
24
 * @file aeMB2_mult.v
25
 
26
 * This implements a 2 cycle multipler to increase clock speed. The
27
   multiplier architecture is left to the synthesis tool. Modify this
28
   to instantiate specific multipliers.
29
 
30
 */
31
 
32
module aeMB2_mult (/*AUTOARG*/
33
   // Outputs
34
   mul_mx,
35
   // Inputs
36
   opa_of, opb_of, opc_of, gclk, grst, dena, gpha
37
   );
38
   parameter AEMB_MUL = 1; ///< implement multiplier  
39
 
40
   output [31:0] mul_mx;
41
 
42
   input [31:0]  opa_of;
43
   input [31:0]  opb_of;
44
   input [5:0]    opc_of;
45
 
46
   // SYS signals
47
   input         gclk,
48
                 grst,
49
                 dena,
50
                 gpha;
51
 
52
   /*AUTOREG*/
53
 
54 120 sybreon
   reg [31:0]     rMUL0,
55
                 rMUL1;
56 118 sybreon
 
57
   always @(posedge gclk)
58
     if (grst) begin
59
        /*AUTORESET*/
60
        // Beginning of autoreset for uninitialized flops
61 120 sybreon
        rMUL0 <= 32'h0;
62
        rMUL1 <= 32'h0;
63 118 sybreon
        // End of automatics
64
     end else if (dena) begin
65 120 sybreon
        rMUL1 <= #1 rMUL0;
66
        rMUL0 <= #1 (AEMB_MUL[0]) ? (opa_of * opb_of) : 32'hX;
67 118 sybreon
     end
68 120 sybreon
 
69
   assign        mul_mx = rMUL1;
70
 
71 118 sybreon
endmodule // aeMB2_mult
72
 
73 120 sybreon
// $Log: not supported by cvs2svn $
74
// Revision 1.1  2008/04/18 00:21:52  sybreon
75
// Initial import.
76
//

powered by: WebSVN 2.1.0

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