Line 1... |
Line 1... |
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------
|
-- Company:
|
---- modulus_ram ----
|
-- Engineer:
|
---- ----
|
--
|
---- This file is part of the ----
|
-- Create Date: 13:57:21 03/08/2012
|
---- Modular Simultaneous Exponentiation Core project ----
|
-- Design Name:
|
---- http://www.opencores.org/cores/mod_sim_exp/ ----
|
-- Module Name: modulus_ram - Behavioral
|
---- ----
|
-- Project Name:
|
---- Description ----
|
-- Target Devices:
|
---- BRAM memory and logic to store the 1536-bit modulus ----
|
-- Tool versions:
|
---- ----
|
-- Description:
|
---- Dependencies: ----
|
--
|
---- - operands_sp (coregen) ----
|
-- Dependencies:
|
---- ----
|
--
|
---- Authors: ----
|
-- Revision:
|
---- - Geoffrey Ottoy, DraMCo research group ----
|
-- Revision 0.01 - File Created
|
---- - Jonas De Craene, JonasDC@opencores.org ----
|
-- Additional Comments:
|
---- ----
|
--
|
----------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
---- ----
|
library IEEE;
|
---- Copyright (C) 2011 DraMCo research group and OPENCORES.ORG ----
|
use IEEE.STD_LOGIC_1164.ALL;
|
---- ----
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
---- This source file may be used and distributed without ----
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
---- restriction provided that this copyright statement is not ----
|
|
---- removed from the file and that any derivative work contains ----
|
---- Uncomment the following library declaration if instantiating
|
---- the original copyright notice and the associated disclaimer. ----
|
---- any Xilinx primitives in this code.
|
---- ----
|
--library UNISIM;
|
---- This source file is free software; you can redistribute it ----
|
--use UNISIM.VComponents.all;
|
---- and/or modify it under the terms of the GNU Lesser General ----
|
|
---- Public License as published by the Free Software Foundation; ----
|
|
---- either version 2.1 of the License, or (at your option) any ----
|
|
---- later version. ----
|
|
---- ----
|
|
---- This source is distributed in the hope that it will be ----
|
|
---- useful, but WITHOUT ANY WARRANTY; without even the implied ----
|
|
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ----
|
|
---- PURPOSE. See the GNU Lesser General Public License for more ----
|
|
---- details. ----
|
|
---- ----
|
|
---- You should have received a copy of the GNU Lesser General ----
|
|
---- Public License along with this source; if not, download it ----
|
|
---- from http://www.opencores.org/lgpl.shtml ----
|
|
---- ----
|
|
----------------------------------------------------------------------
|
|
|
|
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
use ieee.std_logic_arith.all;
|
|
use ieee.std_logic_unsigned.all;
|
|
|
|
library mod_sim_exp;
|
|
use mod_sim_exp.mod_sim_exp_pkg.all;
|
|
|
|
|
entity modulus_ram is
|
entity modulus_ram is
|
port(
|
port(
|
clk : in std_logic;
|
clk : in std_logic;
|
modulus_addr : in std_logic_vector(5 downto 0);
|
modulus_addr : in std_logic_vector(5 downto 0);
|
Line 35... |
Line 59... |
modulus_in : in std_logic_vector(31 downto 0);
|
modulus_in : in std_logic_vector(31 downto 0);
|
modulus_out : out std_logic_vector(1535 downto 0)
|
modulus_out : out std_logic_vector(1535 downto 0)
|
);
|
);
|
end modulus_ram;
|
end modulus_ram;
|
|
|
architecture Behavioral of modulus_ram is
|
|
-- single port blockram to store modulus
|
|
component operands_sp
|
|
port(
|
|
clka: in std_logic;
|
|
wea: in std_logic_vector(0 downto 0);
|
|
addra: in std_logic_vector(4 downto 0);
|
|
dina: in std_logic_vector(31 downto 0);
|
|
douta: out std_logic_vector(511 downto 0)
|
|
);
|
|
end component;
|
|
|
|
|
architecture Behavioral of modulus_ram is
|
signal part_enable : std_logic_vector(3 downto 0);
|
signal part_enable : std_logic_vector(3 downto 0);
|
signal wea : std_logic_vector(3 downto 0);
|
signal wea : std_logic_vector(3 downto 0);
|
signal addra : std_logic_vector(4 downto 0);
|
signal addra : std_logic_vector(4 downto 0);
|
begin
|
begin
|
|
|
Line 94... |
Line 108... |
addra => addra,
|
addra => addra,
|
dina => modulus_in,
|
dina => modulus_in,
|
douta => modulus_out(1535 downto 1024)
|
douta => modulus_out(1535 downto 1024)
|
);
|
);
|
|
|
-- modulus_3 : operands_sp
|
|
-- port map (
|
|
-- clka => clk,
|
|
-- wea => wea(3 downto 3),
|
|
-- addra => addra,
|
|
-- dina => modulus_in,
|
|
-- douta => modulus_out(2047 downto 1536)
|
|
-- );
|
|
|
|
end Behavioral;
|
end Behavioral;
|
|
|
|
|
No newline at end of file
|
No newline at end of file
|