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
6a9207b0
Commit
6a9207b0
authored
Feb 08, 2012
by
Tomasz Wlostowski
Committed by
Grzegorz Daniluk
Mar 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modules/wrsw_nic: added status register generation in TX FSM
parent
f408609e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
nic_tx_fsm.vhd
modules/wrsw_nic/nic_tx_fsm.vhd
+26
-6
No files found.
modules/wrsw_nic/nic_tx_fsm.vhd
View file @
6a9207b0
...
...
@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN BE-Co-HT
-- Created : 2010-11-24
-- Last update: 2012-01-
12
-- Last update: 2012-01-
24
-- Platform : FPGA-generic
-- Standard : VHDL
-------------------------------------------------------------------------------
...
...
@@ -106,7 +106,7 @@ end nic_tx_fsm;
architecture
behavioral
of
nic_tx_fsm
is
type
t_tx_fsm_state
is
(
TX_DISABLED
,
TX_REQUEST_DESCRIPTOR
,
TX_MEM_FETCH
,
TX_START_PACKET
,
TX_HWORD
,
TX_LWORD
,
TX_END_PACKET
,
TX_OOB1
,
TX_OOB2
,
TX_PAD
,
TX_UPDATE_DESCRIPTOR
,
TX_ERROR
);
type
t_tx_fsm_state
is
(
TX_DISABLED
,
TX_REQUEST_DESCRIPTOR
,
TX_MEM_FETCH
,
TX_START_PACKET
,
TX_HWORD
,
TX_LWORD
,
TX_END_PACKET
,
TX_OOB1
,
TX_OOB2
,
TX_PAD
,
TX_UPDATE_DESCRIPTOR
,
TX_ERROR
,
TX_STATUS
);
signal
cur_tx_desc
:
t_tx_descriptor
;
...
...
@@ -156,10 +156,15 @@ architecture behavioral of nic_tx_fsm is
signal
fab_out
:
t_ep_internal_fabric
;
signal
tx_err
:
std_logic
;
signal
default_status_reg
:
t_wrf_status_reg
;
begin
-- behavioral
default_status_reg
.
has_smac
<=
'1'
;
default_status_reg
.
has_crc
<=
'0'
;
default_status_reg
.
error
<=
'0'
;
default_status_reg
.
is_hp
<=
'0'
;
tx_err
<=
src_i
.
err
or
src_i
.
rty
;
buf_addr_o
<=
std_logic_vector
(
tx_buf_addr
);
...
...
@@ -238,6 +243,9 @@ begin -- behavioral
rtu_valid_int
<=
'0'
;
irq_txerr_o
<=
'0'
;
regs_o
.
sr_tx_error_i
<=
'0'
;
rtu_dst_port_mask_o
<=
(
others
=>
'0'
);
rtu_drop_o
<=
'0'
;
else
case
state
is
...
...
@@ -288,7 +296,7 @@ begin -- behavioral
tx_buf_addr
<=
tx_buf_addr
+
1
;
ignore_first_hword
<=
'1'
;
state
<=
TX_
HWORD
;
state
<=
TX_
STATUS
;
if
(
is_runt_frame
=
'1'
and
cur_tx_desc
.
pad_e
=
'1'
)
then
odd_length
<=
'0'
;
needs_padding
<=
'1'
;
...
...
@@ -304,6 +312,18 @@ begin -- behavioral
tx_data_reg
<=
f_buf_swap_endian_32
(
buf_data_i
);
end
if
;
when
TX_STATUS
=>
fab_out
.
sof
<=
'0'
;
if
(
fab_dreq
=
'1'
and
buf_grant_i
=
'0'
)
then
fab_out
.
dvalid
<=
'1'
;
fab_out
.
addr
<=
c_WRF_STATUS
;
fab_out
.
data
<=
f_marshall_wrf_status
(
default_status_reg
);
state
<=
TX_HWORD
;
else
fab_out
.
dvalid
<=
'0'
;
end
if
;
when
TX_HWORD
=>
rtu_valid_int
<=
'0'
;
...
...
@@ -446,8 +466,8 @@ begin -- behavioral
fab_out
.
bytesel
<=
'0'
;
if
(
fab_dreq
=
'1'
)
then
fab_out
.
eof
<=
'1'
;
state
<=
TX_UPDATE_DESCRIPTOR
;
fab_out
.
eof
<=
'1'
;
state
<=
TX_UPDATE_DESCRIPTOR
;
end
if
;
when
TX_UPDATE_DESCRIPTOR
=>
...
...
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