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/] [standard_cell_block.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
----  standard_cell_block                                         ---- 
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
----    a block of [width] cell_1b cells for use in the           ----
10
----    montgommery multiplier systolic array                     ----
11
----                                                              ----
12
----  Dependencies:                                               ----
13
----    - cell_1b                                                 ----
14
----                                                              ----
15
----  Authors:                                                    ----
16
----      - Geoffrey Ottoy, DraMCo research group                 ----
17
----      - Jonas De Craene, JonasDC@opencores.org                ---- 
18
----                                                              ---- 
19
---------------------------------------------------------------------- 
20
----                                                              ---- 
21
---- Copyright (C) 2011 DraMCo research group and OPENCORES.ORG   ---- 
22
----                                                              ---- 
23
---- This source file may be used and distributed without         ---- 
24
---- restriction provided that this copyright statement is not    ---- 
25
---- removed from the file and that any derivative work contains  ---- 
26
---- the original copyright notice and the associated disclaimer. ---- 
27
----                                                              ---- 
28
---- This source file is free software; you can redistribute it   ---- 
29
---- and/or modify it under the terms of the GNU Lesser General   ---- 
30
---- Public License as published by the Free Software Foundation; ---- 
31
---- either version 2.1 of the License, or (at your option) any   ---- 
32
---- later version.                                               ---- 
33
----                                                              ---- 
34
---- This source is distributed in the hope that it will be       ---- 
35
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ---- 
36
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ---- 
37
---- PURPOSE.  See the GNU Lesser General Public License for more ---- 
38
---- details.                                                     ---- 
39
----                                                              ---- 
40
---- You should have received a copy of the GNU Lesser General    ---- 
41
---- Public License along with this source; if not, download it   ---- 
42
---- from http://www.opencores.org/lgpl.shtml                     ---- 
43
----                                                              ---- 
44
----------------------------------------------------------------------
45 2 JonasDC
 
46 3 JonasDC
library ieee;
47
use ieee.std_logic_1164.all;
48
use ieee.std_logic_arith.all;
49
use ieee.std_logic_unsigned.all;
50 2 JonasDC
 
51 3 JonasDC
library mod_sim_exp;
52
use mod_sim_exp.mod_sim_exp_pkg.all;
53
 
54
 
55 2 JonasDC
entity standard_cell_block is
56 3 JonasDC
  generic (
57
    width : integer := 16
58
  );
59
  port (
60
    my   : in  std_logic_vector((width-1) downto 0);
61
    y    : in  std_logic_vector((width-1) downto 0);
62
    m    : in  std_logic_vector((width-1) downto 0);
63
    x    : in  std_logic;
64
    q    : in  std_logic;
65
    a    : in  std_logic_vector((width-1) downto 0);
66
    cin  : in std_logic;
67
    cout : out std_logic;
68
    r    : out  std_logic_vector((width-1) downto 0)
69
  );
70 2 JonasDC
end standard_cell_block;
71
 
72 3 JonasDC
 
73 2 JonasDC
architecture Structural of standard_cell_block is
74
        signal carry : std_logic_vector(width downto 0);
75
begin
76
 
77
        carry(0) <= cin;
78
 
79 3 JonasDC
  cell_block : for i in 0 to (width-1) generate
80
    cells : cell_1b
81
    port map(
82
      my   => my(i),
83
      y    => y(i),
84
      m    => m(i),
85
      x    => x,
86
      q    => q,
87
      a    => a(i),
88
      cin  => carry(i),
89
      cout => carry(i+1),
90
      r    => r(i)
91
    );
92
  end generate;
93 2 JonasDC
 
94
        cout <= carry(width);
95 3 JonasDC
end Structural;

powered by: WebSVN 2.1.0

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