Skip to content

Commit 48e3308

Browse files
committed
Skip disabling ram, initializing incr, and populating lookup tables on subsequent startups
1 parent 42a4a61 commit 48e3308

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cpu/controller.mlog.jinja

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
#% set DISPLAY = 'display1'
1919

20+
# we ONLY reset this variable if the controller is rebuilt or manually restarted
21+
set skip_slow_init false
22+
2023
# disable the power switch, then reset
2124
halt:
2225
control enabled {{POWER_SWITCH}} false
@@ -60,6 +63,8 @@ reset:
6063
set prev_proc @this
6164
set state "reset"
6265

66+
jump end_slow_init equal skip_slow_init true
67+
6368
# disable RAM procs
6469

6570
set i 0
@@ -105,6 +110,10 @@ init_incr:
105110
write {{cost}} {{COSTS}} {{loop.index0}}
106111
#% endfor
107112

113+
# ^ all of this only needs to run once, so skip it on subsequent runs to make startup faster
114+
set skip_slow_init true
115+
end_slow_init:
116+
108117
# initialize peripherals
109118

110119
# text output

0 commit comments

Comments
 (0)