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
02e56a36
Commit
02e56a36
authored
Mar 19, 2024
by
Harvey Leicester
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added sfp control to bare top
parent
4d6eacda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
12 deletions
+69
-12
scb_top_bare.vhd
top/bare_top/scb_top_bare.vhd
+48
-6
wrs_sdb_pkg.vhd
top/bare_top/wrs_sdb_pkg.vhd
+21
-6
No files found.
top/bare_top/scb_top_bare.vhd
View file @
02e56a36
...
...
@@ -65,7 +65,8 @@ entity scb_top_bare is
g_with_muxed_CS
:
boolean
:
=
false
;
g_with_watchdog
:
boolean
:
=
false
;
g_inj_per_EP
:
std_logic_vector
(
17
downto
0
)
:
=
(
others
=>
'0'
);
g_phy_lpcalib
:
t_bool_array
(
0
to
17
)
:
=
c_BOOL_FALSE_ARRAY
g_phy_lpcalib
:
t_bool_array
(
0
to
17
)
:
=
c_BOOL_FALSE_ARRAY
;
g_rtcpu_swap_host_endian
:
boolean
:
=
true
);
port
(
sys_rst_n_i
:
in
std_logic
;
-- global reset
...
...
@@ -191,7 +192,15 @@ entity scb_top_bare is
i2c_sda_oen_o
:
out
std_logic_vector
(
2
downto
0
);
i2c_sda_o
:
out
std_logic_vector
(
2
downto
0
);
i2c_sda_i
:
in
std_logic_vector
(
2
downto
0
)
:
=
"111"
;
--sfp i2c ports
sfp_i2c_scl_oen_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
sfp_i2c_scl_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
sfp_i2c_scl_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
sfp_i2c_sda_oen_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
sfp_i2c_sda_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
sfp_i2c_sda_i
:
in
std_logic_vector
(
g_num_ports
-1
downto
0
);
rts_si57x_scl_oen_o
:
out
std_logic
;
rts_si57x_sda_oen_o
:
out
std_logic
;
rts_si57x_scl_i
:
in
std_logic
;
...
...
@@ -217,15 +226,13 @@ entity scb_top_bare is
rts_gpio_o
:
out
std_logic_vector
(
7
downto
0
);
rts_gpio_i
:
in
std_logic_vector
(
7
downto
0
)
);
end
scb_top_bare
;
architecture
rtl
of
scb_top_bare
is
constant
c_GW_VERSION
:
std_logic_vector
(
31
downto
0
)
:
=
x"20_02_14_00"
;
--DD_MM_YY_VV
constant
c_NUM_WB_SLAVES
:
integer
:
=
1
5
;
constant
c_NUM_WB_SLAVES
:
integer
:
=
1
6
;
constant
c_NUM_PORTS
:
integer
:
=
g_num_ports
;
constant
c_MAX_PORTS
:
integer
:
=
18
;
constant
c_NUM_GL_PAUSE
:
integer
:
=
2
;
-- number of output global PAUSE sources for SWcore
...
...
@@ -258,6 +265,7 @@ architecture rtl of scb_top_bare is
constant
c_SLAVE_HWIU
:
integer
:
=
12
;
constant
c_SLAVE_WDOG
:
integer
:
=
13
;
constant
c_SLAVE_SWC
:
integer
:
=
14
;
constant
c_SLAVE_SFP
:
integer
:
=
15
;
--constant c_SLAVE_DUMMY : integer := 13;
...
...
@@ -592,7 +600,8 @@ begin
g_num_ext_clks
=>
2
,
g_simulation
=>
g_simulation
,
g_phy_lpcalib
=>
g_phy_lpcalib
,
g_with_si57x
=>
true
)
g_with_si57x
=>
false
,
g_cpu_swap_host_endian
=>
g_rtcpu_swap_host_endian
)
port
map
(
clk_ref_i
=>
clk_ref_i
,
clk_sys_i
=>
clk_sys_i
,
...
...
@@ -1274,5 +1283,38 @@ begin
wrfreg_src_in
<=
swc_snk_out
;
swc_snk_in
<=
wrfreg_src_out
;
end
generate
;
U_sfp_ctrl
:
entity
work
.
xwr_sfp_ctrl
generic
map
(
g_num_sfp
=>
g_num_ports
)
port
map
(
clk_i
=>
clk_sys_i
,
rst_n_i
=>
rst_n_periph
,
--sfp i2c
scl_pad_i
=>
sfp_i2c_scl_i
,
scl_pad_o
=>
sfp_i2c_scl_o
,
scl_padoen_o
=>
sfp_i2c_scl_oen_o
,
sda_pad_i
=>
sfp_i2c_sda_i
,
sda_pad_o
=>
sfp_i2c_sda_o
,
sda_padoen_o
=>
sfp_i2c_sda_oen_o
,
--sfp gpio (unused on afcz)
detect_i
=>
(
others
=>
'0'
),
tx_fault_i
=>
(
others
=>
'0'
),
los_i
=>
(
others
=>
'0'
),
tx_diable_o
=>
open
,
led_mode_o
=>
open
,
led_synced_o
=>
open
,
--wb
slave_i
=>
cnx_master_out
(
c_SLAVE_SFP
),
slave_o
=>
cnx_master_in
(
c_SLAVE_SFP
)
);
end
rtl
;
top/bare_top/wrs_sdb_pkg.vhd
View file @
02e56a36
...
...
@@ -268,7 +268,21 @@ package wrs_sdb_pkg is
date
=>
x"20160810"
,
name
=>
"WR-urv-boot-regs "
)));
constant
c_xwr_sfp_ctrl_sdb
:
t_sdb_device
:
=
(
abi_class
=>
x"0000"
,
abi_ver_major
=>
x"01"
,
abi_ver_minor
=>
x"01"
,
wbd_endian
=>
c_sdb_endian_big
,
wbd_width
=>
x"7"
,
sdb_component
=>
(
addr_first
=>
x"0000000000000000"
,
addr_last
=>
x"00000000000000ff"
,
product
=>
(
vendor_id
=>
x"000000000000CE42"
,
-- CERN
device_id
=>
x"3bc71ab5"
,
-- echo -n "xwr_sfp_ctrl" | md5sum - | cut -c1-8
version
=>
x"00000001"
,
date
=>
x"20240310"
,
name
=>
"WR-SFP-controller "
)));
-- RT subsystem crossbar
constant
c_rtbar_layout
:
t_sdb_record_array
(
10
downto
0
)
:
=
...
...
@@ -314,7 +328,7 @@ package wrs_sdb_pkg is
f_xwb_bridge_layout_sdb
(
true
,
c_epbar_layout
,
c_epbar_sdb_address
);
-- WRS main crossbar
constant
c_layout
:
t_sdb_record_array
(
1
4
+
4
downto
0
)
:
=
constant
c_layout
:
t_sdb_record_array
(
1
5
+
4
downto
0
)
:
=
(
0
=>
f_sdb_embed_bridge
(
c_rtbar_bridge_sdb
,
x"00000000"
),
--RT subsystem
1
=>
f_sdb_embed_device
(
c_xwr_nic_sdb
,
x"00020000"
),
--NIC
2
=>
f_sdb_embed_bridge
(
c_epbar_bridge_sdb
,
x"00030000"
),
--Endpoints
...
...
@@ -330,10 +344,11 @@ package wrs_sdb_pkg is
12
=>
f_sdb_embed_device
(
c_xwrsw_hwiu_sdb
,
x"00059000"
),
--HWIU
13
=>
f_sdb_embed_device
(
c_xwrsw_watchdog_sdb
,
x"0005a000"
),
--Watchdog
14
=>
f_sdb_embed_device
(
c_xswc_swcore_sdb
,
x"0005b000"
),
--SWcore
15
=>
f_sdb_embed_repo_url
(
c_sdb_repo_url
),
16
=>
f_sdb_embed_synthesis
(
c_sdb_top_syn_info
),
17
=>
f_sdb_embed_synthesis
(
c_sdb_general_cores_syn_info
),
18
=>
f_sdb_embed_synthesis
(
c_sdb_wr_cores_syn_info
));
15
=>
f_sdb_embed_device
(
c_xwr_sfp_ctrl_sdb
,
x"0005c000"
),
--SFP Ctrl
16
=>
f_sdb_embed_repo_url
(
c_sdb_repo_url
),
17
=>
f_sdb_embed_synthesis
(
c_sdb_top_syn_info
),
18
=>
f_sdb_embed_synthesis
(
c_sdb_general_cores_syn_info
),
19
=>
f_sdb_embed_synthesis
(
c_sdb_wr_cores_syn_info
));
constant
c_sdb_address
:
t_wishbone_address
:
=
x"00070000"
;
end
wrs_sdb_pkg
;
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