diff options
| author | Julian Blake Kongslie | 2022-06-26 21:48:45 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-26 22:06:21 -0700 |
| commit | e7c2eeb6c82d5341019cbb00cfefc55c8a27f232 (patch) | |
| tree | d8293bce0cb5323133f849390e60419c16636b18 /aisa | |
| parent | Significant changes, and a working "ISA" that just computes fib(n). (diff) | |
| download | issim-e7c2eeb6c82d5341019cbb00cfefc55c8a27f232.tar.xz | |
Move a bunch of code from headers to separate compilation units.
Diffstat (limited to 'aisa')
| -rw-r--r-- | aisa/aisa.cpp | 14 | ||||
| -rw-r--r-- | aisa/aisa.h | 6 |
2 files changed, 17 insertions, 3 deletions
diff --git a/aisa/aisa.cpp b/aisa/aisa.cpp new file mode 100644 index 0000000..811c882 --- /dev/null +++ b/aisa/aisa.cpp | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #include <memory> | ||
| 2 | #include <optional> | ||
| 3 | #include <utility> | ||
| 4 | |||
| 5 | #include "aisa/aisa.h" | ||
| 6 | |||
| 7 | namespace aisa { | ||
| 8 | |||
| 9 | std::optional<std::pair<std::unique_ptr<const Step>, regval_t>> Task::step(regval_t environment_val) const { return {}; } | ||
| 10 | |||
| 11 | MemInfo Step::meminfo(const Wires &wires) const { return {}; } | ||
| 12 | void Step::evaluate(Wires &wires) const { } | ||
| 13 | |||
| 14 | } | ||
diff --git a/aisa/aisa.h b/aisa/aisa.h index 4488529..e4e1074 100644 --- a/aisa/aisa.h +++ b/aisa/aisa.h | |||
| @@ -31,7 +31,7 @@ namespace aisa { | |||
| 31 | 31 | ||
| 32 | virtual std::string disasm() const = 0; | 32 | virtual std::string disasm() const = 0; |
| 33 | 33 | ||
| 34 | virtual std::optional<std::pair<std::unique_ptr<const Step>, regval_t>> step(regval_t environment_val) const { return {}; } | 34 | virtual std::optional<std::pair<std::unique_ptr<const Step>, regval_t>> step(regval_t environment_val) const; |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | struct MemInfo { | 37 | struct MemInfo { |
| @@ -78,8 +78,8 @@ namespace aisa { | |||
| 78 | 78 | ||
| 79 | MOp mop = MOp::NONE; | 79 | MOp mop = MOp::NONE; |
| 80 | 80 | ||
| 81 | virtual MemInfo meminfo(const Wires &wires) const { return {}; } | 81 | virtual MemInfo meminfo(const Wires &wires) const; |
| 82 | virtual void evaluate(Wires &wires) const { }; | 82 | virtual void evaluate(Wires &wires) const; |
| 83 | }; | 83 | }; |
| 84 | 84 | ||
| 85 | } | 85 | } |
