@@ -207,14 +207,15 @@ class cv32e40p_xpulp_single_hwloop_stream_directed extends cv32e40p_xpulp_hwloop
207
207
}
208
208
209
209
constraint no_imm_hwloop_setup_instr_c {
210
- use_loop_counti_inst[0 ] == 0 ;
211
- use_loop_counti_inst[1 ] == 0 ;
212
- use_loop_setupi_inst[0 ] == 0 ;
213
- use_loop_setupi_inst[ 1 ] == 0 ;
210
+ foreach ( use_loop_counti_inst[i]) {
211
+ use_loop_counti_inst[i ] == 0 ;
212
+ use_loop_setupi_inst[i ] == 0 ;
213
+ }
214
214
}
215
215
216
216
constraint num_hwloop_instr_c {
217
217
solve use_loop_endi_inst before num_hwloop_instr;
218
+ solve num_hwloop_instr before num_fill_instr_loop_ctrl_to_loop_start;
218
219
foreach (num_hwloop_instr[i]) {
219
220
// the max setting of Uimm[11:0] is 4092 however the the hwloop start label is not immediately following after cv.endi,
220
221
// there is randomize numberof instr inserted between cv.endi and hwloop start label we need to keep some buffer from
@@ -224,7 +225,11 @@ class cv32e40p_xpulp_single_hwloop_stream_directed extends cv32e40p_xpulp_hwloop
224
225
} else {
225
226
num_hwloop_instr[i] dist { 3 : = 1 , 3074 : = 5 , 4092 : = 1 } ;
226
227
}
227
- num_fill_instr_loop_ctrl_to_loop_start[i] inside { [0 : 7 ]} ;
228
+ if (num_hwloop_instr[i] > 4080 ) {
229
+ num_fill_instr_loop_ctrl_to_loop_start[i] == 0 ;
230
+ } else {
231
+ num_fill_instr_loop_ctrl_to_loop_start[i] inside { [0 : 7 ]} ;
232
+ }
228
233
}
229
234
num_fill_instr_in_loop1_till_loop0_setup == 0 ;
230
235
}
0 commit comments