calyx_opt::analysis

Struct ParNodes

Source
pub struct ParNodes {
    pub group_name: Id,
    pub latency: u64,
    pub num_repeats: u64,
    pub threads: Vec<(Node, (u64, u64))>,
}
Expand description

Represents a group of Nodes that execute in parallel.

Fields§

§group_name: Id

Name of the par_group that fires off the threads

§latency: u64

Latency

§num_repeats: u64

Num Repeats

§threads: Vec<(Node, (u64, u64))>

(Thread, interval thread is active). Interval thread is active should always start at 0.

Implementations§

Source§

impl ParNodes

Source

pub fn instantiate_fsms( &mut self, builder: &mut Builder<'_>, coloring: &HashMap<Id, Id>, colors_to_max_values: &HashMap<Id, (u64, u64)>, colors_to_fsm: &mut HashMap<Id, (Option<RRC<StaticFSM>>, Option<RRC<StaticFSM>>)>, one_hot_cutoff: u64, )

Instantiates FSMs by recursively instantiating FSM for each thread.

Source

pub fn count_to_n( &mut self, builder: &mut Builder<'_>, incr_start_cond: Option<Guard<Nothing>>, )

Counts to N by recursively calling count_to_n on each thread.

Source

pub fn realize( &mut self, ignore_timing_guards: bool, static_groups: &Vec<RRC<StaticGroup>>, reset_early_map: &mut HashMap<Id, Id>, fsm_info_map: &mut HashMap<Id, (Id, Guard<Nothing>, Guard<Nothing>)>, group_rewrites: &mut PortRewriteMap, builder: &mut Builder<'_>, )

Realizes static groups into dynamic group.

Source

pub fn get_longest_node(&mut self) -> &mut SingleNode

Recursively searches each thread to get the longest (in terms of cycle counts) SingleNode.

Source

pub fn query_between( &mut self, query: (u64, u64), builder: &mut Builder<'_>, ) -> Guard<Nothing>

Use the longest node to query between.

Source§

impl ParNodes

Used to add conflicts for graph coloring for sharing FSMs. See the equivalent SingleNode implementation for more details.

Source

pub fn get_all_nodes(&self) -> Vec<Id>

Source

pub fn add_conflicts(&self, conflict_graph: &mut GraphColoring<Id>)

Source

pub fn get_max_value<F>(&self, name: &Id, f: &F) -> u64
where F: Fn(&SingleNode) -> u64,

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> 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. 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.