Skip to content

Commit 0be7249

Browse files
committed
[sw,otbn] Re-enable secAdd for OTBN smoke test
Signed-off-by: Hakim Filali <hfilali@lowrisc.org>
1 parent 166f095 commit 0be7249

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

hw/ip/otbn/dv/smoke/smoke_expected.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ x26 | 0x00000016
3535
x27 | 0x0000001a
3636
x28 | 0x00400000
3737
x29 | 0x00018000
38-
x30 | 0x53bcb7d3
38+
x30 | 0x6666e247
3939
x31 | 0x00000804
4040

4141
Final Bignum Register Values:
@@ -71,5 +71,5 @@ w26 | 0x78fccc06_2228e9d6_89c9b54f_887cf1ee_efbafabd_f9bfd9ee_baeebbbb_dbff9bfa
7171
w27 | 0x28a88802_00088990_8888a00a_88189108_828aa820_09981808_8822aa2a_11109898
7272
w28 | 0xd25666ac_bbb1704f_23631fe5_11e568d7_6d30528f_f027c1f7_32cc1191_caef0343
7373
w29 | 0x4f0d4b81_9f24f0c1_64341d3c_26628bdb_5763bcdf_63388709_e0654fef_eb0953c2
74-
w30 | 0x2167f87d_e9ee7ac7_ffa3d88b_ab123192_aee49292_4efa2ec9_b55098e0_68ba2fa1
75-
w31 | 0x37adadae_f9dbff5e_73880075_5466a52c_67a8c221_6978ad1b_25769434_0f09b7c8
74+
w30 | 0xeab5192a_c66056ea_d01920da_6b459552_7e1ad0f8_dd117584_0d51b950_82bd781e
75+
w31 | 0xe513764e_b5fbfd17_96234583_2fe89705_e6f5de00_5973fe73_e0ea6886_09c52b85

hw/ip/otbn/dv/smoke/smoke_test.s

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,17 +372,16 @@ bn.wsrr w13, MAI_IN0_S1
372372
bn.wsrr w14, MAI_IN1_S0
373373
bn.wsrr w15, MAI_IN1_S1
374374

375-
# TODO: uncomment the code below once the OTBNsim model of MAI is aligned with the RTL implementation.
376375
# Execute SecAdd on MAI
377-
# li x30, 0x2f
378-
# csrrw x0, MAI_CTRL, x30
376+
li x30, 0x2f
377+
csrrw x0, MAI_CTRL, x30
379378

380379
# Poll for completion of MAI execution
381-
# jal x1, mai_poll_busy
380+
jal x1, mai_poll_busy
382381

383382
# Read back results from MAI
384-
# bn.wsrr w30, MAI_RES_S0
385-
# bn.wsrr w31, MAI_RES_S1
383+
bn.wsrr w30, MAI_RES_S0
384+
bn.wsrr w31, MAI_RES_S1
386385

387386
# Read from URND in the OTBN Verilator smoke test and 0x0 when running on the FPGA or chip-level test
388387
.ifnotdef deterministic

sw/device/tests/otbn_isa_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static const otbn_addr_t kWdrState = OTBN_ADDR_T_INIT(smoke_test, wdr_state);
3131
enum {
3232
kNumExpectedGprs = 30,
3333
kNumExpectedWdrs = 32,
34-
kExpectedInstrCount = 299,
34+
kExpectedInstrCount = 317,
3535
};
3636

3737
// The expected values of the GPRs and WDRs are taken from

0 commit comments

Comments
 (0)