AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
Main Page
Design Unit List
Files
File List
All
Classes
Variables
src
TCPIP_if
SDP32x18.vhd
1
----------------------------------------------------------------------------------
2
-- Company:
3
-- Engineer:
4
--
5
-- Create Date:
10
:
41
:
05
07/29/2013
6
-- Design Name:
7
-- Module Name: MPRAM - Behavioral
8
-- Project Name:
9
-- Target Devices:
10
-- Tool versions:
11
-- Description:
12
--
13
-- Dependencies:
14
--
15
-- Revision:
16
-- Revision
0
.
01
-
File
Created
17
-- Additional Comments:
18
--
19
----------------------------------------------------------------------------------
20
library
IEEE
;
21
use
IEEE.STD_LOGIC_1164.
ALL
;
22
use
IEEE.STD_LOGIC_ARITH.
ALL
;
23
use
IEEE.STD_LOGIC_UNSIGNED.
ALL
;
24
use
IEEE.std_logic_misc.
all
;
25
use
work.
amc13_pack
.
all
;
26
27
-- Uncomment the following
library
declaration
if
using
28
-- arithmetic functions
with
Signed
or
Unsigned
values
29
--use IEEE.NUMERIC_STD.
ALL
;
30
31
-- Uncomment the following
library
declaration
if
instantiating
32
-- any Xilinx primitives
in
this code.
33
library
UNISIM
;
34
use
UNISIM.VComponents.
all
;
35
36
entity
SDP32x18
is
37
generic
(
INIT
:
bitarray9x64
)
;
38
Port
(
clk
:
in
STD_LOGIC
;
39
we
:
in
STD_LOGIC
;
40
DI
:
in
STD_LOGIC_VECTOR
(
17
downto
0
)
;
41
WA
:
in
STD_LOGIC_VECTOR
(
4
downto
0
)
;
42
RA
:
in
STD_LOGIC_VECTOR
(
4
downto
0
)
;
43
DO
:
out
STD_LOGIC_VECTOR
(
17
downto
0
)
)
;
44
end
SDP32x18
;
45
46
architecture
Behavioral
of
SDP32x18
is
47
signal
DOUT
:
std_logic_vector
(
17
downto
0
)
:=
(
others
=
>
'
0
'
)
;
48
49
begin
50
g_buf
:
for
i
in
0
to
2
generate
51
RAM32M_inst : RAM32M
52
generic
map
(
53
INIT_A => INIT
(
i*3
)
,
-- Initial contents
of
A
port
54
INIT_B => INIT
(
i*3+1
)
,
-- Initial contents
of
B
port
55
INIT_C => INIT
(
i*3+2
)
,
-- Initial contents
of
C
port
56
INIT_D => X"0000000000000000"
)
-- Initial contents
of
D
port
57
port
map
(
58
DOA => DOUT
(
i*6+1
downto
i*6
)
,
-- Read
port
A 2-bit output
59
DOB => DOUT
(
i*6+3
downto
i*6+2
)
,
-- Read
port
B 2-bit output
60
DOC => DOUT
(
i*6+5
downto
i*6+4
)
,
-- Read
port
C 2-bit output
61
DOD =>
open
,
-- Read/Write
port
D 2-bit output
62
ADDRA => RA,
-- Read
port
A 5-bit address input
63
ADDRB => RA,
-- Read
port
B 5-bit address input
64
ADDRC => RA,
-- Read
port
C 5-bit address input
65
ADDRD => WA,
-- Read/Write
port
D 5-bit address input
66
DIA => DI
(
i*6+1
downto
i*6
)
,
-- RAM 2-bit data write input addressed by ADDRD,
67
-- read addressed by ADDRA
68
DIB => DI
(
i*6+3
downto
i*6+2
)
,
-- RAM 2-bit data write input addressed by ADDRD,
69
-- read addressed by ADDRB
70
DIC => DI
(
i*6+5
downto
i*6+4
)
,
-- RAM 2-bit data write input addressed by ADDRD,
71
-- read addressed by ADDRC
72
DID => "
00
",
-- RAM 2-bit data write input addressed by ADDRD,
73
-- read addressed by ADDRD
74
WCLK => clk,
-- Write clock input
75
WE => we
-- Write enable input
76
)
;
77
end
generate
;
78
process
(clk)
79
begin
80
if
(
clk
'
event
and
clk
=
'
1
'
)
then
81
DO
<=
DOUT
;
82
end
if
;
83
end
process
;
84
end
Behavioral
;
85
Generated on Wed Apr 18 2018 10:55:28 for AMC13 by
1.8.1