PandA-2024.02
Public Member Functions | Protected Member Functions | Protected Attributes
FunctionalUnitStep Class Referenceabstract

Step which loads device dependent technology information. More...

#include <functional_unit_step.hpp>

Inheritance diagram for FunctionalUnitStep:
Inheritance graph
[legend]
Collaboration diagram for FunctionalUnitStep:
Collaboration graph
[legend]

Public Member Functions

 FunctionalUnitStep (const generic_deviceRef _device, const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
 Constructor. More...
 
 ~FunctionalUnitStep () override
 Destructor. More...
 
void Initialize () override
 Initialize the step (i.e., like a constructor, but executed just before exec. More...
 
- Public Member Functions inherited from DesignFlowStep
 DesignFlowStep (const DesignFlowManagerConstRef design_flow_manager, const ParameterConstRef parameters)
 Constructor. More...
 
virtual ~DesignFlowStep ()
 Destructor. More...
 
virtual DesignFlowStep_Status Exec ()=0
 Execute the step. More...
 
virtual bool HasToBeExecuted () const =0
 Check if this step has actually to be executed. More...
 
virtual std::string GetSignature () const =0
 Return a unified identifier of this design step. More...
 
virtual std::string GetName () const =0
 Return the name of this design step. More...
 
DesignFlowStep_Status GetStatus () const
 Return the status of this design step. More...
 
virtual void ComputeRelationships (DesignFlowStepSet &relationship, const DesignFlowStep::RelationshipType relationship_type)=0
 Compute the relationships of a step with other steps. More...
 
virtual void WriteDot (std::ostream &out) const
 Write the label for a dot graph. More...
 
virtual DesignFlowStepFactoryConstRef CGetDesignFlowStepFactory () const =0
 Return the factory to create this type of steps. More...
 
bool IsComposed () const
 Returns if this step is composed. More...
 
int CGetDebugLevel () const
 Return the debug level of the step. More...
 
virtual void PrintInitialIR () const
 Dump the initial intermediate representation. More...
 
virtual void PrintFinalIR () const
 Dump the final intermediate representation. More...
 

Protected Member Functions

virtual 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)=0
 Analyze the single cell. More...
 
virtual void AnalyzeFu (const technology_nodeRef f_unit)
 Analyze all the cells built starting from a template. More...
 
technology_nodeRef create_template_instance (const technology_nodeRef &fu_template, const std::string &name, unsigned int prec)
 Create a template instance to be specialized. More...
 

Protected Attributes

const technology_managerRef TM
 Technology manager. More...
 
const generic_deviceRef device
 device information More...
 
unsigned int has_first_synthesis_id
 The id of the first analyzed cell of a sequence of cells which differ for the position of the constant. More...
 
CustomMap< unsigned int, unsigned int > DSP_y_to_DSP_x
 The sizes of available DSPs. More...
 
- Protected Attributes inherited from DesignFlowStep
bool composed
 True if this step represents a composition of design flow steps (e.g., a flow); must be set by specialized constructors. More...
 
const Wrefcount< const DesignFlowManagerdesign_flow_manager
 The design flow manager. More...
 
const ParameterConstRef parameters
 Set of input parameters. More...
 
int debug_level
 The debug level. More...
 
const int output_level
 The output level. More...
 

Additional Inherited Members

- Public Types inherited from DesignFlowStep
enum  RelationshipType { DEPENDENCE_RELATIONSHIP, INVALIDATION_RELATIONSHIP, PRECEDENCE_RELATIONSHIP }
 The relationship type. More...
 

Detailed Description

Step which loads device dependent technology information.

Definition at line 60 of file functional_unit_step.hpp.

Constructor & Destructor Documentation

◆ FunctionalUnitStep()

FunctionalUnitStep::FunctionalUnitStep ( const generic_deviceRef  _device,
const DesignFlowManagerConstRef  design_flow_manager,
const ParameterConstRef  parameters 
)

Constructor.

Parameters
_deviceis the device
design_flow_manageris the design flow manager
parametersis the set of input parameters

Definition at line 62 of file functional_unit_step.cpp.

References ~FunctionalUnitStep().

Here is the call graph for this function:

◆ ~FunctionalUnitStep()

FunctionalUnitStep::~FunctionalUnitStep ( )
overridedefault

Destructor.

Referenced by FunctionalUnitStep().

Here is the caller graph for this function:

Member Function Documentation

◆ AnalyzeCell()

virtual void FunctionalUnitStep::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 
)
protectedpure virtual

Analyze the single cell.

Parameters
fuis the cell
precis the precision
portsize_parametersis the size of parameters
portsize_index
pipe_parameters
stage_index
constPortis the index of the constant port

Implemented in RTLCharacterization, and GenerateFuList.

Referenced by AnalyzeFu().

Here is the caller graph for this function:

◆ AnalyzeFu()

void FunctionalUnitStep::AnalyzeFu ( const technology_nodeRef  f_unit)
protectedvirtual

Analyze all the cells built starting from a template.

Parameters
fuis the corresponding functional unit

previous characterization is not considered

check for a single port

check if the resource can be pipelined

Definition at line 74 of file functional_unit_step.cpp.

References library_manager::add(), AnalyzeCell(), AND_GATE_STD, structural_type_descriptor::BOOL, CLOCK_PORT_NAME, CONSTANT_STD, create_template_instance(), DesignFlowStep::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, DEMUX_GATE_STD, device, DONE_PORT_NAME, DSP_y_to_DSP_x, NP_functionality::exist_NP_functionality(), NP_functionality::FLOPOCO_PROVIDED, functional_unit::fu_template_parameters, technology_manager::get_fu(), structural_object::get_id(), module::get_in_port(), module::get_in_port_size(), technology_manager::get_library(), technology_manager::get_library_manager(), technology_node::get_name(), functional_unit::get_name(), module::get_out_port(), module::get_out_port_size(), structural_object::get_typeRef(), has_first_synthesis_id, INDENT_DBG_MEX, LUT_GATE_STD, lenet_tvm::mod, MUX_GATE_STD, NAND_GATE_STD, NOR_GATE_STD, OR_GATE_STD, READ_COND_STD, RESET_PORT_NAME, resize_1_8_pow2(), SplitString(), START_PORT_NAME, STR, NP_functionality::SYSTEM_VERILOG_PROVIDED, THROW_ASSERT, THROW_ERROR, TM, structural_type_descriptor::type, structural_type_descriptor::VECTOR_INT, structural_type_descriptor::VECTOR_REAL, structural_type_descriptor::VECTOR_UINT, NP_functionality::VERILOG_PROVIDED, NP_functionality::VHDL_PROVIDED, XNOR_GATE_STD, and XOR_GATE_STD.

Referenced by GenerateFuList::Exec(), and RTLCharacterization::Exec().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_template_instance()

technology_nodeRef FunctionalUnitStep::create_template_instance ( const technology_nodeRef fu_template,
const std::string &  name,
unsigned int  prec 
)
protected

Create a template instance to be specialized.

Definition at line 543 of file functional_unit_step.cpp.

References time_info::factory(), area_info::factory(), functional_unit::functional_unit_name, operation::operation_name, DesignFlowStep::parameters, and THROW_ASSERT.

Referenced by AnalyzeFu().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

void FunctionalUnitStep::Initialize ( )
overridevirtual

Initialize the step (i.e., like a constructor, but executed just before exec.

Reimplemented from DesignFlowStep.

Reimplemented in RTLCharacterization.

Definition at line 525 of file functional_unit_step.cpp.

References device, DSP_y_to_DSP_x, SplitString(), and THROW_ASSERT.

Referenced by RTLCharacterization::Initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ device

const generic_deviceRef FunctionalUnitStep::device
protected

◆ DSP_y_to_DSP_x

CustomMap<unsigned int, unsigned int> FunctionalUnitStep::DSP_y_to_DSP_x
protected

The sizes of available DSPs.

Definition at line 73 of file functional_unit_step.hpp.

Referenced by AnalyzeFu(), and Initialize().

◆ has_first_synthesis_id

unsigned int FunctionalUnitStep::has_first_synthesis_id
protected

The id of the first analyzed cell of a sequence of cells which differ for the position of the constant.

Definition at line 70 of file functional_unit_step.hpp.

Referenced by GenerateFuList::AnalyzeCell(), RTLCharacterization::AnalyzeCell(), and AnalyzeFu().

◆ TM

const technology_managerRef FunctionalUnitStep::TM
protected

The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:03:52 for PandA-2024.02 by doxygen 1.8.13