pub struct PmuSpec {
pub banks: usize,
pub words_per_bank: usize,
pub n_buffers: usize,
pub stages: usize,
}Expand description
A PMU’s published shape.
Fields§
§banks: usize§words_per_bank: usize§n_buffers: usizeN-buffering factor (1 = single buffer, 2 = double buffer, …).
stages: usizeAddress-datapath FU stages.
Implementations§
Source§impl PmuSpec
impl PmuSpec
Sourcepub fn isca17() -> PmuSpec
pub fn isca17() -> PmuSpec
ISCA’17 Table 3: 16 banks × 16 KB (4096 32-bit words), 4 address-datapath stages, single-buffered.
Sourcepub fn capacity_words(&self) -> usize
pub fn capacity_words(&self) -> usize
Total words.
Sourcepub fn buffer_words(&self) -> usize
pub fn buffer_words(&self) -> usize
Words available to ONE buffer under N-buffering (each bank’s space is split n_buffers ways; when
the split is uneven the smallest region is what a tile must fit).
Sourcepub fn n_buffer_regions(&self) -> Vec<(usize, usize)>
pub fn n_buffer_regions(&self) -> Vec<(usize, usize)>
The disjoint, exhaustive [first, last) word ranges of the N buffers in flat word addresses; the
remainder of an uneven split goes to the last region so the regions always cover the capacity.
Sourcepub fn usable_words(&self, mode: BankingMode) -> usize
pub fn usable_words(&self, mode: BankingMode) -> usize
Words a banking mode can address: everything for strided / FIFO / duplication; a line buffer holds
whole rows, ceil(width / banks) words of every row in each bank, so its capacity is the whole rows
that fit — the rest of the SRAM is unaddressable in that mode.
Trait Implementations§
impl Copy for PmuSpec
impl Eq for PmuSpec
impl StructuralPartialEq for PmuSpec
Auto Trait Implementations§
impl Freeze for PmuSpec
impl RefUnwindSafe for PmuSpec
impl Send for PmuSpec
impl Sync for PmuSpec
impl Unpin for PmuSpec
impl UnsafeUnpin for PmuSpec
impl UnwindSafe for PmuSpec
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.