pub struct MemoryWritePort {
pub addr: Value,
pub data: Value,
pub mask: Value,
pub clock: ControlNet,
}
Expand description
A synchronous memory write port.
Asynchronous memory write ports are not currently supported.
Fields§
§addr: Value
The write address, selecting which row(s) to write. The address is always counted
in units of the port’s data width. Thus, if the port width is equal to the memory
width, the address is equal to the row index. However, for wide ports,
the address is implicitly shifted left by log2(port.data.len() / memory.width)
bits
to obtain the first row index.
The address can have any width. If the address is too short to address all memory rows, so be it — higher rows will be unreachable by this port.
Writes to out-of-bounds addresses do not modify the memory.
data: Value
The write data. The width must be a power-of-two multiple of the memory width.
mask: Value
The write mask. Must have the same width as data
. On every active clock edge,
a 1
enables writing to the memory for the given data bit, 0
prevents writing.
clock: ControlNet
Implementations§
Trait Implementations§
Source§impl Clone for MemoryWritePort
impl Clone for MemoryWritePort
Source§fn clone(&self) -> MemoryWritePort
fn clone(&self) -> MemoryWritePort
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MemoryWritePort
impl Debug for MemoryWritePort
Source§impl Hash for MemoryWritePort
impl Hash for MemoryWritePort
Source§impl PartialEq for MemoryWritePort
impl PartialEq for MemoryWritePort
impl Eq for MemoryWritePort
impl StructuralPartialEq for MemoryWritePort
Auto Trait Implementations§
impl Freeze for MemoryWritePort
impl RefUnwindSafe for MemoryWritePort
impl Send for MemoryWritePort
impl Sync for MemoryWritePort
impl Unpin for MemoryWritePort
impl UnwindSafe for MemoryWritePort
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<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.