diff options
| author | Julian Blake Kongslie | 2022-11-05 16:59:17 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-11-05 16:59:31 -0700 |
| commit | 68bdebd8cae39c30acc384664faa136aeaa9bb84 (patch) | |
| tree | 4b0c489accd2eb10af6bc359c9ee0d4b22af64ff /isa/checker.h | |
| parent | Support for more line formats in evt reader (diff) | |
| download | biggolf-68bdebd8cae39c30acc384664faa136aeaa9bb84.tar.xz | |
Add initial uarch model
Diffstat (limited to '')
| -rw-r--r-- | isa/checker.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/isa/checker.h b/isa/checker.h index 65ef8c9..30a8356 100644 --- a/isa/checker.h +++ b/isa/checker.h | |||
| @@ -37,16 +37,18 @@ struct funcmem { | |||
| 37 | } | 37 | } |
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | struct checker { | 40 | struct funcchecker { |
| 41 | unsigned int acc = 0; | 41 | unsigned int acc = 0; |
| 42 | unsigned int link = 0; | 42 | unsigned int link = 0; |
| 43 | unsigned int mq = 0; | 43 | unsigned int mq = 0; |
| 44 | unsigned int pc = 00200; | 44 | unsigned int pc = 000200; |
| 45 | std::array<std::uint_fast32_t, NUM_CTLREGS> ctlregs; | 45 | std::array<std::uint_fast32_t, NUM_CTLREGS> ctlregs; |
| 46 | std::uint64_t icount = 0; | ||
| 47 | bool interrupt = false; | ||
| 46 | iomodel &system; | 48 | iomodel &system; |
| 47 | instruction_context inst; | 49 | instruction_context inst; |
| 48 | funcmem mem; | 50 | funcmem mem; |
| 49 | checker(iomodel &system) | 51 | funcchecker(iomodel &system) |
| 50 | : system(system) | 52 | : system(system) |
| 51 | { | 53 | { |
| 52 | ctlregs.fill(0); | 54 | ctlregs.fill(0); |
| @@ -54,6 +56,6 @@ struct checker { | |||
| 54 | } | 56 | } |
| 55 | void execute(); | 57 | void execute(); |
| 56 | bool done() { | 58 | bool done() { |
| 57 | return ctlregs[HALTED] && system.done(); | 59 | return ctlregs[HALTED] && system.done(icount); |
| 58 | } | 60 | } |
| 59 | }; | 61 | }; |
