Skip to content

Commit f5b8106

Browse files
committed
Temporarily revert "[roc] Update SC registers"
This reverts commit 6ab776e.
1 parent 1e3d94f commit f5b8106

File tree

3 files changed

+53
-41
lines changed

3 files changed

+53
-41
lines changed

include/ReadoutCard/Cru.h

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

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

57-
static constexpr Register SCA_RD_MON(0x00f0001c); // unused
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);
5861

5962
static constexpr Register SCA_MFT_PSU_DATA(0x00f00000);
6063
static constexpr Register SCA_MFT_PSU_CMD(0x00f00004);
@@ -63,19 +66,19 @@ static constexpr Register SCA_MFT_PSU_RESET(0x00f0000c);
6366
static constexpr Register SCA_MFT_PSU_MASTER_SLAVE(0x00f0003c);
6467

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

68-
static constexpr Register IC_DATA(0x00f00010);
69-
static constexpr Register IC_CFG(0x00f00014);
70-
static constexpr Register IC_CMD(0x00f00018);
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);
7174

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);
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);
7678

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

8184
} // namespace Cru

src/Cru/cru_constants_populate.py

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

115115
### SCA ###
116116
'add_gbt_sc':'SC_BASE_INDEX',
117-
'add_gbt_sca_data':'SCA_DATA',
118-
'add_gbt_sca_cmd':'SCA_CMD',
119-
'add_gbt_sca_ctr':'SCA_CTRL',
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',
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',
121124
'add_gbt_sca_rd_mon':'SCA_RD_MON',
122125

123126
'add_gbt_sc_link':'SC_LINK',
124127
'add_gbt_sc_rst':'SC_RESET',
125128

126-
### IC ###
127-
'add_gbt_ic_data':'IC_DATA',
128-
'add_gbt_ic_cfg':'IC_CFG',
129-
'add_gbt_ic_cmd':'IC_CMD',
130-
131129
### 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',
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',
133+
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',
135137

136138
'add_gbt_swt_cmd':'SWT_CMD',
137139
'add_gbt_swt_mon':'SWT_MON',

src/Cru/pack_cru_core.vhd

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,27 +150,34 @@ 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
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";
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";
157161
constant add_gbt_sca_rd_mon : unsigned(31 downto 0):=add_gbt_sc+X"0000_001c";
158-
159162
-- IC
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-
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";
164168
-- SWT
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";
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";
171178
--
172179
constant add_gbt_sc_link : unsigned(31 downto 0):=add_gbt_sc+X"0000_0078";
173-
constant add_gbt_sc_rst : unsigned(31 downto 0):=add_gbt_sc+X"0000_000c";
180+
constant add_gbt_sc_rst : unsigned(31 downto 0):=add_gbt_sc+X"0000_007c";
174181

175182
-------------------------------------------------------------------------------
176183
-- TTC PON address tables

0 commit comments

Comments
 (0)