Struct hazardflow_designs::gemmini::local_addr::LocalAddr
source · pub struct LocalAddr {
pub is_acc_addr: bool,
pub accumulate: bool,
pub read_full_acc_row: bool,
pub norm_cmd: U<3>,
pub garbage: U<{ _ }>,
pub is_garbage: bool,
pub data: U<MAX_ADDR_BITS>,
}Expand description
Local address. The total number of bits for all fields is 32.
Fields§
§is_acc_addr: boolIs Accumulator Address?
accumulate: boolAccumulate
read_full_acc_row: boolRead Full Accumulator Row
norm_cmd: U<3>NormCmd
garbage: U<{ _ }>Garbage area.
is_garbage: boolIs garbage address.
data: U<MAX_ADDR_BITS>Address Data
Implementations§
source§impl LocalAddr
impl LocalAddr
sourcepub fn cast_to_local_addr(value: U<64>) -> Self
pub fn cast_to_local_addr(value: U<64>) -> Self
sourcepub fn cast_to_sp_addr(value: U<64>) -> Self
pub fn cast_to_sp_addr(value: U<64>) -> Self
sourcepub fn full_sp_addr(self) -> U<SP_ADDR_BITS>
pub fn full_sp_addr(self) -> U<SP_ADDR_BITS>
Returns scratchpad address.
sourcepub fn full_acc_addr(self) -> U<ACC_ADDR_BITS>
pub fn full_acc_addr(self) -> U<ACC_ADDR_BITS>
Returns accumulator address.
sourcepub fn is_garbage(self) -> bool
pub fn is_garbage(self) -> bool
sourcepub fn is_same_addr(self, other: Self) -> bool
pub fn is_same_addr(self, other: Self) -> bool
sourcepub fn make_this_garbage(self) -> Self
pub fn make_this_garbage(self) -> Self
Make garbage LocalAddr. All bits are set to 1.
sourcepub fn add_with_overflow(self, other: U<MAX_ADDR_BITS>) -> (LocalAddr, bool)
pub fn add_with_overflow(self, other: U<MAX_ADDR_BITS>) -> (LocalAddr, bool)
Adds self and other and also returns overflow has occurred or not.
Trait Implementations§
source§impl From<Array<bool, 64>> for LocalAddr
impl From<Array<bool, 64>> for LocalAddr
source§fn from(value: U<64>) -> Self
fn from(value: U<64>) -> Self
Reterive 32 bits address.
let addr: U<32> = value[31:0]value[63:32]means the number of rows and columns.
Address scheme.
- is_acc_addr:
addr[31] - accumulate:
addr[30] - read_full_acc_row:
addr[29] - norm_cmd:
addr[28:26] - garbage:
addr[25:15] - is_garbage:
addr[14] - data:
addr[13:0]
impl Copy for LocalAddr
Auto Trait Implementations§
impl RefUnwindSafe for LocalAddr
impl Send for LocalAddr
impl Sync for LocalAddr
impl Unpin for LocalAddr
impl UnwindSafe for LocalAddr
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
Mutably borrows from an owned value. Read more