Skip to content

Commit b8e3c44

Browse files
committed
[cru] Update pack_cru_core.vhd
1 parent ec7b9f3 commit b8e3c44

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

src/Cru/Constants.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ static constexpr Register ONU_USER_LOGIC(0x0022a000);
205205
static constexpr Register ONU_USER_REFGEN(0x0022c000);
206206
static constexpr Register REFGEN0_OFFSET(0x00000000);
207207
static constexpr Register REFGEN1_OFFSET(0x00000004);
208+
static constexpr Register ONU_MGT_STICKYS(0x00222014);
208209

209210
// Registers for getting LTU info
210211
static constexpr Register LTU_HBTRIG_CNT(0x00200004);
@@ -310,6 +311,7 @@ static constexpr Register CTP_EMU_PHYSDIV(0x00280014);
310311
static constexpr Register CTP_EMU_CALDIV(0x00280020);
311312
static constexpr Register CTP_EMU_HCDIV(0x00280018);
312313
static constexpr Register CTP_EMU_FBCT(0x00280024);
314+
static constexpr Register CTP_EMU_ORBIT_INIT(0x00280028);
313315

314316
/// Registers for the Pattern Player
315317
static constexpr Register PATPLAYER_CFG(0x00260000);

src/Cru/cru_constants_populate.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'add_ctp_emu_caldiv':'CTP_EMU_CALDIV',
3838
'add_ctp_emu_hcdiv':'CTP_EMU_HCDIV',
3939
'add_ctp_emu_fbct':'CTP_EMU_FBCT',
40+
'add_ctp_emu_orbit_init':'CTP_EMU_ORBIT_INIT',
4041
'add_patplayer_cfg':'PATPLAYER_CFG',
4142
'add_patplayer_idlepat0':'PATPLAYER_IDLE_PATTERN_0',
4243
'add_patplayer_idlepat1':'PATPLAYER_IDLE_PATTERN_1',
@@ -94,6 +95,7 @@
9495
'add_ttc_eox_sox_ltu':'LTU_EOX_SOX_CNT',
9596
'add_onu_user_logic':'ONU_USER_LOGIC',
9697
'add_onu_user_refgen':'ONU_USER_REFGEN',
98+
'add_onu_mgt_stickys':'ONU_MGT_STICKYS',
9799
'add_refgen0_offset':'REFGEN0_OFFSET',
98100
'add_refgen1_offset':'REFGEN1_OFFSET',
99101
#'add_refgen2_offset':'I2C_COMMAND',

src/Cru/pack_cru_core.vhd

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
-- 20180713 JB Change adress definition for GBT register after change the Avalon
55
-- component type
66
-- Add adress definition for add_gbt_wrapper_test_control = x"0000_0008"
7+
--------------------------------------------------------------------------------------------
8+
-- NOTE: Register assignment should keep the base address on the left of the + operator
9+
-- and the extension on the left: e.g. :=add_base+X"0000_0000";
10+
711

812
library ieee;
913
use ieee.std_logic_1164.ALL;
@@ -93,12 +97,12 @@ constant add_gbt_sc : unsigned(31 downto 0):=X"00F0_0000";
9397
-------------------------------------------------------------------------------
9498
-- Redaout protocol address tables
9599
-------------------------------------------------------------------------------
96-
constant add_ro_prot_conf_reg : unsigned(31 downto 0):=X"0000_0000"+add_ro_protocol_base;
97-
constant add_ro_prot_check_mask : unsigned(31 downto 0):=X"0000_0004"+add_ro_protocol_base;
98-
constant add_ro_prot_alloc_fail : unsigned(31 downto 0):=X"0000_0008"+add_ro_protocol_base;
99-
constant add_ro_prot_ttc_linkerr : unsigned(31 downto 0):=X"0000_000C"+add_ro_protocol_base;
100-
constant add_ro_prot_nack_dly_reg : unsigned(31 downto 0):=X"0000_0010"+add_ro_protocol_base;
101-
constant add_ro_prot_system_id : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0014";
100+
constant add_ro_prot_conf_reg : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0000";
101+
constant add_ro_prot_check_mask : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0004";
102+
constant add_ro_prot_alloc_fail : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0008";
103+
constant add_ro_prot_ttc_linkerr : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_000C";
104+
constant add_ro_prot_nack_dly_reg : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0010";
105+
constant add_ro_prot_system_id : unsigned(31 downto 0):=add_ro_protocol_base+X"0000_0014";
102106

103107
-------------------------------------------------------------------------------
104108
-- GBT address tables
@@ -218,6 +222,17 @@ constant add_pon_wrapper_tx : unsigned(31 downto 0):=add_ttc_onu+X"0000_6000";
218222
constant add_onu_user_logic : unsigned(31 downto 0):=add_ttc_onu+X"0000_A000";
219223
constant add_onu_freq_meas : unsigned(31 downto 0):=add_ttc_onu+X"0000_E000";
220224

225+
-- ONU register bank
226+
constant add_onu_mode : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0000";
227+
constant add_onu_HB_offset : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0004";
228+
constant add_onu_offset_tdm_sfp_en : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0008";
229+
constant add_onu_fec_counters : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_000C";
230+
constant add_onu_fec_stickys : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0010";
231+
constant add_onu_mgt_stickys : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0014";
232+
constant add_onu_interrupts : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0018";
233+
constant add_onu_i2cmast_ctrl : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0034";
234+
constant add_onu_i2cmast_stat : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0038";
235+
constant add_onu_clk_phase_ctrl : unsigned(31 downto 0):=add_pon_wrapper_reg+X"0000_0048";
221236

222237
-- Pattern player
223238
constant add_patplayer_cfg : unsigned(31 downto 0):=add_ttc_patplayer+X"0000_0000";
@@ -252,6 +267,7 @@ constant add_ctp_emu_hcdiv : unsigned(31 downto 0):=add_ctp_emu_core
252267
constant add_ctp_emu_userbits : unsigned(31 downto 0):=add_ctp_emu_core+X"0000_001C";
253268
constant add_ctp_emu_caldiv : unsigned(31 downto 0):=add_ctp_emu_core+X"0000_0020";
254269
constant add_ctp_emu_fbct : unsigned(31 downto 0):=add_ctp_emu_core+X"0000_0024";
270+
constant add_ctp_emu_orbit_init : unsigned(31 downto 0):=add_ctp_emu_core+X"0000_0028";
255271

256272

257273
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)