Skip to main content

AccessMemory

Trait AccessMemory 

Source
pub trait AccessMemory
where Self: Routable + TotalBytes,
{ // Required methods fn dst_addr(&self) -> u64; fn src_addr(&self) -> u64; fn dst_device(&self) -> DeviceId; fn src_device(&self) -> DeviceId; fn access_size_bytes(&self) -> usize; fn to_response(&self, mem: &impl ReadMemory) -> Result<Self, SimError> where Self: Sized; fn cache_hint(&self) -> CacheHintType; }
Expand description

Trait implemented by all types that memory components support

Required Methods§

Source

fn dst_addr(&self) -> u64

Return the destination address of this access

Source

fn src_addr(&self) -> u64

Return the source address of this access

Source

fn dst_device(&self) -> DeviceId

Return the destination device of this access

Source

fn src_device(&self) -> DeviceId

Return the source device of this access

Source

fn access_size_bytes(&self) -> usize

Return the size of the access in bytes

Source

fn to_response(&self, mem: &impl ReadMemory) -> Result<Self, SimError>
where Self: Sized,

Returns the appropriate response for a request

Source

fn cache_hint(&self) -> CacheHintType

Returns the requested caching behaviour of a request

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§