Line 1... |
Line 1... |
------------------------------------------------------------------------------------
|
----------------------------------------------------------------------
|
--
|
---- cel_1b ----
|
-- Geoffrey Ottoy - DraMCo research group
|
---- ----
|
--
|
---- This file is part of the ----
|
-- Module Name: cell_1b.vhd / entity cell_1b
|
---- Modular Simultaneous Exponentiation Core project ----
|
--
|
---- http://www.opencores.org/cores/mod_sim_exp/ ----
|
-- Last Modified: 14/11/2011
|
---- ----
|
--
|
---- Description ----
|
-- Description: cell for use in the montgommery multiplier systolic array
|
---- 1 bit cell for use in the montgommery multiplier systolic ----
|
--
|
---- array ----
|
--
|
---- ----
|
-- Dependencies: cell_1b_adder
|
---- Dependencies: ----
|
-- cell_1b_mux
|
---- - cell_1bit_adder ----
|
--
|
---- - cell_1bit_mux ----
|
-- Revision:
|
---- ----
|
-- Revision 1.00 - Architecture
|
---- Authors: ----
|
-- Revision 0.01 - File Created
|
---- - Geoffrey Ottoy, DraMCo research group ----
|
--
|
---- - Jonas De Craene, JonasDC@opencores.org ----
|
--
|
---- ----
|
------------------------------------------------------------------------------------
|
----------------------------------------------------------------------
|
--
|
---- ----
|
-- NOTICE:
|
---- Copyright (C) 2011 DraMCo research group and OPENCORES.ORG ----
|
--
|
---- ----
|
-- Copyright DraMCo research group. 2011. This code may be contain portions patented
|
---- This source file may be used and distributed without ----
|
-- by other third parties!
|
---- restriction provided that this copyright statement is not ----
|
--
|
---- removed from the file and that any derivative work contains ----
|
------------------------------------------------------------------------------------
|
---- the original copyright notice and the associated disclaimer. ----
|
library IEEE;
|
---- ----
|
use IEEE.STD_LOGIC_1164.ALL;
|
---- This source file is free software; you can redistribute it ----
|
use IEEE.STD_LOGIC_ARITH.ALL;
|
---- and/or modify it under the terms of the GNU Lesser General ----
|
use IEEE.STD_LOGIC_UNSIGNED.ALL;
|
---- Public License as published by the Free Software Foundation; ----
|
|
---- either version 2.1 of the License, or (at your option) any ----
|
---- Uncomment the following library declaration if instantiating
|
---- later version. ----
|
---- any Xilinx primitives in this code.
|
---- ----
|
--library UNISIM;
|
---- This source is distributed in the hope that it will be ----
|
--use UNISIM.VComponents.all;
|
---- 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 cell_1b is
|
entity cell_1b is
|
Port ( my : in STD_LOGIC;
|
port (
|
y : in STD_LOGIC;
|
my : in std_logic;
|
m : in STD_LOGIC;
|
y : in std_logic;
|
x : in STD_LOGIC;
|
m : in std_logic;
|
q : in STD_LOGIC;
|
x : in std_logic;
|
a : in STD_LOGIC;
|
q : in std_logic;
|
cin : in STD_LOGIC;
|
a : in std_logic;
|
cout : out STD_LOGIC;
|
cin : in std_logic;
|
r : out STD_LOGIC);
|
cout : out std_logic;
|
|
r : out std_logic
|
|
);
|
end cell_1b;
|
end cell_1b;
|
|
|
architecture Structural of cell_1b is
|
|
component cell_1b_mux
|
|
Port ( my : in STD_LOGIC;
|
|
y : in STD_LOGIC;
|
|
m : in STD_LOGIC;
|
|
x : in STD_LOGIC;
|
|
q : in STD_LOGIC;
|
|
result : out STD_LOGIC);
|
|
end component;
|
|
|
|
component cell_1b_adder
|
|
Port ( a : in STD_LOGIC;
|
|
mux_result : in STD_LOGIC;
|
|
cin : in STD_LOGIC;
|
|
cout : out STD_LOGIC;
|
|
r : out STD_LOGIC);
|
|
end component;
|
|
|
|
|
architecture Structural of cell_1b is
|
signal mux2adder : std_logic;
|
signal mux2adder : std_logic;
|
begin
|
begin
|
|
|
cell_mux: cell_1b_mux
|
cell_mux: cell_1b_mux
|
port map( my => my,
|
port map(
|
|
my => my,
|
y => y,
|
y => y,
|
m => m,
|
m => m,
|
x => x,
|
x => x,
|
q => q,
|
q => q,
|
result => mux2adder
|
result => mux2adder
|
);
|
);
|
|
|
cell_adder: cell_1b_adder
|
cell_adder: cell_1b_adder
|
port map(a => a,
|
port map(
|
|
a => a,
|
mux_result => mux2adder,
|
mux_result => mux2adder,
|
cin => cin,
|
cin => cin,
|
cout => cout,
|
cout => cout,
|
r => r
|
r => r
|
);
|
);
|
|
|
end Structural;
|
end Structural;
|
No newline at end of file
|
No newline at end of file
|
|
|
No newline at end of file
|
No newline at end of file
|