Skip to content

Commit c8a0156

Browse files
Apply suggestions from code review
Co-authored-by: Paul Donahue <[email protected]> Signed-off-by: Yazan Hussnain <[email protected]>
1 parent ab5f9b0 commit c8a0156

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

model/riscv_sys_control.sail

+3-3
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ $endif
296296

297297
/* Disable trigger firing in trap handler */
298298
function TriggerFireMatch(cur_priv : Privilege) -> bool = {
299-
/* Second solution of reenterancy problem */
299+
/* Second solution of reentrancy problem */
300300
if (sys_reent_opt1()) then {
301301
match cur_priv {
302302
Machine => bits_to_bool(tcontrol[mte]),
303303
_ => true
304304
}
305305
}
306-
/* First solution of reenterancy problem */
306+
/* First solution of reentrancy problem */
307307
else {
308308
match cur_privilege {
309309
Machine => bits_to_bool(mstatus[MIE]),
@@ -553,7 +553,7 @@ function instrDataMatch(cur_priv : Privilege, addr : xlenbits, data : xlenbits,
553553
if ((((MCtrl6[m] == 0b1) & (cur_priv == Machine)) | /* Trigger is enabled in M-mode */
554554
((MCtrl6[s] == 0b1) & (cur_priv == Supervisor)) | /* Trigger is enabled in S-mode */
555555
((MCtrl6[u] == 0b1) & (cur_priv == User)) ) & /* Trigger is enabled in U-mode */
556-
(TriggerFireMatch(cur_priv))) then { /* Trigger match valid? check re-enternacy */
556+
(TriggerFireMatch(cur_priv))) then { /* Trigger match valid? check reentranacy */
557557
match match_type {
558558
/* Check For PC or Instruction Match */
559559
INSTR_MATCH => {

model/riscv_sys_regs.sail

+7-7
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,8 @@ function legalize_medeleg(o : Medeleg, v : xlenbits) -> Medeleg = {
364364
/* M-EnvCalls delegation is not supported */
365365
let m = Mk_Medeleg(v);
366366
let m = [m with MEnvCall = 0b0];
367-
/* medeleg[3] <-> Breakpoint Exception is hard-wire to 0 for second solution
368-
of re-enterancy problem */
367+
/* medeleg[3] <-> Breakpoint Exception is hard-wired to 0 for second solution
368+
of reentrancy problem */
369369
if (sys_reent_opt1()) then { let m = [m with Breakpoint = bool_bits(not(sys_reent_opt1()))]; m } else { m }
370370
}
371371

@@ -694,7 +694,7 @@ register tselect : xlenbits
694694
/* Legalize TSELECT */
695695
function legalize_tselect(o : xlenbits, v : xlenbits) -> xlenbits = {
696696
let t : xlenbits = o;
697-
// TODO: Avoid hardcode value
697+
// TODO: Avoid hardcoded value
698698
if (unsigned(v) <= (sizeof(N_TRIGGERS) - 1)) then { v } else { t }
699699
}
700700

@@ -742,7 +742,7 @@ bitfield MatchControlType6 : bits(27) = {
742742
size : 18 .. 16,
743743
/* Trigger Action */
744744
action : 15 .. 12,
745-
/* trigger chaning */
745+
/* trigger chaining */
746746
chain : 11,
747747
/* Trigger match options */
748748
match_opt : 10 .. 7,
@@ -754,13 +754,13 @@ bitfield MatchControlType6 : bits(27) = {
754754
s : 4,
755755
/* Enable Mcontrol6 trigger in U-mode */
756756
u : 3,
757-
/* Trigger fires on the virtual address or opcode WARL
757+
/* Trigger fires on the virtual address or opcode
758758
of an instruction that is executed */
759759
execute : 2,
760-
/* Trigger fires on the virtual address or data of WARL
760+
/* Trigger fires on the virtual address or data of
761761
any store */
762762
store : 1,
763-
/* Trigger fires on the virtual address or data of WARL
763+
/* Trigger fires on the virtual address or data of
764764
any load */
765765
load : 0
766766
}

0 commit comments

Comments
 (0)