pub struct MemoryReadFlipFlop {
pub clock: ControlNet,
pub clear: ControlNet,
pub reset: ControlNet,
pub enable: ControlNet,
pub reset_over_enable: bool,
pub clear_value: Const,
pub reset_value: Const,
pub init_value: Const,
pub relations: Vec<MemoryPortRelation>,
}
Expand description
A structure describing a synchronous read port’s control signals and behavior.
The behavior of a synchronous read port is mostly the same as an asynchronous read port
feeding a flip-flop with the controls described in this structure. However, synchronous
read ports have special behavior when a read coincides with a write to the same memory
row. This behavior is selected by the relations
field.
The fields other than relations
have the same meaning as the corresponding fields in
the FlipFlop
structure. The width of the reset, clear, and init values must be equal to
the data_len
of the port.
Fields§
§clock: ControlNet
§clear: ControlNet
§reset: ControlNet
§enable: ControlNet
§reset_over_enable: bool
§clear_value: Const
§reset_value: Const
§init_value: Const
§relations: Vec<MemoryPortRelation>
The behavior of this read port during a simultaneous write by a given write port.
Each entry in this vector describes the behavior of this read port in relation to a write
port with the same index in the write_ports
vector of the containing memory.
Only ports sharing the same clock
net can have defined relations — this vector must contain
MemoryPortRelation::Undefined
for every write port where write_port.clock != read_port.clock
.
If a given memory bit is simultanously written by more than one write port while being read, the read data is undefined (as is the value written to memory), regardless of the relations between the ports.
Implementations§
Source§impl MemoryReadFlipFlop
impl MemoryReadFlipFlop
pub fn with_clock(self, clock: impl Into<ControlNet>) -> Self
pub fn with_clear(self, clear: impl Into<ControlNet>) -> Self
pub fn with_clear_value( self, clear: impl Into<ControlNet>, clear_value: impl Into<Const>, ) -> Self
pub fn with_reset(self, reset: impl Into<ControlNet>) -> Self
pub fn with_reset_value( self, reset: impl Into<ControlNet>, reset_value: impl Into<Const>, ) -> Self
pub fn with_enable(self, enable: impl Into<ControlNet>) -> Self
pub fn with_init(self, value: impl Into<Const>) -> Self
pub fn has_clock(&self) -> bool
pub fn has_enable(&self) -> bool
pub fn has_reset(&self) -> bool
pub fn has_reset_value(&self) -> bool
pub fn has_clear(&self) -> bool
pub fn has_clear_value(&self) -> bool
pub fn has_init_value(&self) -> bool
pub fn remap_reset_over_enable(&mut self, design: &Design)
pub fn remap_enable_over_reset(&mut self, design: &Design)
Trait Implementations§
Source§impl Clone for MemoryReadFlipFlop
impl Clone for MemoryReadFlipFlop
Source§fn clone(&self) -> MemoryReadFlipFlop
fn clone(&self) -> MemoryReadFlipFlop
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MemoryReadFlipFlop
impl Debug for MemoryReadFlipFlop
Source§impl Hash for MemoryReadFlipFlop
impl Hash for MemoryReadFlipFlop
Source§impl PartialEq for MemoryReadFlipFlop
impl PartialEq for MemoryReadFlipFlop
impl Eq for MemoryReadFlipFlop
impl StructuralPartialEq for MemoryReadFlipFlop
Auto Trait Implementations§
impl Freeze for MemoryReadFlipFlop
impl RefUnwindSafe for MemoryReadFlipFlop
impl Send for MemoryReadFlipFlop
impl Sync for MemoryReadFlipFlop
impl Unpin for MemoryReadFlipFlop
impl UnwindSafe for MemoryReadFlipFlop
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.