summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorAaron Barnes <[email protected]>2021-05-09 13:11:39 -0400
committerAaron Barnes <[email protected]>2021-05-09 13:11:39 -0400
commit553346445486367799d4d67bf3537e54b7c83859 (patch)
tree3246c6b2f4c5f06b08250fd6b1ee63f08fb93231 /src/abstract_hardware_model.h
parent1ee03f0116511ac3c2d6ac7688d916191f4f0a6b (diff)
parition CU allocation, add prints
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index c012de0..636052a 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -1315,7 +1315,17 @@ class register_set {
}
return false;
}
-
+ unsigned get_ready_reg_id() {
+ // for sub core model we need to figure which reg_id has the ready warp
+ // this function should only be called if has_ready() was true
+ assert(has_ready());
+ for (unsigned i = 0; i < regs.size(); i++) {
+ if (not regs[i]->empty()) {
+ return i;
+ }
+ }
+ abort();
+ }
void move_in(warp_inst_t *&src) {
warp_inst_t **free = get_free();
move_warp(*free, src);