gpcas_isa

Crates.iogpcas_isa
lib.rsgpcas_isa
version0.6.1
sourcesrc
created_at2021-07-09 17:44:51.775952
updated_at2022-10-28 01:18:17.043059
descriptionInterface and utilities for GPCAS ISA implementations.
homepage
repositoryhttps://git.h3n.eu/gpcas/gpcas/
max_upload_size
id420838
size96,374
(Kulasko)

documentation

https://docs.rs/gpcas_isa/0.6.1/

README

GPCAS isa crate

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.

Example

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,
    }
}

License

gpcas_isa is distributed under the LGPLv3 license. See COPYING and COPYING.LESSER in the crate root.

Commit count: 0

cargo fmt