pub struct ReadWriteSet;
Expand description

Calcuate the reads-from and writes-to set for a given set of assignments.

Implementations§

source§

impl ReadWriteSet

source

pub fn port_reads<T>( assign: &Assignment<T> ) -> impl Iterator<Item = RRC<Port>> + '_

Returns ir::Port that are read from in the given Assignment.

source

pub fn port_read_set<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + 'a ) -> impl Iterator<Item = RRC<Port>> + 'a

Returns ir::Port which are read from in the assignments.

source

pub fn port_write_set<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + 'a ) -> impl Iterator<Item = RRC<Port>> + 'a

Returns ir::Port which are written to in the assignments.

source

pub fn read_set<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + 'a ) -> impl Iterator<Item = RRC<Cell>> + 'a

Returns ir::Cell which are read from in the assignments. Ignores reads from group holes.

source

pub fn write_set<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + 'a ) -> impl Iterator<Item = RRC<Cell>> + 'a

Returns ir::Cell which are written to by the assignments. Ignores reads from group holes.

source

pub fn register_reads<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + Clone + 'a ) -> impl Iterator<Item = RRC<Cell>> + 'a

Returns the register cells whose out port is read anywhere in the given assignments

source

pub fn must_write_set<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + 'a ) -> impl Iterator<Item = RRC<Cell>> + 'a

Return the name of the cells that these assignments write to for writes that are guarded by true. Ignores writes to group holes.

source

pub fn uses<'a, T: 'a>( assigns: impl Iterator<Item = &'a Assignment<T>> + Clone + 'a ) -> impl Iterator<Item = RRC<Cell>> + 'a

Returns all uses of cells in this group. Uses constitute both reads and writes to cells.

source§

impl ReadWriteSet

source

pub fn control_port_read_write_set_static( scon: &StaticControl ) -> (Vec<RRC<Port>>, Vec<RRC<Port>>)

Returns the ports that are read by the given control program.

source

pub fn control_port_read_write_set( con: &Control ) -> (Vec<RRC<Port>>, Vec<RRC<Port>>)

Returns the ports that are read by the given control program.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.