Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit core collection
Commits
5b598556
Commit
5b598556
authored
Mar 16, 2012
by
Tomasz Wlostowski
Committed by
Grzegorz Daniluk
Mar 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/wrsw_nic: support for invalid timestamp indication
parent
c55f7bde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
nic_descriptors_pkg.vhd
modules/wrsw_nic/nic_descriptors_pkg.vhd
+6
-2
nic_rx_fsm.vhd
modules/wrsw_nic/nic_rx_fsm.vhd
+9
-8
No files found.
modules/wrsw_nic/nic_descriptors_pkg.vhd
View file @
5b598556
...
...
@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN BE-Co-HT
-- Created : 2010-11-24
-- Last update: 201
0-12-01
-- Last update: 201
2-03-16
-- Platform : FPGA-generic
-- Standard : VHDL
-------------------------------------------------------------------------------
...
...
@@ -49,6 +49,9 @@ package nic_descriptors_pkg is
error
:
std_logic
;
-- RX error indication
port_id
:
std_logic_vector
(
5
downto
0
);
-- Packet source port ID
got_ts
:
std_logic
;
-- Got a timestamp?
ts_incorrect
:
std_logic
;
-- 1: Timestamp may be incorrect (generated
-- during time base adjustment)
ts_r
:
std_logic_vector
(
27
downto
0
);
-- Rising edge timestamp
ts_f
:
std_logic_vector
(
3
downto
0
);
-- Falling edge timestamp
len
:
std_logic_vector
(
c_nic_buf_size_log2
-1
downto
0
);
-- Length of the allocated buffer
...
...
@@ -105,7 +108,7 @@ package body NIC_descriptors_pkg is
variable
tmp
:
std_logic_vector
(
31
downto
0
);
begin
case
regnum
is
when
1
=>
tmp
:
=
"0000000000000000
0"
&
desc
.
got_ts
&
desc
.
port_id
&
"000000"
&
desc
.
error
&
desc
.
empty
;
when
1
=>
tmp
:
=
"0000000000000000
"
&
desc
.
ts_incorrect
&
desc
.
got_ts
&
desc
.
port_id
&
"000000"
&
desc
.
error
&
desc
.
empty
;
when
2
=>
tmp
:
=
desc
.
ts_f
&
desc
.
ts_r
;
when
3
=>
tmp
:
=
f_resize_slv
(
desc
.
len
,
16
)
&
f_resize_slv
(
desc
.
offset
,
16
);
when
others
=>
null
;
...
...
@@ -148,6 +151,7 @@ package body NIC_descriptors_pkg is
desc
.
error
:
=
mem_input
(
1
);
desc
.
port_id
:
=
mem_input
(
13
downto
8
);
desc
.
got_ts
:
=
mem_input
(
14
);
desc
.
ts_incorrect
:
=
mem_input
(
15
);
when
2
=>
desc
.
ts_f
:
=
mem_input
(
31
downto
28
);
...
...
modules/wrsw_nic/nic_rx_fsm.vhd
View file @
5b598556
...
...
@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN BE-Co-HT
-- Created : 2010-11-24
-- Last update: 2012-0
1-24
-- Last update: 2012-0
3-16
-- Platform : FPGA-generic
-- Standard : VHDL
-------------------------------------------------------------------------------
...
...
@@ -48,8 +48,8 @@ entity nic_rx_fsm is
-------------------------------------------------------------------------------
-- Wishbone regs
-------------------------------------------------------------------------------
bna_i
:
in
std_logic
;
bna_i
:
in
std_logic
;
regs_i
:
in
t_nic_out_registers
;
regs_o
:
out
t_nic_in_registers
;
...
...
@@ -151,8 +151,8 @@ begin
rxdesc_new_o
<=
cur_rx_desc
;
-- some combinatorial helpers to minimize conditions in IFs.
wrf_is_payload
<=
'1'
when
(
fab_in
.
addr
=
c_WRF_DATA
)
else
'0'
;
wrf_is_oob
<=
'1'
when
(
fab_in
.
addr
=
c_WRF_OOB
)
else
'0'
;
wrf_is_payload
<=
'1'
when
(
fab_in
.
addr
=
c_WRF_DATA
)
else
'0'
;
wrf_is_oob
<=
'1'
when
(
fab_in
.
addr
=
c_WRF_OOB
)
else
'0'
;
wrf_terminate
<=
'1'
when
(
fab_in
.
eof
=
'1'
or
fab_in
.
error
=
'1'
)
else
'0'
;
-- process produces the RCOMP interrupt each time a packet has been received
...
...
@@ -244,7 +244,7 @@ begin
state
<=
RX_WAIT_SOF
;
-- and start waiting for
-- incoming traffic
else
rx_dreq_mask
<=
bna_i
;
-- enable RX (but to /dev/null)
rx_dreq_mask
<=
bna_i
;
-- enable RX (but to /dev/null)
end
if
;
-------------------------------------------------------------------------------
...
...
@@ -368,7 +368,8 @@ begin
-- the descriptor
if
(
oob_sreg
(
0
)
=
'1'
)
then
-- 1st OOB word
cur_rx_desc
.
port_id
<=
'0'
&
fab_in
.
data
(
4
downto
0
);
cur_rx_desc
.
port_id
<=
'0'
&
fab_in
.
data
(
4
downto
0
);
cur_rx_desc
.
ts_incorrect
<=
fab_in
.
data
(
11
);
end
if
;
if
(
oob_sreg
(
1
)
=
'1'
)
then
-- 2nd OOB word
...
...
@@ -385,7 +386,7 @@ begin
-- we've got 2 valid word of the payload in rx_buf_data, write them to the
-- memory
if
(
rx_rdreg_toggle
=
'1'
and
fab_in
.
dvalid
=
'1'
and
(
wrf_is_oob
=
'1'
or
wrf_is_payload
=
'1'
)
and
wrf_terminate
=
'0'
)
then
if
(
rx_rdreg_toggle
=
'1'
and
fab_in
.
dvalid
=
'1'
and
(
wrf_is_oob
=
'1'
or
wrf_is_payload
=
'1'
)
and
wrf_terminate
=
'0'
)
then
increase_addr
<=
'1'
;
buf_wr_o
<=
'1'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment