|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
The whole run's mutable state, threaded through the phase helpers. More...
#include <emu_run_internal.h>
Data Fields | |
| const emu_run_cfg_t * | cfg |
| Setup products (engine, image, CLI knobs). | |
| run_guards_t | guards |
| Env-tunable budgets + stop conditions. | |
| uint16_t | panel_w |
| Firmware render width in pixels. | |
| uint16_t | panel_h |
| Firmware render height in pixels. | |
| uint16_t | disp_w |
| Displayed width (rotation-swapped). | |
| uint16_t | disp_h |
| Displayed height (rotation-swapped). | |
| uint16_t | comp_w |
| Composite (panel + sidebar) width. | |
| uint16_t | comp_h |
| Composite (panel + sidebar) height. | |
| emu_presentation_workspace_t * | presentation |
| Owned raw-fd presentation surface. | |
| board_view_storage_t | view_storage |
| Caller-owned live-view handle storage. | |
| board_view_t * | view |
| Live window (NULL when headless). | |
| board_overlay_btn_t | click_btn |
| Classified –click target button. | |
| bool | click_was_tab |
| –click landed on a console tab. | |
| int | reboot_count |
| –reboot warm reboots remaining. | |
| uint32_t | run_pc |
| Current resume PC. | |
| uint32_t | chunks |
| Outer chunks executed so far. | |
| uint32_t | last_boot_chunk |
| Chunk of the last (re)boot. | |
| uint32_t | settle_left |
| Post-click drain countdown. | |
| uint32_t | rec_frames |
| –record frames written. | |
| uint32_t | prof_idle_run |
| Consecutive profiler-idle chunks. | |
| uint32_t | idle_run |
| Consecutive steady-idle chunks. | |
| uint32_t | usb_stop_run |
| USB device settle countup. | |
| uint32_t | usbh_stop_run |
| USB host settle countup. | |
| uint64_t | prof_idle_prev_i |
| Prior total insns (profiler). | |
| uint64_t | idle_sig_prev |
| Prior idle-signature sum. | |
| uint64_t | last_present_us |
| wall-us of the last live present. | |
| uint32_t | prof_prev_pc |
| PC charged by the wall profiler. | |
| double | prof_prev_t |
| Start time of the prior chunk. | |
| clock_t | t0 |
| CPU-time origin for the guard. | |
| uc_err | err |
| Latest uc_emu_start status. | |
| bool | prof_stopped |
| Profiler stop fired. | |
| bool | idle_stopped |
| Idle steady-state stop fired. | |
| bool | usb_stopped |
| USB / banner early stop fired. | |
| bool | stop_sym_hit |
| –stop-sym threshold reached. | |
| bool | timed_out |
| Wall-clock guard fired. | |
| bool | closed |
| Live window was closed. | |
| bool | button_fired |
| Headless click button fired once. | |
| bool | slider_grab |
| Battery slider grabbed by a drag. | |
| board_overlay_btn_t | held_btn |
| SW held down (released on up). | |
The whole run's mutable state, threaded through the phase helpers.
One bundle of the setup products (config, guards, presentation geometry + streamed surface, click classification) plus every loop counter mutates, so the loop body and the run-end finalizer become small phase helpers over st-> instead of one 500-line function over three dozen locals. Field semantics are unchanged from the pre-split locals.
cfg and guards are fixed once ::run_loop_setup returns; the counter fields advance monotonically across the loop. Definition at line 50 of file emu_run_internal.h.
| bool run_loop_t::button_fired |
Headless click button fired once.
Definition at line 87 of file emu_run_internal.h.
Referenced by internal_run_loop_click_tail(), and internal_run_loop_tick_inputs().
| const emu_run_cfg_t* run_loop_t::cfg |
Setup products (engine, image, CLI knobs).
Definition at line 51 of file emu_run_internal.h.
Referenced by internal_run_loop_present_and_stops(), internal_run_loop_prologue(), internal_run_loop_record(), internal_run_loop_run_chunk(), internal_run_loop_setup(), internal_run_loop_tick_inputs(), internal_run_loop_view(), internal_run_stop_idle(), internal_run_stop_prof_idle(), internal_run_stop_sym(), internal_run_stop_usb(), internal_run_view_maybe_present(), priv_run_cleanup(), priv_run_hold_view(), priv_run_report(), and priv_run_write_outputs().
| uint32_t run_loop_t::chunks |
Outer chunks executed so far.
Definition at line 66 of file emu_run_internal.h.
Referenced by internal_run_loop(), internal_run_loop_prologue(), internal_run_loop_record(), internal_run_loop_view(), internal_run_stop_prof_idle(), and priv_run_report().
| board_overlay_btn_t run_loop_t::click_btn |
Classified –click target button.
Definition at line 62 of file emu_run_internal.h.
Referenced by internal_run_classify_click(), internal_run_loop_click_tail(), internal_run_loop_setup(), and internal_run_loop_tick_inputs().
| bool run_loop_t::click_was_tab |
–click landed on a console tab.
Definition at line 63 of file emu_run_internal.h.
Referenced by internal_run_classify_click(), and internal_run_loop_tick_inputs().
| bool run_loop_t::closed |
Live window was closed.
Definition at line 86 of file emu_run_internal.h.
Referenced by internal_run_loop_view(), and priv_run_hold_view().
| uint16_t run_loop_t::comp_h |
Composite (panel + sidebar) height.
Definition at line 58 of file emu_run_internal.h.
Referenced by internal_run_open_view(), internal_run_setup_geometry(), and priv_run_write_outputs().
| uint16_t run_loop_t::comp_w |
Composite (panel + sidebar) width.
Definition at line 57 of file emu_run_internal.h.
Referenced by internal_run_open_view(), internal_run_setup_geometry(), and priv_run_write_outputs().
| uint16_t run_loop_t::disp_h |
Displayed height (rotation-swapped).
Definition at line 56 of file emu_run_internal.h.
Referenced by internal_run_setup_geometry().
| uint16_t run_loop_t::disp_w |
Displayed width (rotation-swapped).
Definition at line 55 of file emu_run_internal.h.
Referenced by internal_run_classify_click(), internal_run_loop_tick_inputs(), internal_run_loop_view(), and internal_run_setup_geometry().
| uc_err run_loop_t::err |
Latest uc_emu_start status.
Definition at line 80 of file emu_run_internal.h.
Referenced by internal_run_loop_run_chunk(), internal_run_loop_setup(), priv_run_cleanup(), and priv_run_report().
| run_guards_t run_loop_t::guards |
Env-tunable budgets + stop conditions.
Definition at line 52 of file emu_run_internal.h.
Referenced by internal_run_loop(), internal_run_loop_click_tail(), internal_run_loop_setup(), internal_run_stop_banner(), internal_run_stop_idle(), internal_run_stop_prof_idle(), internal_run_stop_usb(), internal_run_stop_wall(), and priv_run_report().
| board_overlay_btn_t run_loop_t::held_btn |
SW held down (released on up).
Definition at line 89 of file emu_run_internal.h.
Referenced by internal_run_loop_setup(), and internal_run_loop_view().
| uint32_t run_loop_t::idle_run |
Consecutive steady-idle chunks.
Definition at line 71 of file emu_run_internal.h.
Referenced by internal_run_stop_idle().
| uint64_t run_loop_t::idle_sig_prev |
Prior idle-signature sum.
Definition at line 75 of file emu_run_internal.h.
Referenced by internal_run_stop_idle().
| bool run_loop_t::idle_stopped |
Idle steady-state stop fired.
Definition at line 82 of file emu_run_internal.h.
Referenced by internal_run_stop_idle(), and priv_run_report().
| uint32_t run_loop_t::last_boot_chunk |
Chunk of the last (re)boot.
Definition at line 67 of file emu_run_internal.h.
Referenced by internal_run_loop_prologue().
| uint64_t run_loop_t::last_present_us |
wall-us of the last live present.
Definition at line 76 of file emu_run_internal.h.
Referenced by internal_run_view_maybe_present().
| uint16_t run_loop_t::panel_h |
Firmware render height in pixels.
Definition at line 54 of file emu_run_internal.h.
Referenced by internal_run_loop_tick_inputs(), internal_run_loop_view(), and internal_run_setup_geometry().
| uint16_t run_loop_t::panel_w |
Firmware render width in pixels.
Definition at line 53 of file emu_run_internal.h.
Referenced by internal_run_loop_tick_inputs(), internal_run_loop_view(), and internal_run_setup_geometry().
| emu_presentation_workspace_t* run_loop_t::presentation |
Owned raw-fd presentation surface.
Definition at line 59 of file emu_run_internal.h.
Referenced by internal_run_loop_record(), internal_run_setup_geometry(), internal_run_view_maybe_present(), priv_run_hold_view(), and priv_run_write_outputs().
| uint64_t run_loop_t::prof_idle_prev_i |
Prior total insns (profiler).
Definition at line 74 of file emu_run_internal.h.
Referenced by internal_run_stop_prof_idle().
| uint32_t run_loop_t::prof_idle_run |
Consecutive profiler-idle chunks.
Definition at line 70 of file emu_run_internal.h.
Referenced by internal_run_stop_prof_idle().
| uint32_t run_loop_t::prof_prev_pc |
PC charged by the wall profiler.
Definition at line 77 of file emu_run_internal.h.
Referenced by internal_run_loop_prologue().
| double run_loop_t::prof_prev_t |
Start time of the prior chunk.
Definition at line 78 of file emu_run_internal.h.
Referenced by internal_run_loop_prologue().
| bool run_loop_t::prof_stopped |
Profiler stop fired.
Definition at line 81 of file emu_run_internal.h.
Referenced by internal_run_loop_run_chunk(), internal_run_stop_prof_idle(), and priv_run_report().
| int run_loop_t::reboot_count |
–reboot warm reboots remaining.
Definition at line 64 of file emu_run_internal.h.
Referenced by internal_run_loop_prologue(), and internal_run_loop_setup().
| uint32_t run_loop_t::rec_frames |
–record frames written.
Definition at line 69 of file emu_run_internal.h.
Referenced by internal_run_loop_record(), and priv_run_write_outputs().
| uint32_t run_loop_t::run_pc |
Current resume PC.
Definition at line 65 of file emu_run_internal.h.
Referenced by internal_run_loop_prologue(), internal_run_loop_run_chunk(), internal_run_loop_setup(), and priv_run_report().
| uint32_t run_loop_t::settle_left |
Post-click drain countdown.
Definition at line 68 of file emu_run_internal.h.
Referenced by internal_run_loop_click_tail().
| bool run_loop_t::slider_grab |
Battery slider grabbed by a drag.
Definition at line 88 of file emu_run_internal.h.
Referenced by internal_run_loop_view().
| bool run_loop_t::stop_sym_hit |
–stop-sym threshold reached.
Definition at line 84 of file emu_run_internal.h.
Referenced by internal_run_stop_sym(), and priv_run_report().
| clock_t run_loop_t::t0 |
CPU-time origin for the guard.
Definition at line 79 of file emu_run_internal.h.
Referenced by internal_run_loop_click_tail(), internal_run_loop_setup(), and internal_run_stop_wall().
| bool run_loop_t::timed_out |
Wall-clock guard fired.
Definition at line 85 of file emu_run_internal.h.
Referenced by internal_run_loop_click_tail(), internal_run_stop_wall(), priv_run_cleanup(), and priv_run_report().
| uint32_t run_loop_t::usb_stop_run |
USB device settle countup.
Definition at line 72 of file emu_run_internal.h.
Referenced by internal_run_stop_usb().
| bool run_loop_t::usb_stopped |
USB / banner early stop fired.
Definition at line 83 of file emu_run_internal.h.
Referenced by internal_run_stop_banner(), internal_run_stop_usb(), and priv_run_report().
| uint32_t run_loop_t::usbh_stop_run |
USB host settle countup.
Definition at line 73 of file emu_run_internal.h.
Referenced by internal_run_stop_usb().
| board_view_t* run_loop_t::view |
Live window (NULL when headless).
Definition at line 61 of file emu_run_internal.h.
Referenced by internal_run_loop_present_and_stops(), internal_run_loop_setup(), internal_run_loop_view(), internal_run_open_view(), internal_run_view_maybe_present(), and priv_run_hold_view().
| board_view_storage_t run_loop_t::view_storage |
Caller-owned live-view handle storage.
Definition at line 60 of file emu_run_internal.h.
Referenced by internal_run_open_view().