Trait rsim::processor::isa_mods::IsaMod [−][src]
pub trait IsaMod<TConn> { type Pc; fn will_handle(&self, opcode: Opcode, inst: InstructionBits) -> bool; fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
inst_bits: u32,
conn: TConn
) -> ProcessorResult<Option<Self::Pc>>; }
Trait for all ISA modules.
Uses a TConn
value to connect to processor state: for example,
the Rv64im module takes a connection holding a reference to a 64-bit register file,
and a reference to main memory.
Associated Types
Loading content...Required methods
fn will_handle(&self, opcode: Opcode, inst: InstructionBits) -> bool
[src]
Return true if this ISA module should handle the given instruction
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
inst_bits: u32,
conn: TConn
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
inst_bits: u32,
conn: TConn
) -> ProcessorResult<Option<Self::Pc>>
Execute the given instruction, returning the new PC (or None if continuing as normal)
Implementors
impl IsaMod<XCheri64Conn<'_>> for Rv64imCapabilityMode
[src]
impl IsaMod<XCheri64Conn<'_>> for Rv64imCapabilityMode
[src]type Pc = u64
fn will_handle(&self, opcode: Opcode, _inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: XCheri64Conn<'_>
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: XCheri64Conn<'_>
) -> ProcessorResult<Option<Self::Pc>>
impl IsaMod<XCheri64Conn<'_>> for XCheri64
[src]
impl IsaMod<XCheri64Conn<'_>> for XCheri64
[src]type Pc = Cc128Cap
fn will_handle(&self, opcode: Opcode, inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: XCheri64Conn<'_>
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: XCheri64Conn<'_>
) -> ProcessorResult<Option<Self::Pc>>
impl IsaMod<RvimConn<'_, u32>> for Rv32im
[src]
impl IsaMod<RvimConn<'_, u32>> for Rv32im
[src]type Pc = u32
fn will_handle(&self, opcode: Opcode, _inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: Rv32imConn<'_>
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: Rv32imConn<'_>
) -> ProcessorResult<Option<Self::Pc>>
impl IsaMod<RvimConn<'_, u64>> for Rv64im
[src]
impl IsaMod<RvimConn<'_, u64>> for Rv64im
[src]type Pc = u64
fn will_handle(&self, opcode: Opcode, _inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: Rv64imConn<'_>
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: Rv64imConn<'_>
) -> ProcessorResult<Option<Self::Pc>>
impl<T> IsaMod<ZicsrConn<'_, T>> for Zicsr<T> where
T: From<u8>,
[src]
impl<T> IsaMod<ZicsrConn<'_, T>> for Zicsr<T> where
T: From<u8>,
[src]type Pc = T
fn will_handle(&self, opcode: Opcode, _inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: ZicsrConn<'_, T>
) -> ProcessorResult<Option<Self::Pc>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
_inst_bits: u32,
conn: ZicsrConn<'_, T>
) -> ProcessorResult<Option<Self::Pc>>
impl<uXLEN: PossibleXlen, TElem> IsaMod<(&'_ mut (dyn VecRegInterface<uXLEN> + '_), &'_ mut (dyn VecMemInterface<uXLEN, TElem> + '_))> for Rvv<uXLEN, TElem>
[src]
impl<uXLEN: PossibleXlen, TElem> IsaMod<(&'_ mut (dyn VecRegInterface<uXLEN> + '_), &'_ mut (dyn VecMemInterface<uXLEN, TElem> + '_))> for Rvv<uXLEN, TElem>
[src]type Pc = ()
fn will_handle(&self, opcode: Opcode, inst: InstructionBits) -> bool
[src]
fn execute(
&mut self,
opcode: Opcode,
inst: InstructionBits,
inst_bits: u32,
conn: VecInterface<'_, uXLEN, TElem>
) -> ProcessorResult<Option<()>>
[src]
&mut self,
opcode: Opcode,
inst: InstructionBits,
inst_bits: u32,
conn: VecInterface<'_, uXLEN, TElem>
) -> ProcessorResult<Option<()>>
Execute a vector-specific instruction, e.g. vector arithmetic, loads, configuration Requires a VecRegInterface and a VecMemInterface.
Arguments
opcode
- The major opcode of the instructioninst
- Decoded instruction bitsinst_bits
- Raw instruction bits (TODO - we shouldn’t need this)conn
- Connection to external resources