Skip to content

Commit 6ab776e

Browse files
committed
[roc] Update SC registers
1 parent e36189f commit 6ab776e

File tree

3 files changed

+41
-53
lines changed

3 files changed

+41
-53
lines changed

include/ReadoutCard/Cru.h

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,11 @@ namespace ScRegisters
5050
{
5151
static constexpr Register SC_BASE_INDEX(0x00f00000);
5252

53-
static constexpr Register SCA_WR_DATA(0x00f00000);
54-
static constexpr Register SCA_WR_CMD(0x00f00004);
55-
static constexpr Register SCA_WR_CTRL(0x00f00008);
53+
static constexpr Register SCA_DATA(0x00f00000);
54+
static constexpr Register SCA_CMD(0x00f00004);
55+
static constexpr Register SCA_CTRL(0x00f00008);
5656

57-
static constexpr Register SCA_RD_DATA(0x00f00010);
58-
static constexpr Register SCA_RD_CMD(0x00f00014);
59-
static constexpr Register SCA_RD_CTRL(0x00f00018);
60-
static constexpr Register SCA_RD_MON(0x00f0001c);
57+
static constexpr Register SCA_RD_MON(0x00f0001c); // unused
6158

6259
static constexpr Register SCA_MFT_PSU_DATA(0x00f00000);
6360
static constexpr Register SCA_MFT_PSU_CMD(0x00f00004);
@@ -66,19 +63,19 @@ static constexpr Register SCA_MFT_PSU_RESET(0x00f0000c);
6663
static constexpr Register SCA_MFT_PSU_MASTER_SLAVE(0x00f0003c);
6764

6865
static constexpr Register SC_LINK(0x00f00078);
69-
static constexpr Register SC_RESET(0x00f0007c);
66+
static constexpr Register SC_RESET(0x00f0000c);
7067

71-
static constexpr Register SWT_WR_WORD_L(0x00f00040);
72-
static constexpr Register SWT_WR_WORD_M(0x00f00044);
73-
static constexpr Register SWT_WR_WORD_H(0x00f00048);
68+
static constexpr Register IC_DATA(0x00f00010);
69+
static constexpr Register IC_CFG(0x00f00014);
70+
static constexpr Register IC_CMD(0x00f00018);
7471

75-
static constexpr Register SWT_RD_WORD_L(0x00f00050);
76-
static constexpr Register SWT_RD_WORD_M(0x00f00054);
77-
static constexpr Register SWT_RD_WORD_H(0x00f00058);
72+
static constexpr Register SWT_WORD_L(0x00f00020);
73+
static constexpr Register SWT_WORD_M(0x00f00024);
74+
static constexpr Register SWT_WORD_H(0x00f00028);
75+
static constexpr Register SWT_MON(0x00f00030);
7876

79-
static constexpr Register SWT_CMD(0x00f0004c);
80-
static constexpr Register SWT_MON(0x00f0005c);
81-
static constexpr Register SWT_WORD_MON(0x00f00060);
77+
static constexpr Register SWT_CMD(0x00f0004c); // unused
78+
static constexpr Register SWT_WORD_MON(0x00f00034); // unused
8279
} // namespace ScRegisters
8380

8481
} // namespace Cru

src/Cru/cru_constants_populate.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,26 +114,24 @@
114114

115115
### SCA ###
116116
'add_gbt_sc':'SC_BASE_INDEX',
117-
'add_gbt_sca_wr_data':'SCA_WR_DATA',
118-
'add_gbt_sca_wr_cmd':'SCA_WR_CMD',
119-
'add_gbt_sca_wr_ctr':'SCA_WR_CTRL',
117+
'add_gbt_sca_data':'SCA_DATA',
118+
'add_gbt_sca_cmd':'SCA_CMD',
119+
'add_gbt_sca_ctr':'SCA_CTRL',
120120

121-
'add_gbt_sca_rd_data':'SCA_RD_DATA',
122-
'add_gbt_sca_rd_cmd':'SCA_RD_CMD',
123-
'add_gbt_sca_rd_ctr':'SCA_RD_CTRL',
124121
'add_gbt_sca_rd_mon':'SCA_RD_MON',
125122

126123
'add_gbt_sc_link':'SC_LINK',
127124
'add_gbt_sc_rst':'SC_RESET',
128125

129-
### SWT ###
130-
'add_gbt_swt_wr_l':'SWT_WR_WORD_L',
131-
'add_gbt_swt_wr_m':'SWT_WR_WORD_M',
132-
'add_gbt_swt_wr_h':'SWT_WR_WORD_H',
126+
### IC ###
127+
'add_gbt_ic_data':'IC_DATA',
128+
'add_gbt_ic_cfg':'IC_CFG',
129+
'add_gbt_ic_cmd':'IC_CMD',
133130

134-
'add_gbt_swt_rd_l':'SWT_RD_WORD_L',
135-
'add_gbt_swt_rd_m':'SWT_RD_WORD_M',
136-
'add_gbt_swt_rd_h':'SWT_RD_WORD_H',
131+
### SWT ###
132+
'add_gbt_swt_l':'SWT_WORD_L',
133+
'add_gbt_swt_m':'SWT_WORD_M',
134+
'add_gbt_swt_h':'SWT_WORD_H',
137135

138136
'add_gbt_swt_cmd':'SWT_CMD',
139137
'add_gbt_swt_mon':'SWT_MON',

src/Cru/pack_cru_core.vhd

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -150,34 +150,27 @@ constant add_gbt_link_rx_ctrl_offset : unsigned(31 downto 0) := x"0000_003C";
150150
-- GBTSC address tables
151151
-------------------------------------------------------------------------------
152152
-- GBTSCA wrapper pages
153-
-- SCA WR
154-
constant add_gbt_sca_wr_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0000";
155-
constant add_gbt_sca_wr_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_0004";
156-
constant add_gbt_sca_wr_ctr : unsigned(31 downto 0):=add_gbt_sc+X"0000_0008";
157-
-- SCA RD
158-
constant add_gbt_sca_rd_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0010";
159-
constant add_gbt_sca_rd_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_0014";
160-
constant add_gbt_sca_rd_ctr : unsigned(31 downto 0):=add_gbt_sc+X"0000_0018";
153+
-- SCA
154+
constant add_gbt_sca_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0000";
155+
constant add_gbt_sca_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_0004";
156+
constant add_gbt_sca_ctr : unsigned(31 downto 0):=add_gbt_sc+X"0000_0008";
161157
constant add_gbt_sca_rd_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_001c";
158+
162159
-- IC
163-
constant add_gbt_ic_wr_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0020";
164-
constant add_gbt_ic_wr_cfg : unsigned(31 downto 0):=add_gbt_sc+X"0000_0024";
165-
constant add_gbt_ic_wr_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_0028";
166-
--
167-
constant add_gbt_ic_rd_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0030";
160+
constant add_gbt_ic_data : unsigned(31 downto 0):=add_gbt_sc+X"0000_0010";
161+
constant add_gbt_ic_cfg : unsigned(31 downto 0):=add_gbt_sc+X"0000_0014";
162+
constant add_gbt_ic_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_0018";
163+
168164
-- SWT
169-
constant add_gbt_swt_wr_l : unsigned(31 downto 0):=add_gbt_sc+X"0000_0040";
170-
constant add_gbt_swt_wr_m : unsigned(31 downto 0):=add_gbt_sc+X"0000_0044";
171-
constant add_gbt_swt_wr_h : unsigned(31 downto 0):=add_gbt_sc+X"0000_0048";
172-
constant add_gbt_swt_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_004c";
173-
constant add_gbt_swt_rd_l : unsigned(31 downto 0):=add_gbt_sc+X"0000_0050";
174-
constant add_gbt_swt_rd_m : unsigned(31 downto 0):=add_gbt_sc+X"0000_0054";
175-
constant add_gbt_swt_rd_h : unsigned(31 downto 0):=add_gbt_sc+X"0000_0058";
176-
constant add_gbt_swt_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_005c";
177-
constant add_gbt_swt_word_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_0060";
165+
constant add_gbt_swt_l : unsigned(31 downto 0):=add_gbt_sc+X"0000_0020";
166+
constant add_gbt_swt_m : unsigned(31 downto 0):=add_gbt_sc+X"0000_0024";
167+
constant add_gbt_swt_h : unsigned(31 downto 0):=add_gbt_sc+X"0000_0028";
168+
constant add_gbt_swt_cmd : unsigned(31 downto 0):=add_gbt_sc+X"0000_004c";
169+
constant add_gbt_swt_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_0030";
170+
constant add_gbt_swt_word_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_0034";
178171
--
179172
constant add_gbt_sc_link : unsigned(31 downto 0):=add_gbt_sc+X"0000_0078";
180-
constant add_gbt_sc_rst : unsigned(31 downto 0):=add_gbt_sc+X"0000_007c";
173+
constant add_gbt_sc_rst : unsigned(31 downto 0):=add_gbt_sc+X"0000_000c";
181174

182175
-------------------------------------------------------------------------------
183176
-- TTC PON address tables

0 commit comments

Comments
 (0)