riscemu.riscemu_main module
- class riscemu.riscemu_main.RiscemuMain(cfg: Optional[RunConfig] = None)
Bases:
object
This represents the riscemu API exposed to other programs for better interoperability.
- available_ins_sets: Dict[str, Type[InstructionSet]]
- available_file_loaders: List[Type[ProgramLoader]]
- input_files: List[str]
- selected_ins_sets: List[Type[InstructionSet]]
- instantiate_cpu()
- configure_cpu()
- register_all_arguments(parser: ArgumentParser)
- register_all_isas()
- register_all_program_loaders()
- parse_argv(argv: List[str])
- add_libc_to_input_files()
This adds the provided riscemu libc to the programs runtime.
- load_programs()
- run_from_cli(argv: List[str])
- run()
This assumes that these values were set externally:
available_file_loaders: A list of available file loaders. Can be set using .register_all_program_loaders()
cfg: The RunConfig object. Can be directly assigned to the attribute
input_files: A list of assembly files to load.
selected_ins_sets: A list of instruction sets the CPU should support.