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/] [cell_1b_mux.vhd] - Blame information for rev 67

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

Line No. Rev Author Line
1 3 JonasDC
----------------------------------------------------------------------  
2
----  cel_1b_mux                                                  ---- 
3
----                                                              ---- 
4
----  This file is part of the                                    ----
5
----    Modular Simultaneous Exponentiation Core project          ---- 
6
----    http://www.opencores.org/cores/mod_sim_exp/               ---- 
7
----                                                              ---- 
8
----  Description                                                 ---- 
9 9 JonasDC
----    1-bit mux for a standard cell in the montgommery          ----
10
----    multiplier systolic array                                 ----
11 3 JonasDC
----                                                              ---- 
12
----  Dependencies: none                                          ---- 
13
----                                                              ---- 
14
----  Authors:                                                    ----
15
----      - Geoffrey Ottoy, DraMCo research group                 ----
16
----      - Jonas De Craene, JonasDC@opencores.org                ---- 
17
----                                                              ---- 
18
---------------------------------------------------------------------- 
19
----                                                              ---- 
20
---- Copyright (C) 2011 DraMCo research group and OPENCORES.ORG   ---- 
21
----                                                              ---- 
22
---- This source file may be used and distributed without         ---- 
23
---- restriction provided that this copyright statement is not    ---- 
24
---- removed from the file and that any derivative work contains  ---- 
25
---- the original copyright notice and the associated disclaimer. ---- 
26
----                                                              ---- 
27
---- This source file is free software; you can redistribute it   ---- 
28
---- and/or modify it under the terms of the GNU Lesser General   ---- 
29
---- Public License as published by the Free Software Foundation; ---- 
30
---- either version 2.1 of the License, or (at your option) any   ---- 
31
---- later version.                                               ---- 
32
----                                                              ---- 
33
---- This source is distributed in the hope that it will be       ---- 
34
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ---- 
35
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ---- 
36
---- PURPOSE.  See the GNU Lesser General Public License for more ---- 
37
---- details.                                                     ---- 
38
----                                                              ---- 
39
---- You should have received a copy of the GNU Lesser General    ---- 
40
---- Public License along with this source; if not, download it   ---- 
41
---- from http://www.opencores.org/lgpl.shtml                     ---- 
42
----                                                              ---- 
43
----------------------------------------------------------------------
44 2 JonasDC
 
45 3 JonasDC
library ieee;
46
use ieee.std_logic_1164.all;
47
use ieee.std_logic_arith.all;
48
use ieee.std_logic_unsigned.all;
49 2 JonasDC
 
50 9 JonasDC
-- 1-bit mux for a standard cell in the montgommery multiplier systolic array
51 2 JonasDC
entity cell_1b_mux is
52 3 JonasDC
  port (
53 9 JonasDC
    -- input bits
54
    my     : in  std_logic;
55 3 JonasDC
    y      : in  std_logic;
56
    m      : in  std_logic;
57 9 JonasDC
    -- selection bits
58 3 JonasDC
    x      : in  std_logic;
59
    q      : in  std_logic;
60 9 JonasDC
    -- mux out
61 3 JonasDC
    result : out std_logic
62
  );
63 2 JonasDC
end cell_1b_mux;
64
 
65 3 JonasDC
 
66 2 JonasDC
architecture Behavioral of cell_1b_mux is
67 3 JonasDC
  signal sel : std_logic_vector(1 downto 0);
68 2 JonasDC
begin
69 9 JonasDC
  -- selection bits
70 3 JonasDC
  sel <= x & q;
71 9 JonasDC
  -- multipexer
72 3 JonasDC
  with sel select
73
    result <=  my when "11",
74
                y when "10",
75
                m when "01",
76
              '0' when others;
77
 
78 2 JonasDC
end Behavioral;

powered by: WebSVN 2.1.0

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