URL
https://opencores.org/ocsvn/mod_sim_exp/mod_sim_exp/trunk
Show entire file |
Details |
Blame |
View Log
Rev 3 |
Rev 9 |
Line 4... |
Line 4... |
---- This file is part of the ----
|
---- This file is part of the ----
|
---- Modular Simultaneous Exponentiation Core project ----
|
---- Modular Simultaneous Exponentiation Core project ----
|
---- http://www.opencores.org/cores/mod_sim_exp/ ----
|
---- http://www.opencores.org/cores/mod_sim_exp/ ----
|
---- ----
|
---- ----
|
---- Description ----
|
---- Description ----
|
---- mux for use in the montgommery multiplier systolic array ----
|
---- 1-bit mux for a standard cell in the montgommery ----
|
|
---- multiplier systolic array ----
|
---- ----
|
---- ----
|
---- Dependencies: none ----
|
---- Dependencies: none ----
|
---- ----
|
---- ----
|
---- Authors: ----
|
---- Authors: ----
|
---- - Geoffrey Ottoy, DraMCo research group ----
|
---- - Geoffrey Ottoy, DraMCo research group ----
|
Line 44... |
Line 45... |
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;
|
|
|
|
-- 1-bit mux for a standard cell in the montgommery multiplier systolic array
|
entity cell_1b_mux is
|
entity cell_1b_mux is
|
port (
|
port (
|
|
-- input bits
|
my : in std_logic;
|
my : in std_logic;
|
y : in std_logic;
|
y : in std_logic;
|
m : in std_logic;
|
m : in std_logic;
|
|
-- selection bits
|
x : in std_logic;
|
x : in std_logic;
|
q : in std_logic;
|
q : in std_logic;
|
|
-- mux out
|
result : out std_logic
|
result : out std_logic
|
);
|
);
|
end cell_1b_mux;
|
end cell_1b_mux;
|
|
|
|
|
architecture Behavioral of cell_1b_mux is
|
architecture Behavioral of cell_1b_mux is
|
signal sel : std_logic_vector(1 downto 0);
|
signal sel : std_logic_vector(1 downto 0);
|
begin
|
begin
|
|
-- selection bits
|
sel <= x & q;
|
sel <= x & q;
|
|
-- multipexer
|
with sel select
|
with sel select
|
result <= my when "11",
|
result <= my when "11",
|
y when "10",
|
y when "10",
|
m when "01",
|
m when "01",
|
'0' when others;
|
'0' when others;
|
© copyright 1999-2023
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.