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

Subversion Repositories aemb

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

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

Line No. Rev Author Line
1 118 sybreon
/* $Id: aeMB2_mult.v,v 1.1 2008-04-18 00:21:52 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
/**
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
   reg [31:0]     rMULA,
55
                 rMULB;
56
 
57
   assign        mul_mx = (AEMB_MUL[0]) ? rMULB : 32'hX;
58
 
59
   always @(posedge gclk)
60
     if (grst) begin
61
        /*AUTORESET*/
62
        // Beginning of autoreset for uninitialized flops
63
        rMULA <= 32'h0;
64
        rMULB <= 32'h0;
65
        // End of automatics
66
     end else if (dena) begin
67
        rMULB <= #1 rMULA;
68
        rMULA <= #1 (opa_of * opb_of);
69
     end
70
 
71
endmodule // aeMB2_mult
72
 
73
// $Log: not supported by cvs2svn $

powered by: WebSVN 2.1.0

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