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
common
IPBUS
ipbus_core
hdl
udp_rxtransactor_if_simple.vhd
1
-- Interface
to
rx side
of
transactor...
2
-- Even simpler, but now multi-buffer RAM!
3
--
4
-- Dave Sankey, September
2012
5
6
library
ieee
;
7
use
ieee.std_logic_1164.
all
;
8
use
ieee.numeric_std.
all
;
9
10
entity
udp_rxtransactor_if
is
11
port
(
12
mac_clk
:
in
std_logic
;
13
rx_reset
:
in
std_logic
;
14
payload_send
:
in
std_logic
;
15
payload_we
:
in
std_logic
;
16
rx_ram_busy
:
in
std_logic
;
17
pkt_rcvd
:
out
std_logic
;
18
rx_wea
:
out
std_logic
;
19
rxpayload_dropped
:
out
std_logic
20
)
;
21
end
udp_rxtransactor_if
;
22
23
architecture
simple
of
udp_rxtransactor_if
is
24
25
signal
ram_ok
:
std_logic
;
26
27
begin
28
29
rx_wea
<=
payload_we
and
ram_ok
;
30
31
ram_status:
process
(mac_clk)
32
variable
pkt_rcvd_i
,
ram_ok_i
,
rxpayload_dropped_i
:
std_logic
;
33
begin
34
if
rising_edge
(
mac_clk
)
then
35
rxpayload_dropped_i
:=
'
0
'
;
36
pkt_rcvd_i
:=
'
0
'
;
37
if
rx_reset
=
'
1
'
then
38
ram_ok_i
:=
'
1
'
;
39
else
40
-- catch
next
packet arriving before we've disposed
of
this one...
41
if
payload_we
=
'
1
'
and
rx_ram_busy
=
'
1
'
then
42
ram_ok_i
:=
'
0
'
;
43
end
if
;
44
if
payload_send
=
'
1
'
then
45
if
ram_ok_i
=
'
1
'
then
46
pkt_rcvd_i
:=
'
1
'
;
47
else
48
rxpayload_dropped_i
:=
'
1
'
;
49
end
if
;
50
ram_ok_i
:=
'
1
'
;
51
end
if
;
52
end
if
;
53
ram_ok
<=
ram_ok_i
54
-- pragma translate_off
55
after
4
ns
56
-- pragma translate_on
57
;
58
pkt_rcvd
<=
pkt_rcvd_i
59
-- pragma translate_off
60
after
4
ns
61
-- pragma translate_on
62
;
63
rxpayload_dropped
<=
rxpayload_dropped_i
64
-- pragma translate_off
65
after
4
ns
66
-- pragma translate_on
67
;
68
end
if
;
69
end
process
;
70
71
end
simple
;
Generated on Wed Apr 18 2018 10:55:28 for AMC13 by
1.8.1