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 3

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

powered by: WebSVN 2.1.0

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