PandA-2024.02
hls_function_step.hpp
Go to the documentation of this file.
1 /*
2  *
3  * _/_/_/ _/_/ _/ _/ _/_/_/ _/_/
4  * _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/
5  * _/_/_/ _/_/_/_/ _/ _/_/ _/ _/ _/_/_/_/
6  * _/ _/ _/ _/ _/ _/ _/ _/ _/
7  * _/ _/ _/ _/ _/ _/_/_/ _/ _/
8  *
9  * ***********************************************
10  * PandA Project
11  * URL: http://panda.dei.polimi.it
12  * Politecnico di Milano - DEIB
13  * System Architectures Group
14  * ***********************************************
15  * Copyright (C) 2004-2024 Politecnico di Milano
16  *
17  * This file is part of the PandA framework.
18  *
19  * The PandA framework is free software; you can redistribute it and/or modify
20  * it under the terms of the GNU General Public License as published by
21  * the Free Software Foundation; either version 3 of the License, or
22  * (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program. If not, see <http://www.gnu.org/licenses/>.
31  *
32  */
41 #ifndef HLS_FUNCION_STEP_HPP
42 #define HLS_FUNCION_STEP_HPP
43 
45 #include "hls_step.hpp"
46 
47 class HLSFunctionStep : public HLS_step
48 {
49  protected:
51  std::map<unsigned int, unsigned int> last_bb_ver;
52 
54  std::map<unsigned int, unsigned int> last_bitvalue_ver;
55 
57  const unsigned int funId;
58 
61 
63  unsigned int bb_version;
64 
66  unsigned int bitvalue_version;
67 
69  unsigned int memory_version;
70 
71  void ComputeRelationships(DesignFlowStepSet& design_flow_step_set,
72  const DesignFlowStep::RelationshipType relationship_type) override;
73 
78  virtual DesignFlowStep_Status InternalExec() = 0;
79 
80  private:
81  bool HasToBeExecuted0() const;
82 
83  public:
92  const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId,
93  const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type,
95 
99  ~HLSFunctionStep() override;
100 
105  bool HasToBeExecuted() const override;
106 
110  void Initialize() override;
111 
116  std::string GetSignature() const final;
117 
125  static std::string ComputeSignature(const HLSFlowStep_Type hls_flow_step_type,
127  const unsigned int function_id);
128 
133  std::string GetName() const final;
134 
139  DesignFlowStep_Status Exec() final;
140 };
141 #endif
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
const HLS_managerRef HLSMgr
information about all the HLS synthesis
Definition: hls_step.hpp:205
std::map< unsigned int, unsigned int > last_bb_ver
last bb version of the called functions
unsigned int bitvalue_version
The version of bitvalue on which this step was applied.
RelationshipType
The relationship type.
HLSFunctionStep(const ParameterConstRef Param, const HLS_managerRef HLSMgr, unsigned int funId, const DesignFlowManagerConstRef design_flow_manager, const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization=HLSFlowStepSpecializationConstRef())
Constructor.
const unsigned int funId
identifier of the function to be processed (0 means that it is a global step)
unsigned int memory_version
The version of memory representation on which this step was applied.
virtual DesignFlowStep_Status InternalExec()=0
Execute the step.
Definition of hash function for EdgeDescriptor.
Definition: graph.hpp:1321
const HLSFlowStep_Type hls_flow_step_type
The type of this step.
Definition: hls_step.hpp:208
static std::string ComputeSignature(const HLSFlowStep_Type hls_flow_step_type, const HLSFlowStepSpecializationConstRef hls_flow_step_specialization, const unsigned int function_id)
Compute the signature of a hls flow step.
void ComputeRelationships(DesignFlowStepSet &design_flow_step_set, const DesignFlowStep::RelationshipType relationship_type) override
Compute the relationships of a step with other steps.
std::string GetSignature() const final
Return a unified identifier of this design step.
HLSFlowStep_Type
Definition: hls_step.hpp:95
unsigned int bb_version
The version of bb intermediate representation on which this step was applied.
std::map< unsigned int, unsigned int > last_bitvalue_ver
The version of bit value IR representation on which this step was applied.
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
DesignFlowStep_Status
The status of a step.
std::string GetName() const final
Return the name of this design step.
hlsRef HLS
HLS data structure of the function to be analyzed.
DesignFlowStep_Status Exec() final
Execute the step.
~HLSFunctionStep() override
Destructor.
refcount< const HLSFlowStepSpecialization > HLSFlowStepSpecializationConstRef
const refcount definition of the class
Definition: hls_step.hpp:93
Superclass include.
bool HasToBeExecuted0() const
const HLSFlowStepSpecializationConstRef hls_flow_step_specialization
The information about specialization.
Definition: hls_step.hpp:211

Generated on Mon Feb 12 2024 13:02:53 for PandA-2024.02 by doxygen 1.8.13