@@ -52,7 +52,10 @@ namespace olympia
52
52
vector_config_(new VectorConfig(p->init_vl, p->init_sew, p->init_lmul, p->init_vta)),
53
53
vset_blocking_count_(&unit_stat_set_, " vset_blocking_count" ,
54
54
" Number of times that the Decode unit blocks execution" ,
55
- sparta::Counter::COUNT_NORMAL)
55
+ sparta::Counter::COUNT_NORMAL),
56
+ vset_blocking_stall_latency_(&unit_stat_set_, " vset_blocking_stall_latency" ,
57
+ " Accumulated between roundtrip vset decode and processing" ,
58
+ sparta::Counter::COUNT_NORMAL)
56
59
{
57
60
initializeFusion_ ();
58
61
@@ -157,6 +160,8 @@ namespace olympia
157
160
// if rs1 != 0, VL = x[rs1], so we assume there's an STF field for VL
158
161
if (waiting_on_vset_)
159
162
{
163
+ const auto vset_block_end = getClock ()->currentCycle ();
164
+ vset_blocking_stall_latency_ += (vset_block_end - vset_block_start_);
160
165
// schedule decode, because we've been stalled on vset
161
166
waiting_on_vset_ = false ;
162
167
ev_decode_insts_event_.schedule (sparta::Clock::Cycle (0 ));
@@ -230,6 +235,8 @@ namespace olympia
230
235
else if (uid == MAVIS_UID_VSETVLI || uid == MAVIS_UID_VSETVL)
231
236
{
232
237
vset_blocking_count_++;
238
+
239
+ vset_block_start_ = getClock ()->currentCycle ();
233
240
// block for vsetvl or vsetvli when rs1 of vsetvli is NOT 0
234
241
waiting_on_vset_ = true ;
235
242
// need to indicate we want a signal sent back at execute
0 commit comments