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

Subversion Repositories mod_sim_exp

[/] [mod_sim_exp/] [tags/] [start_version/] [rtl/] [vhdl/] [core/] [standard_cell_block.vhd] - Diff between revs 2 and 48

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 48
------------------------------------------------------------------------------------ 
------------------------------------------------------------------------------------ 
--                      
--                      
-- Geoffrey Ottoy - DraMCo research group
-- Geoffrey Ottoy - DraMCo research group
--
--
-- Module Name: standard_cell_block.vhd / entity standard_cell_block
-- Module Name: standard_cell_block.vhd / entity standard_cell_block
-- 
-- 
-- Last Modified:       14/11/2011 
-- Last Modified:       14/11/2011 
-- 
-- 
-- Description:         cell_block for use in the montgommery multiplier systolic array
-- Description:         cell_block for use in the montgommery multiplier systolic array
--
--
--
--
-- Dependencies:        none
-- Dependencies:        none
--
--
-- Revision:
-- Revision:
--      Revision 1.00 - Architecture
--      Revision 1.00 - Architecture
--      Revision 0.01 - File Created
--      Revision 0.01 - File Created
--
--
--
--
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
--
--
-- NOTICE:
-- NOTICE:
--
--
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
-- by other third parties!
-- by other third parties!
--
--
------------------------------------------------------------------------------------
------------------------------------------------------------------------------------
library IEEE;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
 
 
---- Uncomment the following library declaration if instantiating
---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
---- any Xilinx primitives in this code.
--library UNISIM;
--library UNISIM;
--use UNISIM.VComponents.all;
--use UNISIM.VComponents.all;
 
 
entity standard_cell_block is
entity standard_cell_block is
        generic ( width : integer := 16
        generic ( width : integer := 16
        );
        );
   Port ( my : in  STD_LOGIC_VECTOR((width-1) downto 0);
   Port ( my : in  STD_LOGIC_VECTOR((width-1) downto 0);
           y : in  STD_LOGIC_VECTOR((width-1) downto 0);
           y : in  STD_LOGIC_VECTOR((width-1) downto 0);
           m : in  STD_LOGIC_VECTOR((width-1) downto 0);
           m : in  STD_LOGIC_VECTOR((width-1) downto 0);
           x : in  STD_LOGIC;
           x : in  STD_LOGIC;
           q : in  STD_LOGIC;
           q : in  STD_LOGIC;
                          a : in  STD_LOGIC_VECTOR((width-1) downto 0);
                          a : in  STD_LOGIC_VECTOR((width-1) downto 0);
                          cin : in STD_LOGIC;
                          cin : in STD_LOGIC;
                          cout : out STD_LOGIC;
                          cout : out STD_LOGIC;
           r : out  STD_LOGIC_VECTOR((width-1) downto 0));
           r : out  STD_LOGIC_VECTOR((width-1) downto 0));
end standard_cell_block;
end standard_cell_block;
 
 
architecture Structural of standard_cell_block is
architecture Structural of standard_cell_block is
        component cell_1b
        component cell_1b
                 Port ( my : in  STD_LOGIC;
                 Port ( my : in  STD_LOGIC;
           y : in  STD_LOGIC;
           y : in  STD_LOGIC;
           m : in  STD_LOGIC;
           m : in  STD_LOGIC;
           x : in  STD_LOGIC;
           x : in  STD_LOGIC;
           q : in  STD_LOGIC;
           q : in  STD_LOGIC;
                          a : in  STD_LOGIC;
                          a : in  STD_LOGIC;
                          cin : in STD_LOGIC;
                          cin : in STD_LOGIC;
                          cout : out STD_LOGIC;
                          cout : out STD_LOGIC;
           r : out  STD_LOGIC);
           r : out  STD_LOGIC);
        end component;
        end component;
 
 
        signal carry : std_logic_vector(width downto 0);
        signal carry : std_logic_vector(width downto 0);
begin
begin
 
 
        carry(0) <= cin;
        carry(0) <= cin;
 
 
        cell_block: for i in 0 to (width-1) generate
        cell_block: for i in 0 to (width-1) generate
                cells: cell_1b
                cells: cell_1b
                        port map( my => my(i),
                        port map( my => my(i),
                                                  y => y(i),
                                                  y => y(i),
                                                  m => m(i),
                                                  m => m(i),
                                                  x => x,
                                                  x => x,
                                                  q => q,
                                                  q => q,
                                                  a => a(i),
                                                  a => a(i),
                                                  cin => carry(i),
                                                  cin => carry(i),
                                                  cout => carry(i+1),
                                                  cout => carry(i+1),
                                                  r => r(i)
                                                  r => r(i)
                        );
                        );
        end generate;
        end generate;
 
 
        cout <= carry(width);
        cout <= carry(width);
 
 

powered by: WebSVN 2.1.0

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