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
Files
Variables
src
common
IPBUS
ipbus2
ipbus_core
hdl
udp_do_rx_reset.vhd
1
-- Generates reset
for
Ethernet RX logic
2
--
3
-- Dave Sankey, July
2012
4
5
library
ieee
;
6
use
ieee.std_logic_1164.
all
;
7
use
ieee.numeric_std.
all
;
8
9
entity
udp_do_rx_reset
is
10
port
(
11
mac_clk
:
in
std_logic
;
12
rst_macclk
:
in
std_logic
;
13
mac_rx_last
:
in
std_logic
;
14
mac_rx_valid
:
in
std_logic
;
15
rx_reset
:
out
std_logic
16
)
;
17
end
udp_do_rx_reset
;
18
19
architecture
rtl
of
udp_do_rx_reset
is
20
21
signal
rx_reset_sig
:
std_logic
;
22
23
begin
24
25
rx_reset
<=
rx_reset_sig
and
not
mac_rx_valid
;
26
27
rx_reset_buf:
process
(mac_clk)
28
variable
reset_buf
:
std_logic_vector
(
11
downto
0
)
;
29
variable
reset_latch
:
std_logic
;
30
begin
31
if
rising_edge
(
mac_clk
)
then
32
if
rst_macclk
=
'
1
'
then
33
reset_buf
:=
x
"800"
;
34
else
35
-- NB we qualify the
real
mac_rx_last
with
mac_rx_valid
in
udp_if_flat!
36
reset_buf
:=
reset_buf
(
10
downto
0
)
&
mac_rx_last
;
37
end
if
;
38
if
reset_buf
(
11
)
=
'
1
'
then
39
reset_latch
:=
'
1
'
;
40
elsif
mac_rx_valid
=
'
1
'
then
41
reset_latch
:=
'
0
'
;
42
end
if
;
43
rx_reset_sig
<=
reset_latch
44
-- pragma translate_off
45
after
4
ns
46
-- pragma translate_on
47
;
48
end
if
;
49
end
process
rx_reset_buf
;
50
51
end
architecture
rtl
;
Generated on Sun Mar 6 2016 12:24:20 for AMC13 by
1.8.1