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

Subversion Repositories mod_sim_exp

[/] [mod_sim_exp/] [trunk/] [rtl/] [vhdl/] [core/] [standard_cell_block.vhd] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 JonasDC
------------------------------------------------------------------------------------ 
2
--                      
3
-- Geoffrey Ottoy - DraMCo research group
4
--
5
-- Module Name: standard_cell_block.vhd / entity standard_cell_block
6
-- 
7
-- Last Modified:       14/11/2011 
8
-- 
9
-- Description:         cell_block for use in the montgommery multiplier systolic array
10
--
11
--
12
-- Dependencies:        none
13
--
14
-- Revision:
15
--      Revision 1.00 - Architecture
16
--      Revision 0.01 - File Created
17
--
18
--
19
------------------------------------------------------------------------------------
20
--
21
-- NOTICE:
22
--
23
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
24
-- by other third parties!
25
--
26
------------------------------------------------------------------------------------
27
library IEEE;
28
use IEEE.STD_LOGIC_1164.ALL;
29
use IEEE.STD_LOGIC_ARITH.ALL;
30
use IEEE.STD_LOGIC_UNSIGNED.ALL;
31
 
32
---- Uncomment the following library declaration if instantiating
33
---- any Xilinx primitives in this code.
34
--library UNISIM;
35
--use UNISIM.VComponents.all;
36
 
37
entity standard_cell_block is
38
        generic ( width : integer := 16
39
        );
40
   Port ( my : in  STD_LOGIC_VECTOR((width-1) downto 0);
41
           y : in  STD_LOGIC_VECTOR((width-1) downto 0);
42
           m : in  STD_LOGIC_VECTOR((width-1) downto 0);
43
           x : in  STD_LOGIC;
44
           q : in  STD_LOGIC;
45
                          a : in  STD_LOGIC_VECTOR((width-1) downto 0);
46
                          cin : in STD_LOGIC;
47
                          cout : out STD_LOGIC;
48
           r : out  STD_LOGIC_VECTOR((width-1) downto 0));
49
end standard_cell_block;
50
 
51
architecture Structural of standard_cell_block is
52
        component cell_1b
53
                 Port ( my : in  STD_LOGIC;
54
           y : in  STD_LOGIC;
55
           m : in  STD_LOGIC;
56
           x : in  STD_LOGIC;
57
           q : in  STD_LOGIC;
58
                          a : in  STD_LOGIC;
59
                          cin : in STD_LOGIC;
60
                          cout : out STD_LOGIC;
61
           r : out  STD_LOGIC);
62
        end component;
63
 
64
        signal carry : std_logic_vector(width downto 0);
65
begin
66
 
67
        carry(0) <= cin;
68
 
69
        cell_block: for i in 0 to (width-1) generate
70
                cells: cell_1b
71
                        port map( my => my(i),
72
                                                  y => y(i),
73
                                                  m => m(i),
74
                                                  x => x,
75
                                                  q => q,
76
                                                  a => a(i),
77
                                                  cin => carry(i),
78
                                                  cout => carry(i+1),
79
                                                  r => r(i)
80
                        );
81
        end generate;
82
 
83
        cout <= carry(width);
84
end Structural;

powered by: WebSVN 2.1.0

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