prjunnamed_netlist

Struct MemoryReadFlipFlop

Source
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

Source

pub fn with_clock(self, clock: impl Into<ControlNet>) -> Self

Source

pub fn with_clear(self, clear: impl Into<ControlNet>) -> Self

Source

pub fn with_clear_value( self, clear: impl Into<ControlNet>, clear_value: impl Into<Const>, ) -> Self

Source

pub fn with_reset(self, reset: impl Into<ControlNet>) -> Self

Source

pub fn with_reset_value( self, reset: impl Into<ControlNet>, reset_value: impl Into<Const>, ) -> Self

Source

pub fn with_enable(self, enable: impl Into<ControlNet>) -> Self

Source

pub fn with_init(self, value: impl Into<Const>) -> Self

Source

pub fn has_clock(&self) -> bool

Source

pub fn has_enable(&self) -> bool

Source

pub fn has_reset(&self) -> bool

Source

pub fn has_reset_value(&self) -> bool

Source

pub fn has_clear(&self) -> bool

Source

pub fn has_clear_value(&self) -> bool

Source

pub fn has_init_value(&self) -> bool

Source

pub fn remap_reset_over_enable(&mut self, design: &Design)

Source

pub fn remap_enable_over_reset(&mut self, design: &Design)

Trait Implementations§

Source§

impl Clone for MemoryReadFlipFlop

Source§

fn clone(&self) -> MemoryReadFlipFlop

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MemoryReadFlipFlop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for MemoryReadFlipFlop

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for MemoryReadFlipFlop

Source§

fn eq(&self, other: &MemoryReadFlipFlop) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for MemoryReadFlipFlop

Source§

impl StructuralPartialEq for MemoryReadFlipFlop

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.