We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42a4a61 commit 48e3308Copy full SHA for 48e3308
src/cpu/controller.mlog.jinja
@@ -17,6 +17,9 @@
17
18
#% set DISPLAY = 'display1'
19
20
+ # we ONLY reset this variable if the controller is rebuilt or manually restarted
21
+ set skip_slow_init false
22
+
23
# disable the power switch, then reset
24
halt:
25
control enabled {{POWER_SWITCH}} false
@@ -60,6 +63,8 @@ reset:
60
63
set prev_proc @this
61
64
set state "reset"
62
65
66
+ jump end_slow_init equal skip_slow_init true
67
68
# disable RAM procs
69
70
set i 0
@@ -105,6 +110,10 @@ init_incr:
105
110
write {{cost}} {{COSTS}} {{loop.index0}}
106
111
#% endfor
107
112
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
108
117
# initialize peripherals
109
118
119
# text output
0 commit comments