Skip to content

Commit 51a5a72

Browse files
robertszczepanskikgugala
authored andcommitted
Fix magic string values and add missing device ID field
1 parent 380d308 commit 51a5a72

File tree

10 files changed

+112
-42
lines changed

10 files changed

+112
-42
lines changed

src/csr/I3CCSR.sv

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,10 @@ module I3CCSR (
801801
logic [7:0] next;
802802
logic load_next;
803803
} VENDOR_SPECIFIC_STR_LENGTH;
804+
struct packed{
805+
logic [15:0] next;
806+
logic load_next;
807+
} DATA;
804808
} DEVICE_ID_0;
805809
struct packed{
806810
struct packed{
@@ -2094,6 +2098,9 @@ module I3CCSR (
20942098
struct packed{
20952099
logic [7:0] value;
20962100
} VENDOR_SPECIFIC_STR_LENGTH;
2101+
struct packed{
2102+
logic [15:0] value;
2103+
} DATA;
20972104
} DEVICE_ID_0;
20982105
struct packed{
20992106
struct packed{
@@ -4696,8 +4703,8 @@ module I3CCSR (
46964703
assign hwif_out.PIOControl.PIO_CONTROL.ABORT.value = field_storage.PIOControl.PIO_CONTROL.ABORT.value;
46974704
assign hwif_out.I3C_EC.SecFwRecoveryIf.EXTCAP_HEADER.CAP_ID.value = 8'hc0;
46984705
assign hwif_out.I3C_EC.SecFwRecoveryIf.EXTCAP_HEADER.CAP_LENGTH.value = 16'h20;
4699-
assign hwif_out.I3C_EC.SecFwRecoveryIf.PROT_CAP_0.REC_MAGIC_STRING_0.value = 32'h4f435020;
4700-
assign hwif_out.I3C_EC.SecFwRecoveryIf.PROT_CAP_1.REC_MAGIC_STRING_1.value = 32'h52454356;
4706+
assign hwif_out.I3C_EC.SecFwRecoveryIf.PROT_CAP_0.REC_MAGIC_STRING_0.value = 32'h2050434f;
4707+
assign hwif_out.I3C_EC.SecFwRecoveryIf.PROT_CAP_1.REC_MAGIC_STRING_1.value = 32'h56434552;
47014708
// Field: I3CCSR.I3C_EC.SecFwRecoveryIf.PROT_CAP_2.REC_PROT_VERSION
47024709
always_comb begin
47034710
automatic logic [15:0] next_c;
@@ -4866,6 +4873,30 @@ module I3CCSR (
48664873
end
48674874
end
48684875
assign hwif_out.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.value = field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.value;
4876+
// Field: I3CCSR.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA
4877+
always_comb begin
4878+
automatic logic [15:0] next_c;
4879+
automatic logic load_next_c;
4880+
next_c = field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value;
4881+
load_next_c = '0;
4882+
if(decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0 && decoded_req_is_wr) begin // SW write
4883+
next_c = (field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value & ~decoded_wr_biten[31:16]) | (decoded_wr_data[31:16] & decoded_wr_biten[31:16]);
4884+
load_next_c = '1;
4885+
end else if(hwif_in.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.we) begin // HW Write - we
4886+
next_c = hwif_in.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.next;
4887+
load_next_c = '1;
4888+
end
4889+
field_combo.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.next = next_c;
4890+
field_combo.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.load_next = load_next_c;
4891+
end
4892+
always_ff @(posedge clk or negedge hwif_in.rst_ni) begin
4893+
if(~hwif_in.rst_ni) begin
4894+
field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value <= 16'h0;
4895+
end else if(field_combo.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.load_next) begin
4896+
field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value <= field_combo.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.next;
4897+
end
4898+
end
4899+
assign hwif_out.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value = field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value;
48694900
// Field: I3CCSR.I3C_EC.SecFwRecoveryIf.DEVICE_ID_1.DATA
48704901
always_comb begin
48714902
automatic logic [31:0] next_c;
@@ -9798,8 +9829,8 @@ module I3CCSR (
97989829
assign readback_array[31][7:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.EXTCAP_HEADER && !decoded_req_is_wr) ? 8'hc0 : '0;
97999830
assign readback_array[31][23:8] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.EXTCAP_HEADER && !decoded_req_is_wr) ? 16'h20 : '0;
98009831
assign readback_array[31][31:24] = '0;
9801-
assign readback_array[32][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_0 && !decoded_req_is_wr) ? 32'h4f435020 : '0;
9802-
assign readback_array[33][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_1 && !decoded_req_is_wr) ? 32'h52454356 : '0;
9832+
assign readback_array[32][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_0 && !decoded_req_is_wr) ? 32'h2050434f : '0;
9833+
assign readback_array[33][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_1 && !decoded_req_is_wr) ? 32'h56434552 : '0;
98039834
assign readback_array[34][15:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_2 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.PROT_CAP_2.REC_PROT_VERSION.value : '0;
98049835
assign readback_array[34][31:16] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_2 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.PROT_CAP_2.AGENT_CAPS.value : '0;
98059836
assign readback_array[35][7:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.PROT_CAP_3 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.PROT_CAP_3.NUM_OF_CMS_REGIONS.value : '0;
@@ -9808,7 +9839,7 @@ module I3CCSR (
98089839
assign readback_array[35][31:24] = '0;
98099840
assign readback_array[36][7:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DESC_TYPE.value : '0;
98109841
assign readback_array[36][15:8] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.value : '0;
9811-
assign readback_array[36][31:16] = '0;
9842+
assign readback_array[36][31:16] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_0.DATA.value : '0;
98129843
assign readback_array[37][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_1 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_1.DATA.value : '0;
98139844
assign readback_array[38][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_2 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_2.DATA.value : '0;
98149845
assign readback_array[39][31:0] = (decoded_reg_strb.I3C_EC.SecFwRecoveryIf.DEVICE_ID_3 && !decoded_req_is_wr) ? field_storage.I3C_EC.SecFwRecoveryIf.DEVICE_ID_3.DATA.value : '0;

src/csr/I3CCSR_covergroups.svh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,11 +1021,13 @@
10211021
endgroup
10221022
covergroup I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0_fld_cg with function sample(
10231023
input bit [8-1:0] DESC_TYPE,
1024-
input bit [8-1:0] VENDOR_SPECIFIC_STR_LENGTH
1024+
input bit [8-1:0] VENDOR_SPECIFIC_STR_LENGTH,
1025+
input bit [16-1:0] DATA
10251026
);
10261027
option.per_instance = 1;
10271028
DESC_TYPE_cp : coverpoint DESC_TYPE;
10281029
VENDOR_SPECIFIC_STR_LENGTH_cp : coverpoint VENDOR_SPECIFIC_STR_LENGTH;
1030+
DATA_cp : coverpoint DATA;
10291031

10301032
endgroup
10311033

src/csr/I3CCSR_pkg.sv

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,15 @@ package I3CCSR_pkg;
283283
logic we;
284284
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__VENDOR_SPECIFIC_STR_LENGTH__in_t;
285285

286+
typedef struct packed{
287+
logic [15:0] next;
288+
logic we;
289+
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DATA__in_t;
290+
286291
typedef struct packed{
287292
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DESC_TYPE__in_t DESC_TYPE;
288293
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__VENDOR_SPECIFIC_STR_LENGTH__in_t VENDOR_SPECIFIC_STR_LENGTH;
294+
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DATA__in_t DATA;
289295
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__in_t;
290296

291297
typedef struct packed{
@@ -1782,9 +1788,14 @@ package I3CCSR_pkg;
17821788
logic [7:0] value;
17831789
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__VENDOR_SPECIFIC_STR_LENGTH__out_t;
17841790

1791+
typedef struct packed{
1792+
logic [15:0] value;
1793+
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DATA__out_t;
1794+
17851795
typedef struct packed{
17861796
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DESC_TYPE__out_t DESC_TYPE;
17871797
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__VENDOR_SPECIFIC_STR_LENGTH__out_t VENDOR_SPECIFIC_STR_LENGTH;
1798+
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__DATA__out_t DATA;
17881799
} I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0__out_t;
17891800

17901801
typedef struct packed{

src/csr/I3CCSR_sample.svh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,19 +1218,21 @@
12181218
if (get_coverage(UVM_CVR_REG_BITS)) begin
12191219
foreach(DESC_TYPE_bit_cg[bt]) this.DESC_TYPE_bit_cg[bt].sample(data[0 + bt]);
12201220
foreach(VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt]) this.VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt].sample(data[8 + bt]);
1221+
foreach(DATA_bit_cg[bt]) this.DATA_bit_cg[bt].sample(data[16 + bt]);
12211222
end
12221223
if (get_coverage(UVM_CVR_FIELD_VALS)) begin
1223-
this.fld_cg.sample( data[7:0]/*DESC_TYPE*/ , data[15:8]/*VENDOR_SPECIFIC_STR_LENGTH*/ );
1224+
this.fld_cg.sample( data[7:0]/*DESC_TYPE*/ , data[15:8]/*VENDOR_SPECIFIC_STR_LENGTH*/ , data[31:16]/*DATA*/ );
12241225
end
12251226
endfunction
12261227

12271228
function void I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0::sample_values();
12281229
if (get_coverage(UVM_CVR_REG_BITS)) begin
12291230
foreach(DESC_TYPE_bit_cg[bt]) this.DESC_TYPE_bit_cg[bt].sample(DESC_TYPE.get_mirrored_value() >> bt);
12301231
foreach(VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt]) this.VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt].sample(VENDOR_SPECIFIC_STR_LENGTH.get_mirrored_value() >> bt);
1232+
foreach(DATA_bit_cg[bt]) this.DATA_bit_cg[bt].sample(DATA.get_mirrored_value() >> bt);
12311233
end
12321234
if (get_coverage(UVM_CVR_FIELD_VALS)) begin
1233-
this.fld_cg.sample( DESC_TYPE.get_mirrored_value() , VENDOR_SPECIFIC_STR_LENGTH.get_mirrored_value() );
1235+
this.fld_cg.sample( DESC_TYPE.get_mirrored_value() , VENDOR_SPECIFIC_STR_LENGTH.get_mirrored_value() , DATA.get_mirrored_value() );
12341236
end
12351237
endfunction
12361238

src/csr/I3CCSR_uvm.sv

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ package I3CCSR_uvm;
18041804

18051805
virtual function void build();
18061806
this.REC_MAGIC_STRING_0 = new("REC_MAGIC_STRING_0");
1807-
this.REC_MAGIC_STRING_0.configure(this, 32, 0, "RO", 0, 'h4f435020, 1, 1, 0);
1807+
this.REC_MAGIC_STRING_0.configure(this, 32, 0, "RO", 0, 'h2050434f, 1, 1, 0);
18081808
if (has_coverage(UVM_CVR_REG_BITS)) begin
18091809
foreach(REC_MAGIC_STRING_0_bit_cg[bt]) REC_MAGIC_STRING_0_bit_cg[bt] = new();
18101810
end
@@ -1834,7 +1834,7 @@ package I3CCSR_uvm;
18341834

18351835
virtual function void build();
18361836
this.REC_MAGIC_STRING_1 = new("REC_MAGIC_STRING_1");
1837-
this.REC_MAGIC_STRING_1.configure(this, 32, 0, "RO", 0, 'h52454356, 1, 1, 0);
1837+
this.REC_MAGIC_STRING_1.configure(this, 32, 0, "RO", 0, 'h56434552, 1, 1, 0);
18381838
if (has_coverage(UVM_CVR_REG_BITS)) begin
18391839
foreach(REC_MAGIC_STRING_1_bit_cg[bt]) REC_MAGIC_STRING_1_bit_cg[bt] = new();
18401840
end
@@ -1926,9 +1926,11 @@ package I3CCSR_uvm;
19261926

19271927
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0_bit_cg DESC_TYPE_bit_cg[8];
19281928
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0_bit_cg VENDOR_SPECIFIC_STR_LENGTH_bit_cg[8];
1929+
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0_bit_cg DATA_bit_cg[16];
19291930
I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0_fld_cg fld_cg;
19301931
rand uvm_reg_field DESC_TYPE;
19311932
rand uvm_reg_field VENDOR_SPECIFIC_STR_LENGTH;
1933+
rand uvm_reg_field DATA;
19321934

19331935
function new(string name = "I3CCSR__I3C_EC__SecFwRecoveryIf__DEVICE_ID_0");
19341936
super.new(name, 32, build_coverage(UVM_CVR_ALL));
@@ -1944,9 +1946,12 @@ package I3CCSR_uvm;
19441946
this.DESC_TYPE.configure(this, 8, 0, "RW", 1, 'h0, 1, 1, 0);
19451947
this.VENDOR_SPECIFIC_STR_LENGTH = new("VENDOR_SPECIFIC_STR_LENGTH");
19461948
this.VENDOR_SPECIFIC_STR_LENGTH.configure(this, 8, 8, "RW", 1, 'h0, 1, 1, 0);
1949+
this.DATA = new("DATA");
1950+
this.DATA.configure(this, 16, 16, "RW", 1, 'h0, 1, 1, 0);
19471951
if (has_coverage(UVM_CVR_REG_BITS)) begin
19481952
foreach(DESC_TYPE_bit_cg[bt]) DESC_TYPE_bit_cg[bt] = new();
19491953
foreach(VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt]) VENDOR_SPECIFIC_STR_LENGTH_bit_cg[bt] = new();
1954+
foreach(DATA_bit_cg[bt]) DATA_bit_cg[bt] = new();
19501955
end
19511956
if (has_coverage(UVM_CVR_FIELD_VALS))
19521957
fld_cg = new();

src/rdl/docs/README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ When set to 0, it holds execution of enqueued commands and runs current command
11501150

11511151
|Bits| Identifier |Access| Reset | Name |
11521152
|----|------------------|------|----------|------------------------------|
1153-
|31:0|REC_MAGIC_STRING_0| r |0x4F435020|Recovery protocol magic string|
1153+
|31:0|REC_MAGIC_STRING_0| r |0x2050434F|Recovery protocol magic string|
11541154

11551155
#### REC_MAGIC_STRING_0 field
11561156

@@ -1164,7 +1164,7 @@ When set to 0, it holds execution of enqueued commands and runs current command
11641164

11651165
|Bits| Identifier |Access| Reset | Name |
11661166
|----|------------------|------|----------|------------------------------|
1167-
|31:0|REC_MAGIC_STRING_1| r |0x52454356|Recovery protocol magic string|
1167+
|31:0|REC_MAGIC_STRING_1| r |0x56434552|Recovery protocol magic string|
11681168

11691169
#### REC_MAGIC_STRING_1 field
11701170

@@ -1270,10 +1270,11 @@ When set to 0, it holds execution of enqueued commands and runs current command
12701270
- Base Offset: 0x14
12711271
- Size: 0x4
12721272

1273-
|Bits| Identifier |Access|Reset| Name |
1274-
|----|--------------------------|------|-----|-----------------------------|
1275-
| 7:0| DESC_TYPE | rw | 0x0 | Initial descriptor type |
1276-
|15:8|VENDOR_SPECIFIC_STR_LENGTH| rw | 0x0 |Vendor Specific String Length|
1273+
| Bits| Identifier |Access|Reset| Name |
1274+
|-----|--------------------------|------|-----|-----------------------------|
1275+
| 7:0 | DESC_TYPE | rw | 0x0 | Initial descriptor type |
1276+
| 15:8|VENDOR_SPECIFIC_STR_LENGTH| rw | 0x0 |Vendor Specific String Length|
1277+
|31:16| DATA | rw | 0x0 | |
12771278

12781279
#### DESC_TYPE field
12791280

@@ -1309,6 +1310,10 @@ When set to 0, it holds execution of enqueued commands and runs current command
13091310

13101311
<p>0x0-0xFF: Total length of Vendor Specific String, 0 indicates not supported</p>
13111312

1313+
#### DATA field
1314+
1315+
1316+
13121317
### DEVICE_ID_1 register
13131318

13141319
- Absolute Address: 0x118

src/rdl/secure_firmware_recovery_interface.rdl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ regfile SecureFirmwareRecoveryInterfaceRegisters{
2828
desc = "Magic string 'OCP ' (1st part of 'OCP RECV') in ASCII code - '0x4f 0x43 0x50 0x20'";
2929
sw = r;
3030
hw = r;
31-
reset = 32'h4f435020;
31+
reset = 32'h2050434f;
3232
} REC_MAGIC_STRING_0[31:0];
3333
} PROT_CAP_0;
3434
reg {
@@ -38,7 +38,7 @@ regfile SecureFirmwareRecoveryInterfaceRegisters{
3838
desc = "Magic string 'RECV' (2nd part of 'OCP RECV') in ASCII code - '0x52 0x45 0x43 0x56'";
3939
sw = r;
4040
hw = r;
41-
reset = 32'h52454356;
41+
reset = 32'h56434552;
4242
} REC_MAGIC_STRING_1[31:0];
4343
} PROT_CAP_1;
4444
reg {
@@ -151,6 +151,14 @@ regfile SecureFirmwareRecoveryInterfaceRegisters{
151151
we = true;
152152
reset = 8'h0;
153153
} VENDOR_SPECIFIC_STR_LENGTH[15:8];
154+
field {
155+
name = "";
156+
desc = "";
157+
sw = rw;
158+
hw = rw;
159+
we = true;
160+
reset = 16'h0;
161+
} DATA[31:16];
154162
} DEVICE_ID_0;
155163
reg {
156164
name = "Device Identification 1";

src/recovery/recovery_executor.sv

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ module recovery_executor
350350
};
351351

352352
assign device_id_0 = {
353-
16'h0,
353+
hwif_rec_i.DEVICE_ID_0.DATA.value,
354354
hwif_rec_i.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.value,
355355
hwif_rec_i.DEVICE_ID_0.DESC_TYPE.value
356356
};
@@ -588,6 +588,7 @@ module recovery_executor
588588
hwif_rec_o.PROT_CAP_3.HEARTBEAT_PERIOD.we = '0;
589589
hwif_rec_o.DEVICE_ID_0.DESC_TYPE.we = '0;
590590
hwif_rec_o.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.we = '0;
591+
hwif_rec_o.DEVICE_ID_0.DATA.we = '0;
591592
hwif_rec_o.DEVICE_ID_1.DATA.we = '0;
592593
hwif_rec_o.DEVICE_ID_2.DATA.we = '0;
593594
hwif_rec_o.DEVICE_ID_3.DATA.we = '0;
@@ -682,6 +683,7 @@ module recovery_executor
682683
hwif_rec_o.DEVICE_ID_6.DATA.next = '0;
683684
hwif_rec_o.DEVICE_ID_0.DESC_TYPE.next = '0;
684685
hwif_rec_o.DEVICE_ID_0.VENDOR_SPECIFIC_STR_LENGTH.next = '0;
686+
hwif_rec_o.DEVICE_ID_0.DATA.next = '0;
685687
end
686688
// ....................................................
687689

verification/cocotb/common/reg_map.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,10 @@
726726
"VENDOR_SPECIFIC_STR_LENGTH": {
727727
"low": 8,
728728
"mask": 65280
729+
},
730+
"DATA": {
731+
"low": 16,
732+
"mask": 4294901760
729733
}
730734
},
731735
"DEVICE_ID_1": {

verification/cocotb/top/lib_i3c_top/test_recovery.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,14 @@ def make_word(bs):
519519

520520
prot_cap = [
521521
# First 8 bytes is Recovery magic string "OCP RECV"
522-
0x20, # ' '
523-
0x50, # 'P'
524-
0x43, # 'C'
525522
0x4F, # 'O'
526-
0x56, # 'V'
527523
0x43, # 'C'
528-
0x45, # 'E'
524+
0x50, # 'P'
525+
0x20, # ' '
529526
0x52, # 'R'
527+
0x45, # 'E'
528+
0x43, # 'C'
529+
0x56, # 'V'
530530
0x09,
531531
0x0A,
532532
0x0B,
@@ -617,14 +617,14 @@ def make_word(bs):
617617

618618
prot_cap = [
619619
# First 8 bytes is Recovery magic string "OCP RECV"
620-
0x20, # ' '
621-
0x50, # 'P'
622-
0x43, # 'C'
623620
0x4F, # 'O'
624-
0x56, # 'V'
625621
0x43, # 'C'
626-
0x45, # 'E'
622+
0x50, # 'P'
623+
0x20, # ' '
627624
0x52, # 'R'
625+
0x45, # 'E'
626+
0x43, # 'C'
627+
0x56, # 'V'
628628
]
629629
prot_cap += [random.randint(0, 255) for i in range(8)]
630630

@@ -694,14 +694,14 @@ def make_word(bs):
694694

695695
prot_cap = [
696696
# First 8 bytes is Recovery magic string "OCP RECV"
697-
0x20, # ' '
698-
0x50, # 'P'
699-
0x43, # 'C'
700697
0x4F, # 'O'
701-
0x56, # 'V'
702698
0x43, # 'C'
703-
0x45, # 'E'
699+
0x50, # 'P'
700+
0x20, # ' '
704701
0x52, # 'R'
702+
0x45, # 'E'
703+
0x43, # 'C'
704+
0x56, # 'V'
705705
]
706706
prot_cap += [random.randint(0, 255) for i in range(8)]
707707

@@ -813,14 +813,14 @@ def make_word(bs):
813813
# Write some data to PROT_CAP CSR
814814
prot_cap = [
815815
# First 8 bytes is Recovery magic string "OCP RECV"
816-
0x20, # ' '
817-
0x50, # 'P'
818-
0x43, # 'C'
819-
0x4F, # 'O'
820-
0x56, # 'V'
821-
0x43, # 'C'
822-
0x45, # 'E'
823-
0x52, # 'R'
816+
0x4F, # 'O'
817+
0x43, # 'C'
818+
0x50, # 'P'
819+
0x20, # ' '
820+
0x52, # 'R'
821+
0x45, # 'E'
822+
0x43, # 'C'
823+
0x56, # 'V'
824824
]
825825
prot_cap += [random.randint(0, 255) for i in range(8)]
826826

0 commit comments

Comments
 (0)