(Initial stub) |
(→Functions: Added user defined functions) |
||
Line 5: | Line 5: | ||
== Functions == | == Functions == | ||
* <code> | ===Component & Sequential=== | ||
User defined functions for Component & Sequential type levels. | |||
* <code>check_output($scratch_space: [Int], tick: Int, inputs: [Int], outputs: [Int]) TestResult</code> | |||
* <code>get_input($scratch_space: [Int], tick: Int, $inputs: [Int])</code> | |||
* <code>on_reset($scratch_space: [Int], test: Int)</code> | |||
** Optional | |||
===Architecture=== | |||
User defined functions for Architecture type levels. | |||
* <code>arch_check_output($scratch_space: [Int], test: Int, input: Int, output: Int) TestResult</code> | |||
* <code>arch_get_input($scratch_space: [Int], test: Int) Int</code> | |||
* <code>on_reset($scratch_space: [Int], test: Int)</code> | |||
** Optional | |||
===Callable=== | |||
The test framework defines these function which may be used in <code>test.si</code> for any type of level. | |||
* <code>add_keyboard_value(value: Int)</code> | |||
* <code>front_panel_push(value: U8)</code> | |||
* <code>get_assembler_register_count() Int</code> | |||
* <code>get_assembler_width() Int</code> | |||
* <code>get_component_count() Int</code> | |||
* <code>get_console_offset() Int</code> | |||
* <code>get_counter_value() Int</code> | |||
* <code>get_delay_score() Int</code> | * <code>get_delay_score() Int</code> | ||
* <code>get_gate_score() Int</code> | * <code>get_gate_score() Int</code> | ||
* <code>get_last_time() Int</code> | * <code>get_last_time() Int</code> | ||
* <code>get_latency_ram_is_busy() Bool</code> | * <code>get_latency_ram_is_busy() Bool</code> | ||
* <code>get_level_memory(custom_string: String) Int</code> | * <code>get_level_memory(custom_string: String) Int</code> | ||
* <code> | * <code>get_probe_value() Int</code> | ||
* <code>get_probe_width() Int</code> | |||
* <code>get_program_address() Int</code> | |||
* <code>get_ram_size() Int</code> | * <code>get_ram_size() Int</code> | ||
* <code>get_ram_value(address: Int) Int</code> | * <code>get_ram_value(address: Int) Int</code> | ||
* <code>get_register_value(index: Int) Int</code> | * <code>get_register_value(index: Int) Int</code> | ||
* <code> | * <code>get_tick() Int</code> | ||
* <code>has_console_component() Bool</code> | |||
* <code>has_counter_component() Bool</code> | |||
* <code>has_front_panel() Bool</code> | * <code>has_front_panel() Bool</code> | ||
* <code> | * <code>has_keyboard_component() Bool</code> | ||
* <code>has_ram() Bool</code> | |||
* <code>has_time_component() Bool</code> | |||
* <code>set_custom_input_text(input: String)</code> | |||
* <code>set_error(input: String)</code> | * <code>set_error(input: String)</code> | ||
* <code> | * <code>ui_set_color(id: String, size: Int)</code> | ||
* <code> | * <code>ui_set_hidden(id: String, value: Bool)</code> | ||
* <code>ui_set_image_name(id: String, text: String</code> | |||
* <code>ui_set_position(id: String, x: Int, y: Int)</code> | |||
* <code>ui_set_size(id: String, size: Int)</code> | |||
* <code>ui_set_text(id: String, text: String</code> |
Latest revision as of 12:24, 22 January 2025
A list of functions that can be used in test.si
.
Functions[edit | edit source]
Component & Sequential[edit | edit source]
User defined functions for Component & Sequential type levels.
check_output($scratch_space: [Int], tick: Int, inputs: [Int], outputs: [Int]) TestResult
get_input($scratch_space: [Int], tick: Int, $inputs: [Int])
on_reset($scratch_space: [Int], test: Int)
- Optional
Architecture[edit | edit source]
User defined functions for Architecture type levels.
arch_check_output($scratch_space: [Int], test: Int, input: Int, output: Int) TestResult
arch_get_input($scratch_space: [Int], test: Int) Int
on_reset($scratch_space: [Int], test: Int)
- Optional
Callable[edit | edit source]
The test framework defines these function which may be used in test.si
for any type of level.
add_keyboard_value(value: Int)
front_panel_push(value: U8)
get_assembler_register_count() Int
get_assembler_width() Int
get_component_count() Int
get_console_offset() Int
get_counter_value() Int
get_delay_score() Int
get_gate_score() Int
get_last_time() Int
get_latency_ram_is_busy() Bool
get_level_memory(custom_string: String) Int
get_probe_value() Int
get_probe_width() Int
get_program_address() Int
get_ram_size() Int
get_ram_value(address: Int) Int
get_register_value(index: Int) Int
get_tick() Int
has_console_component() Bool
has_counter_component() Bool
has_front_panel() Bool
has_keyboard_component() Bool
has_ram() Bool
has_time_component() Bool
set_custom_input_text(input: String)
set_error(input: String)
ui_set_color(id: String, size: Int)
ui_set_hidden(id: String, value: Bool)
ui_set_image_name(id: String, text: String
ui_set_position(id: String, x: Int, y: Int)
ui_set_size(id: String, size: Int)
ui_set_text(id: String, text: String