OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
ProGe::GeneratableFUNetlistBlock Class Reference

#include <GeneratableFUNetlistBlock.hh>

Inheritance diagram for ProGe::GeneratableFUNetlistBlock:
Inheritance graph
Collaboration diagram for ProGe::GeneratableFUNetlistBlock:
Collaboration graph

Public Member Functions

 GeneratableFUNetlistBlock (const std::string &moduleName, const std::string instanceName, NetlistGenerator &generator)
 
virtual ~GeneratableFUNetlistBlock ()=default
 
void addInOperand (TTAMachine::FUPort *port, int id)
 
void addOutOperand (TTAMachine::FUPort *port)
 
- Public Member Functions inherited from ProGe::NetlistBlock
 NetlistBlock (const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=NULL)
 
virtual ~NetlistBlock ()
 
void setParameter (const std::string &name, const std::string &type, const std::string &value)
 
void removePort (NetlistPort &port)
 
virtual NetlistPortport (const std::string &portName, bool partialMatch=true)
 
NetlistBlocksubBlock (size_t index) override
 
virtual const NetlistBlockparentBlock () const override
 
virtual NetlistBlockparentBlock () override
 
NetlistBlockshallowCopy (const std::string &instanceName) const
 
virtual void write (const Path &targetBaseDir, HDL targetLang=VHDL) const override
 
void addParameter (const Parameter &param)
 
void setParameter (const Parameter &param)
 
virtual const Parameterparameter (const std::string &name) const
 
virtual const Parameterparameter (size_t index) const
 
Parameterparameter (const std::string &name)
 
NetlistPortaddPort (NetlistPort *port)
 
void removePort (NetlistPort *port)
 
virtual size_t portCount () const
 
virtual const NetlistPortport (size_t index) const
 
virtual const NetlistPortport (const std::string &portName, bool partialMatch=true) const
 
virtual NetlistPortport (size_t index)
 
void addPortGroup (NetlistPortGroup *portGroup)
 
void addSubBlock (BaseNetlistBlock *subBlock, const std::string &instanceName="")
 
virtual size_t subBlockCount () const
 
virtual const Netlistnetlist () const
 
Netlistnetlist ()
 
void addPackage (const std::string &packageName)
 
virtual size_t packageCount () const
 
virtual const std::string & package (size_t idx) const
 
- Public Member Functions inherited from ProGe::BaseNetlistBlock
 BaseNetlistBlock ()
 
 BaseNetlistBlock (BaseNetlistBlock *parent)
 
 BaseNetlistBlock (const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=nullptr)
 
virtual ~BaseNetlistBlock ()
 
const std::string & instanceName () const
 
void setInstanceName (const std::string &name)
 
const std::string & moduleName () const
 
const std::string name () const
 
virtual size_t subBlockCount () const
 
virtual const BaseNetlistBlocksubBlock (size_t index) const
 
virtual bool hasSubBlock (const std::string &instanceName) const
 
virtual bool isSubBlock (const BaseNetlistBlock &block) const
 
virtual bool hasParameter (const std::string &name) const
 
virtual const Parameterparameter (const std::string &name) const
 
virtual size_t parameterCount () const
 
virtual const Parameterparameter (size_t index) const
 
virtual size_t portCount () const
 
virtual const NetlistPortport (size_t index) const
 
virtual std::vector< const NetlistPort * > portsBy (SignalType type) const
 
virtual const NetlistPortportBy (SignalType type, size_t index=0) const
 
virtual bool hasPortsBy (SignalType type) const
 
virtual const NetlistPortport (const std::string &portName, bool partialMatch=true) const
 
virtual size_t portGroupCount () const
 
virtual const NetlistPortGroupportGroup (size_t index) const
 
virtual std::vector< const NetlistPortGroup * > portGroupsBy (SignalGroupType type) const
 
virtual const Netlistnetlist () const
 
virtual bool hasParentBlock () const
 
virtual bool isVirtual () const
 
virtual void build () override
 
virtual void connect () override
 
virtual void finalize () override
 
virtual void writeSelf (const Path &targetBaseDir, HDL targetLang=VHDL) const
 
virtual size_t packageCount () const
 
virtual const std::string & package (size_t idx) const
 
PortContainerTypeports ()
 
virtual bool isLeaf () const
 
BaseNetlistBlockshallowCopy (const std::string &instanceName="") const
 
- Public Member Functions inherited from ProGe::IGenerationPhases
virtual ~IGenerationPhases ()
 

Private Attributes

NetlistGeneratorgenerator_
 

Additional Inherited Members

- Public Types inherited from ProGe::BaseNetlistBlock
typedef std::vector< BaseNetlistBlock * > BlockContainerType
 
typedef std::vector< ParameterParameterContainerType
 
typedef std::vector< NetlistPort * > PortContainerType
 
typedef std::vector< NetlistPortGroup * > PortGroupContainerType
 
- Protected Member Functions inherited from ProGe::BaseNetlistBlock
Netlistnetlist ()
 
virtual NetlistPortport (size_t index)
 
void setModuleName (const std::string &name)
 
void addSubBlock (BaseNetlistBlock *subBlock, const std::string &instanceName="")
 
void deleteSubBlock (BaseNetlistBlock *subBlock)
 
void removeSubBlock (BaseNetlistBlock *subBlock)
 
NetlistPortaddPort (NetlistPort *port)
 
void removePort (NetlistPort *port)
 
void addPortGroup (NetlistPortGroup *portGroup)
 
void removePortGroup (NetlistPortGroup *portGroup)
 
void setParameter (const Parameter &param)
 
void addParameter (const Parameter &param)
 
Parameterparameter (const std::string &name)
 
NetlistPortfindPort (const std::string &portName, bool recursiveSearch=false, bool partialMatch=true) const
 
void addPackage (const std::string &packageName)
 
void connectClocks ()
 
void connectResets ()
 

Detailed Description

Definition at line 40 of file GeneratableFUNetlistBlock.hh.

Constructor & Destructor Documentation

◆ GeneratableFUNetlistBlock()

ProGe::GeneratableFUNetlistBlock::GeneratableFUNetlistBlock ( const std::string &  moduleName,
const std::string  instanceName,
NetlistGenerator generator 
)
inline

Definition at line 42 of file GeneratableFUNetlistBlock.hh.

◆ ~GeneratableFUNetlistBlock()

virtual ProGe::GeneratableFUNetlistBlock::~GeneratableFUNetlistBlock ( )
virtualdefault

Member Function Documentation

◆ addInOperand()

void ProGe::GeneratableFUNetlistBlock::addInOperand ( TTAMachine::FUPort port,
int  id 
)
inline

Definition at line 48 of file GeneratableFUNetlistBlock.hh.

48  {
49  (void) id;
50  NetlistPort* dataPort =
51  new NetlistPort("data_" + port->name() + "_in",
52  std::to_string(port->width()), BIT_VECTOR, IN, *this);
53  NetlistPort* loadPort = new NetlistPort(
54  "load_" + port->name() + "_in", "1", BIT, IN, *this);
55  generator_.mapLoadPort(*dataPort, *loadPort);
56  generator_.mapNetlistPort(*port, *dataPort);
57  }

References ProGe::BIT, ProGe::BIT_VECTOR, generator_, ProGe::IN, ProGe::NetlistGenerator::mapLoadPort(), ProGe::NetlistGenerator::mapNetlistPort(), ProGe::NetlistPort::name(), ProGe::BaseNetlistBlock::NetlistPort, and ProGe::NetlistBlock::port().

Referenced by ProGe::NetlistGenerator::addGeneratableFUsToNetlist().

Here is the call graph for this function:

◆ addOutOperand()

void ProGe::GeneratableFUNetlistBlock::addOutOperand ( TTAMachine::FUPort port)
inline

Definition at line 58 of file GeneratableFUNetlistBlock.hh.

58  {
59  NetlistPort* dataPort =
60  new NetlistPort("data_" + port->name() + "_out",
61  std::to_string(port->width()), BIT_VECTOR, OUT, *this);
62  generator_.mapNetlistPort(*port, *dataPort);
63  }

References ProGe::BIT_VECTOR, generator_, ProGe::NetlistGenerator::mapNetlistPort(), ProGe::NetlistPort::name(), ProGe::BaseNetlistBlock::NetlistPort, ProGe::OUT, and ProGe::NetlistBlock::port().

Referenced by ProGe::NetlistGenerator::addGeneratableFUsToNetlist().

Here is the call graph for this function:

Member Data Documentation

◆ generator_

NetlistGenerator& ProGe::GeneratableFUNetlistBlock::generator_
private

Definition at line 66 of file GeneratableFUNetlistBlock.hh.

Referenced by addInOperand(), and addOutOperand().


The documentation for this class was generated from the following file:
ProGe::NetlistGenerator::mapLoadPort
void mapLoadPort(const NetlistPort &port, NetlistPort &loadPort)
Definition: NetlistGenerator.cc:1691
ProGe::BIT_VECTOR
@ BIT_VECTOR
Several bits.
Definition: ProGeTypes.hh:48
ProGe::GeneratableFUNetlistBlock::generator_
NetlistGenerator & generator_
Definition: GeneratableFUNetlistBlock.hh:66
ProGe::BaseNetlistBlock::instanceName
const std::string & instanceName() const
Definition: BaseNetlistBlock.cc:135
ProGe::BIT
@ BIT
One bit.
Definition: ProGeTypes.hh:47
ProGe::NetlistPort::name
std::string name() const
Definition: NetlistPort.cc:283
ProGe::OUT
@ OUT
Output port.
Definition: ProGeTypes.hh:54
ProGe::BaseNetlistBlock::moduleName
const std::string & moduleName() const
Definition: BaseNetlistBlock.cc:140
ProGe::NetlistBlock::NetlistBlock
NetlistBlock(const std::string &moduleName, const std::string &instanceName, BaseNetlistBlock *parent=NULL)
Definition: NetlistBlock.cc:68
ProGe::NetlistBlock::port
virtual NetlistPort * port(const std::string &portName, bool partialMatch=true)
Definition: NetlistBlock.cc:97
ProGe::BaseNetlistBlock::NetlistPort
friend class NetlistPort
Definition: BaseNetlistBlock.hh:61
ProGe::IN
@ IN
Input port.
Definition: ProGeTypes.hh:53
ProGe::NetlistGenerator::mapNetlistPort
void mapNetlistPort(const TTAMachine::Port &adfPort, NetlistPort &netlistPort)
Definition: NetlistGenerator.cc:1650