[][src]Struct rvemu::bus::Bus

pub struct Bus {
    pub dram: Memory,
    // some fields omitted
}

The system bus.

Fields

dram: Memory

Methods

impl Bus[src]

pub fn new() -> Bus[src]

pub fn dram_size(&self) -> usize[src]

Return the size of source code in the dram.

pub fn set_dram(&mut self, data: Vec<u8>)[src]

Set the binary data to the memory.

pub fn write8(&mut self, addr: usize, val: u8) -> Result<(), Exception>[src]

Write a byte to the system bus.

pub fn write16(&mut self, addr: usize, val: u16) -> Result<(), Exception>[src]

Write 2 bytes to the system bus.

pub fn write32(&mut self, addr: usize, val: u32) -> Result<(), Exception>[src]

Write 4 bytes to the system bus.

pub fn write64(&mut self, addr: usize, val: u64) -> Result<(), Exception>[src]

Write 8 bytes to the system bus.

pub fn read8(&mut self, addr: usize) -> Result<u8, Exception>[src]

Read a byte from the system bus.

pub fn read16(&self, addr: usize) -> Result<u16, Exception>[src]

Read 2 bytes from the system bus.

pub fn read32(&self, addr: usize) -> Result<u32, Exception>[src]

Read 4 bytes from the system bus.

pub fn read64(&self, addr: usize) -> Result<u64, Exception>[src]

Read 8 bytes from the system bus.

Auto Trait Implementations

impl !RefUnwindSafe for Bus

impl Send for Bus

impl Sync for Bus

impl Unpin for Bus

impl !UnwindSafe for Bus

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.