summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorAaron M Barnes <[email protected]>2021-05-09 14:42:29 -0400
committerAaron M Barnes <[email protected]>2021-05-09 14:42:29 -0400
commitb67288046af824a88f8bb94541ded14cc711ef35 (patch)
tree03d12fefa418c269a78a324aa658b92c5b108897 /src/abstract_hardware_model.h
parent46423a22b7c11663e4849dbd3bb77f2d530f6907 (diff)
validated collector unit partitioning based on scheduler
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index 4d2bb4c..ba32358 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -1320,12 +1320,24 @@ class register_set {
// 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());
+ warp_inst_t **ready;
+ ready = NULL;
+ unsigned reg_id;
for (unsigned i = 0; i < regs.size(); i++) {
if (not regs[i]->empty()) {
- return i;
+ if (ready and (*ready)->get_uid() < regs[i]->get_uid()) {
+ // ready is oldest
+ } else {
+ ready = &regs[i];
+ reg_id = i;
+ }
}
}
- abort();
+ return reg_id;
+ }
+ unsigned get_schd_id(unsigned reg_id) {
+ assert(not regs[reg_id]->empty());
+ return regs[reg_id]->get_schd_id();
}
void move_in(warp_inst_t *&src) {
warp_inst_t **free = get_free();