summaryrefslogtreecommitdiff
path: root/src/abstract_hardware_model.h
diff options
context:
space:
mode:
authorAaron Barnes <[email protected]>2021-05-11 18:13:37 -0400
committerAaron Barnes <[email protected]>2021-05-11 18:13:37 -0400
commit28d056519c7f1771557f90d5b0b295b7f75c1a2d (patch)
tree33eff223f52494dfae9c7f8f243d4d3c6539526f /src/abstract_hardware_model.h
parente2b410dd117b11098e6bb88be36293afbeb5c444 (diff)
partition issue() in the shader execute stage
Diffstat (limited to 'src/abstract_hardware_model.h')
-rw-r--r--src/abstract_hardware_model.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/abstract_hardware_model.h b/src/abstract_hardware_model.h
index d70c3eb..90ae448 100644
--- a/src/abstract_hardware_model.h
+++ b/src/abstract_hardware_model.h
@@ -1316,6 +1316,12 @@ class register_set {
}
return false;
}
+ bool has_ready(bool sub_core_model, unsigned reg_id) {
+ if (!sub_core_model) return has_ready();
+ assert(reg_id < regs.size());
+ return (not regs[reg_id]->empty())
+ }
+
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
@@ -1376,6 +1382,16 @@ class register_set {
}
return ready;
}
+ warp_inst_t **get_ready(bool sub_core_model, unsigned reg_id) {
+ if (!sub_core_model)
+ return get_ready();
+ warp_inst_t **ready;
+ ready = NULL;
+ assert(reg_id < regs.size());
+ if (not regs[reg_id]->empty)
+ ready = &regs[reg_id];
+ return ready;
+ }
void print(FILE *fp) const {
fprintf(fp, "%s : @%p\n", m_name, this);