diff options
Diffstat (limited to '')
| -rw-r--r-- | backend/regfile.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/regfile.h b/backend/regfile.h index 4cf328a..4ea2f31 100644 --- a/backend/regfile.h +++ b/backend/regfile.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include "frontend/decode.h" | 5 | #include "frontend/decode.h" |
| 6 | #include "infra/port.h" | 6 | #include "infra/port.h" |
| 7 | #include "infra/stat.h" | ||
| 7 | #include "inst.h" | 8 | #include "inst.h" |
| 8 | #include "memory/dram.h" | 9 | #include "memory/dram.h" |
| 9 | 10 | ||
| @@ -16,6 +17,8 @@ namespace backend { | |||
| 16 | infra::port<inst> writebackp; | 17 | infra::port<inst> writebackp; |
| 17 | infra::port<memory::dram::command> *storep = nullptr; | 18 | infra::port<memory::dram::command> *storep = nullptr; |
| 18 | 19 | ||
| 20 | infra::stat ipc{"ipc"}; | ||
| 21 | |||
| 19 | unsigned int generation_up = 0; | 22 | unsigned int generation_up = 0; |
| 20 | unsigned int generation_down = 0; | 23 | unsigned int generation_down = 0; |
| 21 | 24 | ||
| @@ -33,6 +36,7 @@ namespace backend { | |||
| 33 | auto i = writebackp.read(); | 36 | auto i = writebackp.read(); |
| 34 | if (i.generation == generation_down) { | 37 | if (i.generation == generation_down) { |
| 35 | pte(i.transaction, "W", fmt::format("writeback gen={} pc={:x}", generation_down, pc)); | 38 | pte(i.transaction, "W", fmt::format("writeback gen={} pc={:x}", generation_down, pc)); |
| 39 | ++ipc; | ||
| 36 | assert(pc == i.init_pc); | 40 | assert(pc == i.init_pc); |
| 37 | auto old_pc = pc; | 41 | auto old_pc = pc; |
| 38 | pc = i.linear_next_pc; | 42 | pc = i.linear_next_pc; |
