Crates.io | gpcas_isa |
lib.rs | gpcas_isa |
version | 0.6.1 |
source | src |
created_at | 2021-07-09 17:44:51.775952 |
updated_at | 2022-10-28 01:18:17.043059 |
description | Interface and utilities for GPCAS ISA implementations. |
homepage | |
repository | https://git.h3n.eu/gpcas/gpcas/ |
max_upload_size | |
id | 420838 |
size | 96,374 |
This crate provides an interface to implement for ISAs (instruction set architectures) to be supported in GPCAS. GPCAS stands for General Purpose Core Architecture Simulator, a simulator for CPUs.
Each ISA has to provide an emulator capable of executing a program of said ISA, and some additional properties.
To properly interface with the simulator, an ISA should provide its information as so:
extern crate gpcas_isa;
use gpcas_isa::{Isa, MemoryAccessType};
pub fn get_isa(executable_data: Vec<u8>) -> Isa {
Isa {
emulator: Box::new(YourEmulator::new(executable_data)),
memory_access_type: MemoryAccessType::LoadStore,
general_purpose_register_count: 16,
vector_register_count: 0,
special_register_count: 0,
instruction_word_alignment: 1,
max_instruction_len: 2,
}
}
gpcas_isa
is distributed under the LGPLv3 license. See COPYING
and COPYING.LESSER
in the crate root.