From 553346445486367799d4d67bf3537e54b7c83859 Mon Sep 17 00:00:00 2001 From: Aaron Barnes Date: Sun, 9 May 2021 13:11:39 -0400 Subject: parition CU allocation, add prints --- src/abstract_hardware_model.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/abstract_hardware_model.h') 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); -- cgit v1.3