43 #ifndef BB_BASED_STG_HPP 44 #define BB_BASED_STG_HPP 96 bool can_be_moved(std::list<vertex>& lastStateEndingOp, std::list<vertex>& lastStateConditionalOpList,
136 void compute_use_def(
const std::list<vertex>& opEndingList,
const std::list<vertex>& opRuningList,
const HLS_managerRef HLSMgr
information about all the HLS synthesis
void move_without_duplication(const vertex stateToMove, const vertex secondLastState, const vertex destinationState, const std::map< vertex, std::list< vertex >> &global_starting_ops, const std::map< vertex, std::list< vertex >> &global_executing_ops, const std::map< vertex, std::list< vertex >> &global_ending_ops, const CustomOrderedSet< unsigned int > &defSet, const CustomOrderedSet< unsigned int > &useSet)
Copies all the operations of the state to move in the following.
Generic class managing all the stg creation algorithms.
void move_with_duplication(const vertex stateToMove, const vertex secondLastState, const vertex stateToClone, const std::map< vertex, std::list< vertex >> &global_starting_ops, const std::map< vertex, std::list< vertex >> &global_executing_ops, const std::map< vertex, std::list< vertex >> &global_ending_ops, const CustomOrderedSet< unsigned int > &defSet, const CustomOrderedSet< unsigned int > &useSet)
Duplicates the first state of the destination bb and copies all the operations of the state to move i...
RelationshipType
The relationship type.
DesignFlowStep_Status InternalExec() override
Execute the step.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
const CustomUnorderedSet< std::tuple< HLSFlowStep_Type, HLSFlowStepSpecializationConstRef, HLSFlowStep_Relationship > > ComputeHLSRelationships(const DesignFlowStep::RelationshipType relationship_type) const override
Return the set of analyses in relationship with this design step.
bool is_instantaneous_operation(vertex operation)
returns true if the operation takes no time
This class specifies the characteristic of a particular operation working on a given functional unit...
unsigned map[NUM_VERTICES]
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
Base class for all the STG creation algorithms.
vertex check_data_dependency(vertex operation, vertex state, std::map< vertex, std::list< vertex >> &global_starting_ops, std::map< vertex, std::list< vertex >> &global_executing_ops)
This method takes as parameters an operation and a state of the STG graph, and returns the operation ...
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
DesignFlowStep_Status
The status of a step.
bool can_be_moved(std::list< vertex > &lastStateEndingOp, std::list< vertex > &lastStateConditionalOpList, vertex firstStateNextBb, std::map< vertex, std::list< vertex >> &global_starting_ops, std::map< vertex, std::list< vertex >> &global_executing_ops)
Returns true if all the operations in the list can be moved to the state specified.
bool res_const_operation(vertex &operation, std::list< vertex > &lastStateExecutingOpList, vertex lastSt)
returns true if the number of fu available prevents us from moving that operation in the next state ...
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
void optimize_cycles(vertex bbEndingCycle, CustomUnorderedMap< vertex, vertex > &first_state, CustomUnorderedMap< vertex, vertex > &last_state, std::map< vertex, std::list< vertex >> &global_starting_ops, std::map< vertex, std::list< vertex >> &global_ending_ops, std::map< vertex, std::list< vertex >> &global_executing_ops, std::map< vertex, std::list< vertex >> &global_onfly_ops)
Given two bb linked by a forwarding edge, this method tries to move overlap the execution of the last...
BB_based_stg(const ParameterConstRef _parameters, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager)
Constructor.
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
void compute_EPP_edge_increments(const std::map< vertex, std::list< vertex >> &starting_ops) const
If hardware discrepancy analysis is activated, use this function to compute the edge increments for t...
CONSTREF_FORWARD_DECL(OpGraph)
void compute_use_def(const std::list< vertex > &opEndingList, const std::list< vertex > &opRuningList, const std::list< vertex > &ignoreList, CustomOrderedSet< unsigned int > &useSet, CustomOrderedSet< unsigned int > &defSet, const OpGraphConstRef data)
computes the variables used and defined in the by the given list of operations, and saves them in the...
Class used to describe a particular graph with operations as nodes.