summaryrefslogtreecommitdiff
path: root/eater_cpu/cpp/Veater_computer__main.cpp
diff options
context:
space:
mode:
authoruvok2026-01-22 20:46:11 +0100
committeruvok2026-01-22 20:46:11 +0100
commite99939491820df300a6179719d807f810e7f1680 (patch)
tree1712d3bd2e92de92a76e7575417aeb600b1871d7 /eater_cpu/cpp/Veater_computer__main.cpp
parent53a87c78df525068ea0d850676bea2a41fcd7bc5 (diff)
eater: PC inc included, decode on negedgemain
Some cycles can be saved. As previously (wrongly) committed, the PC can be incremented early, but the decoder needs to do this "early", so as now implemented, on the falling clock adge already.
Diffstat (limited to 'eater_cpu/cpp/Veater_computer__main.cpp')
-rw-r--r--eater_cpu/cpp/Veater_computer__main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/eater_cpu/cpp/Veater_computer__main.cpp b/eater_cpu/cpp/Veater_computer__main.cpp
index b4cd413..40b39b3 100644
--- a/eater_cpu/cpp/Veater_computer__main.cpp
+++ b/eater_cpu/cpp/Veater_computer__main.cpp
@@ -22,11 +22,12 @@ void load_program(const std::unique_ptr<Veater_computer> &topp) {
0x1e,
// ADD 15
0x2f,
- // SUB 13
- 0x3d,
// STA 12
0x4c,
-
+ // SUB 13
+ 0x3d,
+ // STA 11
+ 0x4b,
// OUT
0xe0,
// LDI 4