pub struct OffchipMemory {
pub edge: PsramEdge,
pub heap: Option<PsramCache>,
pub frames: Option<PsramCache>,
pub cells: Option<PsramCache>,
}Expand description
The engine memories behind one PSRAM edge, each with its own cache; None keeps a memory on the die.
Fields§
§edge: PsramEdge§heap: Option<PsramCache>§frames: Option<PsramCache>§cells: Option<PsramCache>The config image, as three lanes of one word per cell — {code, kind}, {op1, op0}, {op3, op2} — each behind a cache of this geometry.
Implementations§
Source§impl OffchipMemory
impl OffchipMemory
Sourcepub fn part_words(&self) -> u64
pub fn part_words(&self) -> u64
The part’s words within the edge’s word address.
Sourcepub fn regions(&self, caps: [usize; 10]) -> Vec<Region>
pub fn regions(&self, caps: [usize; 10]) -> Vec<Region>
Each off-chip memory’s region for the cap profile caps, largest first so every region is aligned
to its own size: the three cell lanes (MAXCELL words each), the frame stack (DEPTH x NREG) and
the heap (HEAP), each rounded up to a power of two. An index past its memory’s cap wraps inside
its own region and never reaches another memory’s.
Sourcepub fn check(
&self,
caps: [usize; 10],
backend: MemBackend,
) -> Result<(), OffchipUnplaceable>
pub fn check( &self, caps: [usize; 10], backend: MemBackend, ) -> Result<(), OffchipUnplaceable>
Refuse a combination the engine cannot build: nothing off-chip, the config image off-chip without the registered config port, or regions the part cannot hold.
Sourcepub fn loading_stall_cycles(&self) -> u64
pub fn loading_stall_cycles(&self) -> u64
The longest stall the loader can meet while bytes are still arriving. Until it takes the go byte the loader touches the part only to write — one config-image field per four bytes, one preloaded heap word per eight — and the walk fetches no cells, so the worst is one write miss in the heap or cell caches that evicts a dirty line. Stalls in the run are not bounded by the UART: the host sends nothing until the result frame is back.
Sourcepub fn check_uart(&self, clks_per_bit: u64) -> Result<(), OffchipUnplaceable>
pub fn check_uart(&self, clks_per_bit: u64) -> Result<(), OffchipUnplaceable>
Refuse a UART that could lose a byte. The receiver holds one byte while the FSM is stalled, so a byte
is lost only if another completes before the stall ends; requiring every loading stall to be shorter
than a byte means no byte ever waits at all. The first access to the part comes no sooner than
wire_bytes_before_first_part_access bytes after reset, and the edge must have initialized the
part by then, or that access would wait out the power-up too.
Sourcepub fn min_clks_per_bit(&self) -> u64
pub fn min_clks_per_bit(&self) -> u64
The fastest UART (fewest system cycles per bit) check_uart accepts.
Trait Implementations§
Source§impl Clone for OffchipMemory
impl Clone for OffchipMemory
Source§fn clone(&self) -> OffchipMemory
fn clone(&self) -> OffchipMemory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OffchipMemory
impl Debug for OffchipMemory
Source§impl PartialEq for OffchipMemory
impl PartialEq for OffchipMemory
impl Copy for OffchipMemory
impl Eq for OffchipMemory
impl StructuralPartialEq for OffchipMemory
Auto Trait Implementations§
impl Freeze for OffchipMemory
impl RefUnwindSafe for OffchipMemory
impl Send for OffchipMemory
impl Sync for OffchipMemory
impl Unpin for OffchipMemory
impl UnsafeUnpin for OffchipMemory
impl UnwindSafe for OffchipMemory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.