Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
246f32a1
Commit
246f32a1
authored
May 13, 2019
by
Grzegorz Daniluk
1
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'greg-mirroring' into proposed_master
parents
ac150620
6935e96c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
14 deletions
+57
-14
xwrsw_rtu_new.vhd
modules/wrsw_rtu/xwrsw_rtu_new.vhd
+36
-2
scb_top_bare.vhd
top/bare_top/scb_top_bare.vhd
+13
-8
wrsw_components_pkg.vhd
top/bare_top/wrsw_components_pkg.vhd
+4
-2
wrsw_top_pkg.vhd
top/bare_top/wrsw_top_pkg.vhd
+4
-2
No files found.
modules/wrsw_rtu/xwrsw_rtu_new.vhd
View file @
246f32a1
...
...
@@ -118,6 +118,7 @@
library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
use
ieee
.
std_logic_misc
.
all
;
use
ieee
.
math_real
.
CEIL
;
use
ieee
.
math_real
.
log2
;
use
ieee
.
numeric_std
.
all
;
...
...
@@ -150,8 +151,8 @@ entity xwrsw_rtu_new is
req_i
:
in
t_rtu_request_array
(
g_num_ports
-1
downto
0
);
req_full_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
-1
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
downto
0
);
rq_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
tru_req_o
:
out
t_tru_request
;
...
...
@@ -160,6 +161,10 @@ entity xwrsw_rtu_new is
tru_enabled_i
:
in
std_logic
;
links_up_i
:
in
std_logic_vector
(
g_port_mask_bits
-1
downto
0
);
rmon_events_o
:
out
std_logic_vector
(
g_num_ports
*
g_rmon_events_bits_pp
-1
downto
0
);
aux_rsp_i
:
in
t_rtu_response
;
aux_rsp_ack_o
:
out
std_logic
;
wb_i
:
in
t_wishbone_slave_in
;
wb_o
:
out
t_wishbone_slave_out
;
int_o
:
out
std_logic
...
...
@@ -272,6 +277,9 @@ architecture behavioral of xwrsw_rtu_new is
signal
htab_src_dst
:
std_logic
;
signal
dbg_forwarded_to_port
:
std_logic_vector
(
g_num_ports
-
1
downto
0
);
signal
aux_pmask_mirroring
:
std_logic_vector
(
c_RTU_MAX_PORTS
-1
downto
0
);
signal
mirror_port_dst
:
std_logic
;
signal
mirror_port_tx
:
std_logic
;
signal
CONTROL0
:
std_logic_vector
(
35
downto
0
);
signal
TRIG0
,
TRIG1
,
TRIG2
,
TRIG3
:
std_logic_vector
(
31
downto
0
);
...
...
@@ -864,6 +872,32 @@ begin
end
process
;
end
generate
fw_gen
;
------------------------------------------------------------
-- Port mirroring handling for NIC/CPU-originated traffic --
------------------------------------------------------------
aux_rsp_ack_o
<=
rsp_ack_i
(
g_num_ports
);
rsp_o
(
g_num_ports
)
.
valid
<=
aux_rsp_i
.
valid
;
rsp_o
(
g_num_ports
)
.
prio
<=
aux_rsp_i
.
prio
;
rsp_o
(
g_num_ports
)
.
drop
<=
aux_rsp_i
.
drop
;
rsp_o
(
g_num_ports
)
.
hp
<=
aux_rsp_i
.
hp
;
-- port_mask includes at least one egress mirrored port
mirror_port_tx
<=
'1'
when
(
or_reduce
(
aux_rsp_i
.
port_mask
and
rtu_special_traffic_config
.
mirror_port_src_tx
)
/=
'0'
)
else
'0'
;
rsp_o
(
g_num_ports
)
.
port_mask
<=
aux_rsp_i
.
port_mask
when
(
rtu_special_traffic_config
.
mr_ena
=
'0'
)
else
aux_pmask_mirroring
;
-- 1. If mirrored port is in dst mask, all NIC traffic originated from ports in
-- egress mask goes also to this port.
-- 2. If a given port is in dst mask, all NIC traffic to this port is
-- suppressed
aux_pmask_mirroring
<=
aux_rsp_i
.
port_mask
or
rtu_special_traffic_config
.
mirror_port_dst
when
(
mirror_port_tx
=
'1'
)
else
aux_rsp_i
.
port_mask
and
(
not
rtu_special_traffic_config
.
mirror_port_dst
);
------------------------------------------------------------
-- CS_ICON : chipscope_icon
-- port map (
-- CONTROL0 => CONTROL0);
...
...
top/bare_top/scb_top_bare.vhd
View file @
246f32a1
...
...
@@ -438,6 +438,9 @@ architecture rtl of scb_top_bare is
signal
ep_dbg_tx_pcs_wr_array
:
t_ep_dbg_tx_pcs_array
(
g_num_ports
-1
downto
0
);
signal
ep_dbg_tx_pcs_rd_array
:
t_ep_dbg_tx_pcs_array
(
g_num_ports
-1
downto
0
);
signal
dbg_chps_id
:
std_logic_vector
(
7
downto
0
);
signal
nic_rtu_rsp
:
t_rtu_response
;
signal
nic_rtu_ack
:
std_logic
;
begin
...
...
@@ -681,17 +684,17 @@ begin
snk_o
=>
endpoint_snk_out
(
c_NUM_PORTS
),
src_i
=>
endpoint_src_in
(
c_NUM_PORTS
),
src_o
=>
endpoint_src_out
(
c_NUM_PORTS
),
rtu_dst_port_mask_o
=>
rtu_rsp
(
c_NUM_PORTS
)
.
port_mask
(
c_NUM_PORTS
downto
0
),
rtu_prio_o
=>
rtu_rsp
(
c_NUM_PORTS
)
.
prio
,
rtu_drop_o
=>
rtu_rsp
(
c_NUM_PORTS
)
.
drop
,
rtu_rsp_valid_o
=>
rtu_rsp
(
c_NUM_PORTS
)
.
valid
,
rtu_rsp_ack_i
=>
rtu_rsp_ack
(
c_NUM_PORTS
)
,
rtu_dst_port_mask_o
=>
nic_rtu_rsp
.
port_mask
(
c_NUM_PORTS
downto
0
),
rtu_prio_o
=>
nic_rtu_rsp
.
prio
,
rtu_drop_o
=>
nic_rtu_rsp
.
drop
,
rtu_rsp_valid_o
=>
nic_rtu_rsp
.
valid
,
rtu_rsp_ack_i
=>
nic_rtu_ack
,
wb_i
=>
cnx_master_out
(
c_SLAVE_NIC
),
wb_o
=>
cnx_master_in
(
c_SLAVE_NIC
),
int_o
=>
nic_irq
,
rmon_events_o
=>
nic_events
);
rtu_rsp
(
c_NUM_PORTS
)
.
hp
<=
'0'
;
nic_rtu_rsp
.
hp
<=
'0'
;
fc_rx_pause
(
c_NUM_PORTS
)
<=
c_zero_pause
;
-- no pause for NIC
ep_links_up
(
c_NUM_PORTS
)
<=
'1'
;
--for RTU responses NIC is always up
...
...
@@ -951,8 +954,8 @@ begin
rst_n_i
=>
rst_n_sys
,
--rst_n_periph,
req_i
=>
rtu_req
(
g_num_ports
-1
downto
0
),
req_full_o
=>
rtu_full
(
g_num_ports
-1
downto
0
),
rsp_o
=>
rtu_rsp
(
g_num_ports
-1
downto
0
),
rsp_ack_i
=>
rtu_rsp_ack
(
g_num_ports
-1
downto
0
),
rsp_o
=>
rtu_rsp
(
g_num_ports
downto
0
),
rsp_ack_i
=>
rtu_rsp_ack
(
g_num_ports
downto
0
),
rsp_abort_i
=>
rtu_rsp_abort
(
g_num_ports
-1
downto
0
),
-- this is request from response receiving node
rq_abort_i
=>
rtu_rq_abort
(
g_num_ports
-1
downto
0
),
-- this is request from requesting module
links_up_i
=>
ep_links_up
,
...
...
@@ -963,6 +966,8 @@ begin
tru_enabled_i
=>
tru_enabled
,
-------------------------------
rmon_events_o
=>
rtu_events
,
aux_rsp_i
=>
nic_rtu_rsp
,
aux_rsp_ack_o
=>
nic_rtu_ack
,
wb_i
=>
cnx_master_out
(
c_SLAVE_RTU
),
wb_o
=>
cnx_master_in
(
c_SLAVE_RTU
),
int_o
=>
rtu_irq
);
...
...
top/bare_top/wrsw_components_pkg.vhd
View file @
246f32a1
...
...
@@ -356,8 +356,8 @@ package wrsw_components_pkg is
rst_n_i
:
in
std_logic
;
req_i
:
in
t_rtu_request_array
(
g_num_ports
-1
downto
0
);
req_full_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
-1
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
downto
0
);
rq_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
tru_req_o
:
out
t_tru_request
;
...
...
@@ -366,6 +366,8 @@ package wrsw_components_pkg is
tru_enabled_i
:
in
std_logic
;
links_up_i
:
in
std_logic_vector
(
g_port_mask_bits
-1
downto
0
);
rmon_events_o
:
out
std_logic_vector
(
g_num_ports
*
g_rmon_events_bits_pp
-1
downto
0
);
aux_rsp_i
:
in
t_rtu_response
;
aux_rsp_ack_o
:
out
std_logic
;
wb_i
:
in
t_wishbone_slave_in
;
wb_o
:
out
t_wishbone_slave_out
;
int_o
:
out
std_logic
...
...
top/bare_top/wrsw_top_pkg.vhd
View file @
246f32a1
...
...
@@ -414,8 +414,8 @@ package wrsw_top_pkg is
rst_n_i
:
in
std_logic
;
req_i
:
in
t_rtu_request_array
(
g_num_ports
-1
downto
0
);
req_full_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
-1
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_o
:
out
t_rtu_response_array
(
g_num_ports
downto
0
);
rsp_ack_i
:
in
std_logic_vector
(
g_num_ports
downto
0
);
rq_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rsp_abort_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
tru_req_o
:
out
t_tru_request
;
...
...
@@ -424,6 +424,8 @@ package wrsw_top_pkg is
tru_enabled_i
:
in
std_logic
;
links_up_i
:
in
std_logic_vector
(
g_port_mask_bits
-1
downto
0
);
rmon_events_o
:
out
std_logic_vector
(
g_num_ports
*
g_rmon_events_bits_pp
-1
downto
0
);
aux_rsp_i
:
in
t_rtu_response
;
aux_rsp_ack_o
:
out
std_logic
;
wb_i
:
in
t_wishbone_slave_in
;
wb_o
:
out
t_wishbone_slave_out
;
int_o
:
out
std_logic
...
...
Grzegorz Daniluk
@greg.d
mentioned in issue
#1 (closed)
·
May 21, 2019
mentioned in issue
#1 (closed)
mentioned in issue #1
Toggle commit list
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