PandA-2024.02
RTL_characterization.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  */
42 #ifndef RTL_CHARACTERIZATION_HPP
43 #define RTL_CHARACTERIZATION_HPP
44 
46 #include "functional_unit_step.hpp"
47 
48 #include "custom_set.hpp"
49 #include "refcount.hpp"
50 #include <vector>
51 
56 // parameters
67 class xml_element;
68 class module;
70 
72 {
73  private:
76 
78  const std::string component;
79 
82 
85 
88 
89 #ifndef NDEBUG
90  const bool dummy_synthesis;
92 #endif
93 
98 
103  void resize_port(const structural_objectRef& port, unsigned int prec);
107  void specialize_fu(const module* mod, unsigned int prec, unsigned int bus_data_bitsize,
108  unsigned int bus_addr_bitsize, unsigned int bus_size_bitsize, unsigned int bus_tag_bitsize,
109  size_t portsize_value);
110 
114  void xwrite_device_file();
115 
119  void xwrite_characterization(xml_element* nodeRoot);
120 
123 
127  void fix_execution_time_std();
128 
133 
137  void fix_muxes();
138 
139  void add_input_register(structural_objectRef port_in, const std::string& register_library,
140  const std::string& port_prefix, structural_objectRef reset_port,
143 
145  structural_objectRef reset_port, structural_objectRef port_out,
146  const std::string& port_prefix, structural_objectRef clock_port,
147  const std::string& register_library);
148 
153  const std::string ComputeComponent(const std::string& input) const;
154 
159  const CustomSet<std::string> ComputeCells(const std::string& input) const;
160 
171  void AnalyzeCell(functional_unit* fu, const unsigned int prec, const std::vector<std::string>& portsize_parameters,
172  const size_t portsize_index, const std::vector<std::string>& pipe_parameters,
173  const size_t stage_index, const unsigned int constPort, const bool is_commutative,
174  size_t max_lut_size) override;
175 
176  public:
184  RTLCharacterization(const generic_deviceRef _device, const std::string& _cells,
185  const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters);
186 
190  ~RTLCharacterization() override;
191 
195  DesignFlowStep_Status Exec() override;
196 
201  bool HasToBeExecuted() const override;
202 
207  std::string GetSignature() const override;
208 
213  std::string GetName() const override;
214 
220  void ComputeRelationships(DesignFlowStepSet& relationship,
221  const DesignFlowStep::RelationshipType relationship_type) override;
222 
226  DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory() const override;
227 
231  void Initialize() override;
232 };
233 #endif
generic device description
void ComputeRelationships(DesignFlowStepSet &relationship, const DesignFlowStep::RelationshipType relationship_type) override
Compute the relationships of a step with other steps.
void resize_port(const structural_objectRef &port, unsigned int prec)
resize the port w.r.t a given precision
void xwrite_characterization(xml_element *nodeRoot)
Add the characterization to the output file.
REF_FORWARD_DECL(area_info)
void add_output_register(structural_managerRef SM, structural_objectRef e_port, structural_objectRef circuit, structural_objectRef reset_port, structural_objectRef port_out, const std::string &port_prefix, structural_objectRef clock_port, const std::string &register_library)
CONSTREF_FORWARD_DECL(Parameter)
int input[SIZE]
Definition: hash.h:1
DesignFlowStep_Status Exec() override
Perform RTL characterization of the modules with respect to the target device.
RelationshipType
The relationship type.
DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory() const override
Return the factory to create this type of steps.
area_infoRef prev_area_characterization
The area model of the last characterization.
void add_input_register(structural_objectRef port_in, const std::string &register_library, const std::string &port_prefix, structural_objectRef reset_port, structural_objectRef circuit, structural_objectRef clock_port, structural_objectRef e_port, structural_managerRef SM)
This class manages the circuit structures.
This class specifies the characteristic of a particular functional unit.
const CustomSet< std::string > cells
The cells to be characterized.
Abstract class to iterate over all the cells of a template.
time_infoRef prev_timing_characterization
The time model of the last characterization.
const CustomSet< std::string > ComputeCells(const std::string &input) const
Extract the cell lists.
void characterize_fu(const technology_nodeRef functional_unit)
Characterize the given functional unit with respect to the target device.
void fix_proxies_execution_time_std()
Fix execution/stage period value for proxies and bounded memory controllers.
CustomOrderedSet< std::string > completed
set of units completed with success
This class manages the technology library structures.
RTLCharacterization(const generic_deviceRef _device, const std::string &_cells, const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
Constructor.
redefinition of set to manage ordered/unordered structures
const std::string component
The component to be characterized.
const Wrefcount< const DesignFlowManager > design_flow_manager
The design flow manager.
const ParameterConstRef parameters
Set of input parameters.
DesignFlowStep_Status
The status of a step.
bool HasToBeExecuted() const override
Check if this step has actually to be executed.
void fix_execution_time_std()
Fix the execution time by removing set/hold/pad timings.
Template definition of refcount.
void fix_muxes()
fix the estimation of mux timing
This class manages the specific library structure.
library_managerRef LM
Library manager.
~RTLCharacterization() override
Destructor.
std::string GetName() const override
Return the name of this design step.
HDL writer base class used to specify the interface of the different language writers.
const bool dummy_synthesis
True if we are performing dummy synthesis.
std::string GetSignature() const override
Return a unified identifier of this design step.
void specialize_fu(const module *mod, unsigned int prec, unsigned int bus_data_bitsize, unsigned int bus_addr_bitsize, unsigned int bus_size_bitsize, unsigned int bus_tag_bitsize, size_t portsize_value)
Performing the specialization of the given object.
void AnalyzeCell(functional_unit *fu, const unsigned int prec, const std::vector< std::string > &portsize_parameters, const size_t portsize_index, const std::vector< std::string > &pipe_parameters, const size_t stage_index, const unsigned int constPort, const bool is_commutative, size_t max_lut_size) override
Analyze the single cell.
void xwrite_device_file()
Generate the output file.
void Initialize() override
Initialize the step (i.e., like a constructor, but executed just before exec.
This class describes a generic module.
Abstract pure class for the technology structure.
const std::string ComputeComponent(const std::string &input) const
Extract the component name from list of cells.
Base object for all the structural objects.
Step which loads device dependent technology information.

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