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
07a29c81
Commit
07a29c81
authored
Jul 14, 2016
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding rmon events in NIC for per-port tx frames
parent
80894325
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
9 deletions
+33
-9
nic_tx_fsm.vhd
modules/wrsw_nic/nic_tx_fsm.vhd
+17
-3
xwrsw_nic.vhd
modules/wrsw_nic/xwrsw_nic.vhd
+16
-6
No files found.
modules/wrsw_nic/nic_tx_fsm.vhd
View file @
07a29c81
...
...
@@ -51,7 +51,8 @@ use work.nic_wbgen2_pkg.all;
entity
nic_tx_fsm
is
generic
(
g_port_mask_bits
:
integer
:
=
32
;
g_cyc_on_stall
:
boolean
:
=
false
);
g_cyc_on_stall
:
boolean
:
=
false
;
g_rmon_events_pp
:
integer
:
=
1
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
...
@@ -117,7 +118,12 @@ entity nic_tx_fsm is
buf_grant_i
:
in
std_logic
;
-- buffer address, data and write enable lines.
buf_addr_o
:
out
std_logic_vector
(
c_nic_buf_size_log2
-3
downto
0
);
buf_data_i
:
in
std_logic_vector
(
31
downto
0
)
buf_data_i
:
in
std_logic_vector
(
31
downto
0
);
-------------------------------------------------------------------------------
-- RMON events
-------------------------------------------------------------------------------
rmon_events_o
:
out
std_logic_vector
(
g_port_mask_bits
*
g_rmon_events_pp
-1
downto
0
)
);
end
nic_tx_fsm
;
...
...
@@ -155,6 +161,7 @@ architecture behavioral of nic_tx_fsm is
signal
rtu_valid_int
:
std_logic
;
signal
rtu_valid_int_d0
:
std_logic
;
signal
rtu_port_mask
:
std_logic_vector
(
g_port_mask_bits
-1
downto
0
);
signal
tx_err
:
std_logic
;
signal
default_status_reg
:
t_wrf_status_reg
;
...
...
@@ -182,7 +189,8 @@ begin -- behavioral
txdesc_new_o
<=
cur_tx_desc
;
src_o
.
stb
<=
src_stb_int
;
--because it's validated with rtu_rsp_valid_o and sw_core stores it to internal register on rtu_rsp_valid strobe
rtu_dst_port_mask_o
<=
cur_tx_desc
.
dpm
(
g_port_mask_bits
-1
downto
0
);
rtu_port_mask
<=
cur_tx_desc
.
dpm
(
g_port_mask_bits
-1
downto
0
);
rtu_dst_port_mask_o
<=
rtu_port_mask
;
rtu_prio_o
<=
(
others
=>
'0'
);
rtu_drop_o
<=
'0'
;
...
...
@@ -513,4 +521,10 @@ begin -- behavioral
end
if
;
end
if
;
end
process
;
GEN_RMON
:
for
I
in
0
to
g_port_mask_bits
-1
generate
-- don't need to check if decision is drop, because in NIC, drop is always wired to 0
rmon_events_o
(
I
*
g_rmon_events_pp
)
<=
rtu_valid_int
and
rtu_port_mask
(
I
)
and
rtu_rsp_ack_i
;
end
generate
;
end
behavioral
;
modules/wrsw_nic/xwrsw_nic.vhd
View file @
07a29c81
...
...
@@ -62,7 +62,8 @@ entity xwrsw_nic is
g_interface_mode
:
t_wishbone_interface_mode
:
=
CLASSIC
;
g_address_granularity
:
t_wishbone_address_granularity
:
=
WORD
;
g_src_cyc_on_stall
:
boolean
:
=
false
;
g_port_mask_bits
:
integer
:
=
32
);
--should be num_ports+1
g_port_mask_bits
:
integer
:
=
32
;
--should be num_ports+1
g_rmon_events_pp
:
integer
:
=
1
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
...
@@ -92,7 +93,12 @@ entity xwrsw_nic is
-------------------------------------------------------------------------------
wb_i
:
in
t_wishbone_slave_in
;
wb_o
:
out
t_wishbone_slave_out
wb_o
:
out
t_wishbone_slave_out
;
-------------------------------------------------------------------------------
-- RMON events
-------------------------------------------------------------------------------
rmon_events_o
:
out
std_logic_vector
(
g_port_mask_bits
*
g_rmon_events_pp
-1
downto
0
)
);
end
xwrsw_nic
;
...
...
@@ -209,7 +215,8 @@ architecture rtl of xwrsw_nic is
component
nic_tx_fsm
generic
(
g_port_mask_bits
:
integer
:
=
32
;
g_cyc_on_stall
:
boolean
:
=
false
);
g_cyc_on_stall
:
boolean
:
=
false
;
g_rmon_events_pp
:
integer
:
=
1
);
port
(
clk_sys_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
...
@@ -238,7 +245,8 @@ architecture rtl of xwrsw_nic is
bna_i
:
in
std_logic
;
buf_grant_i
:
in
std_logic
;
buf_addr_o
:
out
std_logic_vector
(
c_nic_buf_size_log2
-3
downto
0
);
buf_data_i
:
in
std_logic_vector
(
31
downto
0
));
buf_data_i
:
in
std_logic_vector
(
31
downto
0
);
rmon_events_o
:
out
std_logic_vector
(
g_port_mask_bits
*
g_rmon_events_pp
-1
downto
0
));
end
component
;
signal
rxdesc_request_next
:
std_logic
;
...
...
@@ -542,7 +550,8 @@ begin -- rtl
U_TX_FSM
:
nic_tx_fsm
generic
map
(
g_cyc_on_stall
=>
g_src_cyc_on_stall
,
g_port_mask_bits
=>
g_port_mask_bits
)
g_port_mask_bits
=>
g_port_mask_bits
,
g_rmon_events_pp
=>
g_rmon_events_pp
)
port
map
(
clk_sys_i
=>
clk_sys_i
,
rst_n_i
=>
nic_reset_n
,
...
...
@@ -576,7 +585,8 @@ begin -- rtl
bna_i
=>
tx_bna
,
buf_grant_i
=>
mem_grant_tx
,
buf_addr_o
=>
mem_addr_tx
,
buf_data_i
=>
nic_mem_rd_data
);
buf_data_i
=>
nic_mem_rd_data
,
rmon_events_o
=>
rmon_events_o
);
end
rtl
;
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