Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ClementNerma/LRVM
/ functions
Functions
302 in github.com/ClementNerma/LRVM
⨍
Functions
302
◇
Types & classes
54
↓ 30 callers
Method
len
Get the BootROM's real storage's length
lrvm_aux/src/storage/bootrom.rs:68
↓ 23 callers
Method
exception
Raise an exception with the provided `code` and `associated` data. Returns the related exception object.
lrvm/src/cpu/cpu.rs:810
↓ 18 callers
Method
encode
Encode the program as a list of bytes
lrvm_tools/src/asm/prog.rs:113
↓ 17 callers
Method
map
Map an auxiliary component from a specific address. The end address will be determined through the component's [`Bus::size`] method.
lrvm/src/mem/mem.rs:24
↓ 12 callers
Function
exec_vm
Prepare a virtual machine with the provided components and run it with the provided configuration
lrvm_tools/src/debug/exec.rs:6
↓ 12 callers
Method
write_reg
Try to write a register's value. Raises an exception if the specified register is only writable in supervisor mode and userland mode is active. Raises
lrvm/src/cpu/cpu.rs:631
↓ 11 callers
Method
to_instr
Convert the extended instruction into a set of native instructions
lrvm_tools/src/asm/extinstr.rs:17
↓ 9 callers
Method
map
Perform operations on memory through a handler, example: ```no_run use lrvm::board::MotherBoard; let mut motherboard = MotherBoard::new(vec![ /* comp
lrvm/src/board/board.rs:41
↓ 9 callers
Method
sv_mode
Check if the CPU is currently in supervisor mode
lrvm/src/cpu/cpu.rs:804
↓ 8 callers
Method
append
Append an instruction at the end of the program
lrvm_tools/src/asm/prog.rs:54
↓ 8 callers
Method
read
(&self, addr: u32, ex: &mut u16)
lrvm_aux/src/time/realtime.rs:45
↓ 7 callers
Function
assemble_words
Assemble a LASM source code to machine code and split it to words. Returns an error message in case of error.
lrvm_tools/src/lasm/mod.rs:46
↓ 7 callers
Method
code
Get the register's code
lrvm_tools/src/asm/reg.rs:124
↓ 7 callers
Method
read_reg
Try to read a register's value. Raises an exception if the specified register is only readable in supervisor mode and userland mode is active.
lrvm/src/cpu/cpu.rs:592
↓ 6 callers
Method
next
(&mut self)
lrvm/src/cpu/cpu.rs:60
↓ 5 callers
Method
cache_of
Get the data cache of an auxiliary component from its ID
lrvm/src/board/hw_bridge.rs:42
↓ 5 callers
Method
count
Get the number of connected components
lrvm/src/board/board.rs:62
↓ 5 callers
Method
cpu
Get a mutable reference to the CPU (required to make the CPU advance)
lrvm/src/board/board.rs:46
↓ 5 callers
Method
encode
(self)
lrvm_tools/src/asm/div_modes.rs:62
↓ 5 callers
Method
mem_read
Read an address in the mapped memory. Raises an exception if address is unaligned or if the MMU doesn't accept reading this address in the current mod
lrvm/src/cpu/cpu.rs:882
↓ 5 callers
Method
mem_write
Write an address in the mapped memory. Raises an exception if address is unaligned or if the MMU doesn't accept writing this address in the current mo
lrvm/src/cpu/cpu.rs:890
↓ 4 callers
Method
append_all
Append a set of instructions at the end of the program
lrvm_tools/src/asm/prog.rs:60
↓ 4 callers
Function
assemble
Assemble a LASM source code to machine code. Returns an error message in case of error.
lrvm_tools/src/lasm/mod.rs:19
↓ 4 callers
Method
compute
Perform a numeric computation and set the arithmetic flags. Raises an exception if a forbidden operation happens (e.g. division by zero when forbidden
lrvm/src/cpu/cpu.rs:684
↓ 4 callers
Method
end_addr
Get the end address of the mapping
lrvm/src/mem/mappings.rs:16
↓ 4 callers
Method
prog_words
Iterate over the program's instructions
lrvm_tools/src/asm/prog.rs:32
↓ 4 callers
Method
reset
Hanldle a RESET signal from the motherboard
lrvm/src/cpu/cpu.rs:47
↓ 4 callers
Method
to_prog_words
Convert the extended instruction into a set of program words
lrvm_tools/src/asm/extinstr.rs:61
↓ 4 callers
Function
words_to_bytes
Convert a list of words to a list of bytes
lrvm_tools/src/bytes/mod.rs:26
↓ 3 callers
Method
code
Get the arithmetic flag's code
lrvm_tools/src/asm/arflag.rs:31
↓ 3 callers
Method
cycles
Get the number of cycles the CPU run so far Note that this number goes back to 0 after reaching its maximum (overflow).
lrvm/src/cpu/cpu.rs:110
↓ 3 callers
Method
mem_do
Perform an action on the memory. The provided address will be first translated by the MMU into a physical address, then the provided handler will be c
lrvm/src/cpu/cpu.rs:844
↓ 3 callers
Method
read
Read an arbitrary address in the mapped memory. The related component will be contacted through its [`Bus`] if mounted at this address. If no componen
lrvm/src/mem/mem.rs:94
↓ 3 callers
Function
run_vm
Run a virtual machine until the CPU halt, eventually encounters an exception or reaches a given number of cycles.
lrvm_tools/src/debug/run.rs:35
↓ 3 callers
Method
to_lasm
Convert the register to LASM representation
lrvm_tools/src/asm/reg.rs:210
↓ 2 callers
Function
bytes_to_words
Utilities to deal with bytes Convert a list of bytes to a list of words
lrvm_tools/src/bytes/mod.rs:4
↓ 2 callers
Method
decode_entry
( &mut self, mem: &mut MappedMemory, regs: &Registers, entry_addr: u32,
lrvm/src/mmu/mmu.rs:19
↓ 2 callers
Method
encode
Encode the exception on 24-bits
lrvm_tools/src/exceptions/native.rs:126
↓ 2 callers
Method
halted
Check if the CPU is halted
lrvm/src/cpu/cpu.rs:104
↓ 2 callers
Method
hw_id_of
Get the unique identifier of an auxiliary component from its ID
lrvm/src/board/hw_bridge.rs:57
↓ 2 callers
Method
internal_map
(Internal) map an auxiliary component to the memory
lrvm/src/mem/mem.rs:154
↓ 2 callers
Method
map_contiguous
Map a list of components contiguously
lrvm/src/mem/mem.rs:40
↓ 2 callers
Method
name
Get the register's name
lrvm_tools/src/asm/reg.rs:162
↓ 2 callers
Function
prepare
(instr: Instr)
lrvm_aux/src/tests/aux_01_storage/bootrom.rs:10
↓ 2 callers
Function
prepare_vm
Prepare a motherboard from a list of components. The mapping status of all components is displayed. In case of success, the component's name as well
lrvm_tools/src/debug/prepare.rs:11
↓ 2 callers
Method
read
Read an address inside the component There is only one possible address here, so we don't have to worry about its value
examples/async_hw/src/counter.rs:59
↓ 2 callers
Method
stop
Stop the counting thread (if any is alive)
examples/async_hw/src/counter.rs:38
↓ 2 callers
Method
to_lasm_lines
Convert each line of the program to its LASM source code
lrvm_tools/src/asm/prog.rs:139
↓ 2 callers
Method
with_halt_on_exception
Set if the VM should be stopped when an exception occurrs. Note that many kernels _use_ a system of exceptions to work, so enabling this is only advic
lrvm_tools/src/debug/run_config.rs:46
↓ 1 callers
Function
assembled
()
lrvm_tools/src/tests/asm.rs:24
↓ 1 callers
Method
associated_data
Get the exception's eventual associated data
lrvm_tools/src/exceptions/native.rs:102
↓ 1 callers
Method
associated_data
Get the exception's eventual associated data
lrvm_tools/src/exceptions/auxhw.rs:87
↓ 1 callers
Method
be_quiet
Suppress all displays.
lrvm_tools/src/debug/run_config.rs:85
↓ 1 callers
Method
be_verbose
Enable all display informations.
lrvm_tools/src/debug/run_config.rs:77
↓ 1 callers
Method
category_code
(self)
lrvm_tools/src/metadata/category.rs:40
↓ 1 callers
Method
code
Get the hardware information code as a number
lrvm_tools/src/asm/hw_infos.rs:57
↓ 1 callers
Method
code
Get the exception's code
lrvm_tools/src/exceptions/native.rs:78
↓ 1 callers
Method
code
Get the exception's code
lrvm_tools/src/exceptions/auxhw.rs:69
↓ 1 callers
Function
decode_component
Decode a component from the detection program Returns an error message in case of error
examples/hw_detect/src/main.rs:23
↓ 1 callers
Function
display_prog
(text: &str, display_addr: u32, display_final_addr: u32)
lrvm_aux/src/tests/aux_03_display/buffered.rs:10
↓ 1 callers
Function
display_prog
(character: char, display_addr: u32)
lrvm_aux/src/tests/aux_03_display/character.rs:7
↓ 1 callers
Method
encode
Encode the instruction as a set of 4 bytes
lrvm_tools/src/asm/instr.rs:150
↓ 1 callers
Method
encode
Encode the exception with its eventual associated data
lrvm_tools/src/exceptions/auxhw.rs:105
↓ 1 callers
Method
encode
(&self)
lrvm_tools/src/metadata/metadata.rs:53
↓ 1 callers
Method
encode_word
Encode the instruction as a single word
lrvm_tools/src/asm/instr.rs:388
↓ 1 callers
Function
encoded
()
lrvm_tools/src/tests/asm.rs:17
↓ 1 callers
Method
ensure_aligned
Ensure an address is aligned, or raise an exception otherwise.
lrvm/src/cpu/cpu.rs:827
↓ 1 callers
Method
get_hw_info
Get informations about an auxiliary comopnent, after retrieving its name and raw metadata
lrvm/src/cpu/cpu.rs:905
↓ 1 callers
Method
get_mapping
Get the mapping of a given component
lrvm/src/mem/mem.rs:147
↓ 1 callers
Function
keyb_prog
(input_end_addr: u32)
lrvm_aux/src/tests/aux_04_keyboard/sync_char.rs:12
↓ 1 callers
Function
keyb_prog
(input_end_addr: u32)
lrvm_aux/src/tests/aux_04_keyboard/sync_line.rs:12
↓ 1 callers
Method
mem_exec
Execute (read) an address in the mapped memory. Raises an exception if address is unaligned or if the MMU doesn't accept executing this address in the
lrvm/src/cpu/cpu.rs:898
↓ 1 callers
Method
metadata
(&self)
lrvm_aux/src/storage/file_backed.rs:97
↓ 1 callers
Method
metadata
(&self)
lrvm_aux/src/debug/basic.rs:118
↓ 1 callers
Method
name_of
Get the name of an auxiliary component from its ID
lrvm/src/board/hw_bridge.rs:47
↓ 1 callers
Function
prog
()
lrvm_tools/src/tests/asm.rs:3
↓ 1 callers
Function
re_assemble
(source: &str)
examples/disassemble/src/main.rs:9
↓ 1 callers
Method
read
(&self, addr: u32, ex: &mut u16)
lrvm_aux/src/storage/file_backed.rs:108
↓ 1 callers
Method
reset
Reset the component
examples/async_hw/src/counter.rs:70
↓ 1 callers
Method
reset
(&self)
lrvm_aux/src/display/buffered.rs:129
↓ 1 callers
Method
reset
(&self)
lrvm_aux/src/debug/basic.rs:158
↓ 1 callers
Method
reset
(&self)
lrvm_aux/src/keyboard/sync_char.rs:80
↓ 1 callers
Method
reset
(&self)
lrvm_aux/src/keyboard/sync_line.rs:143
↓ 1 callers
Method
run_instr
(&mut self, opcode: u8, opregs: [bool; 3], params: [u8; 3])
lrvm/src/cpu/cpu.rs:117
↓ 1 callers
Method
short_name
Get the arithmetic flag's short name
lrvm_tools/src/asm/arflag.rs:57
↓ 1 callers
Method
size_of
Get the size of an auxiliary component from its ID
lrvm/src/board/hw_bridge.rs:62
↓ 1 callers
Method
to_bytes
(&self)
lrvm_tools/src/metadata/metadata.rs:41
↓ 1 callers
Method
to_lasm
Convert the program to a LASM source code
lrvm_tools/src/asm/prog.rs:129
↓ 1 callers
Method
to_lasm_lines_annotated
Convert each line of the program to its LASM source code with relative instructions address
lrvm_tools/src/asm/prog.rs:144
↓ 1 callers
Method
translate
( &mut self, mem: &mut MappedMemory, regs: &Registers, v_addr: u32, ac
lrvm/src/mmu/mmu.rs:62
↓ 1 callers
Method
type_code
(self)
lrvm_tools/src/metadata/category.rs:53
↓ 1 callers
Method
with_print_finish
Set if the runner should print a message when the VM halts (cycle number, end address).
lrvm_tools/src/debug/run_config.rs:65
↓ 1 callers
Method
write
Write an arbitrary address in the mapped memory. The related component will be contacted through its [`Bus`] if mounted at this address. If no compone
lrvm/src/mem/mem.rs:124
↓ 1 callers
Method
write
(&self, addr: u32, word: u32, ex: &mut u16)
lrvm_aux/src/storage/file_backed.rs:130
Function
asm_conversion
()
lrvm_tools/src/tests/asm.rs:50
Function
assemble_prog
Convert a LASM source code to a strongly-typed program May fail because Program::decode() may fail if for instance there is raw data in the assembled
lrvm_tools/src/lasm/mod.rs:52
Function
bootrom_read
()
lrvm_aux/src/tests/aux_01_storage/bootrom.rs:19
Function
bootrom_write
()
lrvm_aux/src/tests/aux_01_storage/bootrom.rs:39
Function
buffered_display
()
lrvm_aux/src/tests/aux_03_display/buffered.rs:46
Function
buffered_display
()
lrvm_aux/src/tests/aux_03_display/character.rs:12
next →
1–100 of 302, ranked by callers