Module analysis

Source
Expand description

Analysis for Calyx programs.

The analyses construct data-structures that make answering certain queries about Calyx programs easier.

Modules§

reaching_defns
Calculate the reaching definitions in a control program.

Structs§

CompactionAnalysis
Struct to perform compaction on seqs. It will only work if you update_cont_read_writes for each component that you run it on.
ControlId
Adding “NODE_ID”, “BEGIN_ID”, and “END_ID” attribute to control statement
ControlOrder
Extract the dependency order of a list of control programs. Dependencies are defined using read/write sets used in the control program. The read/write sets ignore ports on constants and ThisComponent.
ControlPorts
Contains a mapping from name of ir::CombGroup to the ports read by the control program as well as the mapping from invoke statements to the port mappings. The vector of ports is guaranteed to only contain unique ports.
DataflowOrder
Given a set of assignment, generates an ordering that respects combinatinal dataflow.
DominatorMap
Builds a Domination Map for the control program. It maps nodes to sets of nodes. Here is what is included as a “node” in the domination map:
GoDone
Struct to store information about the go-done interfaces defined by a primitive. There is no default implementation because it will almost certainly be very unhelpful: you will want to use from_ctx.
GraphAnalysis
Constructs a graph based representation of a component. Each node represents a ir::Port and each directed edge (X -> Y) means that X’s value written to Y.
GraphColoring
Defines a greedy graph coloring algorithm over a generic conflict graph.
IncompleteTransition
Represents an FSM transition that doesn’t yet have a destination state.
InferenceAnalysis
Default implemnetation is almost certainly not helpful. You should probably use from_ctx instead.
LiveRangeAnalysis
This analysis implements a parallel version of a classic liveness analysis. For each group or invoke, it returns a list of the state shareable cells that are “alive” during an execution of a group or invoke statement (we identify an invoke statement by the cell that is being invoked, and groups by the name of the group).
ParNodes
Represents a group of Nodes that execute in parallel.
PortInterface
Helper methods to parse @read_together and @write_together specifications
PromotionAnalysis
ReadWriteSet
Calcuate the reads-from and writes-to set for a given set of assignments.
ScheduleConflicts
A conflict graph that describes which nodes (i.e. groups/invokes) are being run in parallel to each other.
ShareSet
Stores a Hashset that contains the type names of all components and primitives marked with either “share” or “state_share”,depending on what the user wants. Methods implemented by this struct can be used to determine whether a given cell is shareable or not Used by live_range_analysis.rs, cell_share.rs, and infer_share.rs
SingleNode
SingleNode struct.
StaticFSM
Represents a static FSM (i.e., the actual register in hardware that counts)
StaticParTiming
Calculate live ranges across static par blocks. Assumes control ids have already been given; it does not add its own
StaticSchedule
An instance of StaticSchedule is constrainted to live at least as long as the component in which the static island that it represents lives.
VariableDetection
Detects if a group is solely being used to update a register.

Enums§

FSMEncoding
Node
Node can either be a SingleNode (i.e., a single node) or ParNodes (i.e., a group of nodes that are executing in parallel). Most methods in Node simply call the equivalent methods for each of the two possible variants. Perhaps could be more compactly implemented as a Trait.
StateType
Helpful for translating queries for the FSMTree structure. Because of the tree structure, %[i:j] is no longer is always equal to i <= fsm < j. Offload(i) means the FSM is offloading when fsm == i: so if the fsm == i, we need to look at the children to know what cycle we are in exactly. Normal(i,j) means the FSM is outputing (i..j), incrementing each cycle (i.e., like normal) and not offloading. Note that even though the FSM is outputting i..j each cycle, that does not necesarily mean we are in cycles i..j (due to offloading performed in the past.)

Traits§

AssignmentAnalysis
Analyzes that can be performed on a set of assignments.
IntoStatic
WithStatic
Trait to propagate and extra “static” attributes through ir::Control. Calling the update function ensures that the current program, as well as all sub-programs have a “static” attribute on them. Usage: