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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [techmap/] [inferred/] [mul_inferred.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      gen_mul_61x61
20
-- File:        mul_inferred.vhd
21
-- Author:      Edvin Catovic - Gaisler Research
22
-- Description: Generic 61x61 multplier
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
use ieee.numeric_std.all;
28
library grlib;
29
use grlib.stdlib.all;
30
 
31
entity gen_mul_61x61 is
32
    port(A       : in std_logic_vector(60 downto 0);
33
         B       : in std_logic_vector(60 downto 0);
34
         EN      : in std_logic;
35
         CLK     : in std_logic;
36
         PRODUCT : out std_logic_vector(121 downto 0));
37
end;
38
 
39
architecture rtl of gen_mul_61x61 is
40
 
41
  signal r1, r1in, r2, r2in : std_logic_vector(121 downto 0);
42
 
43
begin
44
   comb : process(A, B, r1)
45
   begin
46
-- pragma translate_off
47
    if not (is_x(A) or is_x(B)) then
48
-- pragma translate_on            
49
      r1in <= std_logic_vector(unsigned(A) * unsigned(B));
50
-- pragma translate_off
51
    end if;
52
-- pragma translate_on            
53
      r2in <= r1;
54
    end process;
55
 
56
    reg : process(clk)
57
    begin
58
      if rising_edge(clk) then
59
        if EN = '1' then
60
          r1 <= r1in;
61
          r2 <= r2in;
62
        end if;
63
      end if;
64
    end process;
65
    PRODUCT <= r2;
66
end;
67
 

powered by: WebSVN 2.1.0

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