|
My Project
|

Public Member Functions | |
| DFnetlist () | |
| Implementation of DFnet;. More... | |
| ~DFnetlist () | |
| Default destructor. | |
| DFnetlist (const std::string &name) | |
| Constructor. It reads a netlist from a file. More... | |
| DFnetlist (FILE *file) | |
| Constructor. It creates a netlist from a file descriptor. The file is assumed to be opened. More... | |
| DFnetlist (const std::string &name, const std::string &name_bb) | |
| Constructor. It creates a netlist from two files. first file consists of blocks. second file consists of basic blocks. More... | |
| DFnetlist (const DFnetlist &other) | |
| Copy constructor. | |
| void | setMilpSolver (const std::string &solver="cbc") |
| Sets the solver for MILP optimization problems. More... | |
| bool | check () |
| Checks that the netlist is well-formed. More... | |
| const std::string & | getName () const |
| blockID | createBlock (BlockType type, const std::string &name="") |
| Creates a new block in the netlist. More... | |
| blockID | getBlock (const std::string &name) const |
| Returns a block id of the netlist. More... | |
| const std::string & | getBlockName (blockID id) const |
| Returns the name of a block. More... | |
| double | getBlockDelay (blockID id, int indx) const |
| Returns the delay of a block. More... | |
| void | setBlockDelay (blockID id, double d, int indx) |
| Sets the delay of a block. More... | |
| double | getBlockRetimingDiff (blockID id) const |
| void | setBlockRetimingDiff (blockID id, double retimingDiff) |
| int | getLatency (blockID id) const |
| Returns the latency of a block. More... | |
| void | setLatency (blockID id, int lat) |
| Sets the latency of a block. More... | |
| int | getInitiationInterval (blockID id) const |
| Returns the initiation interval of a block. More... | |
| void | setInitiationInterval (blockID id, int ii) |
| Sets the initiation interval of a block. More... | |
| void | setExecutionFrequency (blockID id, double freq) |
| Sets the execution frequency of a block. More... | |
| int | getExecutionFrequency (blockID id) const |
| Returns the execution frequency of a block. More... | |
| void | setTrueFrac (blockID id, double freq) |
| Sets the true/false exe. fraction of a select op. More... | |
| double | getTrueFrac (blockID id) const |
| int | getBufferSize (blockID id) const |
| Returns the number of slots of an elastic buffer. More... | |
| void | setBufferSize (blockID id, int slots) |
| Sets the number of slots of an elastic buffer. More... | |
| bool | isBufferTransparent (blockID id) const |
| Checks whether the buffer is transparent. More... | |
| void | setBufferTransparency (blockID id, bool value) |
| Sets the transparency of an elastic buffer. More... | |
| blockID | getBlockFromPort (portID p) const |
| void | removeBlock (blockID block) |
| Removes a block and all the associated channels from the netlist. More... | |
| portID | createPort (blockID block, bool isInput, const std::string &name="", int width=-1, PortType type=GENERIC_PORT) |
| Adds a new port to a block. More... | |
| void | removePort (portID port) |
| Removes a port and the associated channels from the netlist. More... | |
| portID | getPort (blockID block, const std::string &name) const |
| Returns the id of a port from a given block and pin name. More... | |
| const std::string & | getPortName (portID port, bool full=true) const |
| Returns the name of a port. More... | |
| PortType | getPortType (portID port) const |
| Returns the type of a port. More... | |
| bool | isInputPort (portID port) const |
| Indicates whether a port is input. More... | |
| bool | isOutputPort (portID port) const |
| Indicates whether a port is output. More... | |
| int | getPortWidth (portID port) const |
| Returns the width of a port. More... | |
| bool | isBooleanPort (portID port) const |
| Checks whether a port is Boolean. More... | |
| bool | isControlPort (portID port) const |
| Checks whether a port is a control port. More... | |
| double | getPortDelay (portID port) const |
| Returns the delay of a port. More... | |
| void | setPortDelay (portID port, double d) |
| Sets the delay of a port. More... | |
| const setPorts & | getPorts (blockID id, PortDirection dir) const |
| Returns the set of ports with a certain direction. More... | |
| portID | getConditionalPort (blockID id) const |
| portID | getTruePort (blockID id) const |
| portID | getFalsePort (blockID id) const |
| portID | getDemuxDataPort (blockID id) const |
| portID | getDemuxComplementaryPort (portID port) const |
| Returns the complementary port associated to one of the ports of a demux. If the parameter is an input control port, it returns the corresponding output data port, and vice versa. More... | |
| channelID | getConnectedChannel (portID port) const |
| Returns the channel associated to a port. More... | |
| BlockType | getBlockType (blockID block) const |
| Returns the block type associated to a block. More... | |
| bool | isPortConnected (portID port) const |
| Checks whether a port is connected. More... | |
| portID | getConnectedPort (portID port) const |
| Returns the opposite port connected to the same channel. More... | |
| channelID | createChannel (portID src, portID dst) |
| Creates a channel between two ports. More... | |
| portID | getSrcPort (channelID id) const |
| Returns the source port of a channel. More... | |
| portID | getDstPort (channelID id) const |
| Returns the destination port of a channel. More... | |
| void | removeChannel (channelID id) |
| Removes a channel. More... | |
| std::string | getChannelName (channelID id, bool full=true) const |
| Returns the name of the channel. More... | |
| channelID | getChannelID (portID id) |
| Returns the channel ID. More... | |
| int | getChannelBufferSize (channelID id) const |
| Returns the number of slots of the elastic buffer in the channel. More... | |
| void | setChannelBufferSize (blockID id, int slots) |
| Sets the number of slots of the elastic buffer in the channel. More... | |
| bool | isChannelTransparent (channelID id) const |
| Checks whether the buffer of the channel is transparent. More... | |
| void | setChannelTransparency (channelID id, bool value) |
| Sets the transparency of the elastic buffer in the channel. More... | |
| void | setChannelEB (channelID id) |
| Sets the presence of an EB on the channel. More... | |
| bool | getChannelEB (channelID id) |
| Gets the presence of an EB on the channel. More... | |
| void | setChannelFrequency (channelID id, double value) |
| double | getChannelFrequency (channelID id) |
| bool | hasBuffer (channelID id) const |
| Checks whether a channel has an elastic buffer (slots > 0). More... | |
| blockID | insertBuffer (channelID c, int slots, bool transparent) |
| Inserts a buffer in a channel. The insertion removes the previous channel and creates two new channels. More... | |
| blockID | insertBuffer (channelID c, int slots, bool transparent, bool EB) |
| Inserts a buffer in a channel. The insertion removes the previous channel and creates two new channels. More... | |
| void | removeBuffer (blockID buf) |
| Removes a buffer and reconnects the input and output channels. More... | |
| void | setError (const std::string &err) |
| Sets an error message for the netlist. More... | |
| const std::string & | getError () const |
| void | clearError () |
| Erases the error. | |
| bool | hasError () const |
| Indicates whether there is an error. More... | |
| int | numBlocks () const |
| int | numChannels () const |
| int | numPorts () const |
| bool | validPort (portID p) const |
| bool | validBlock (blockID id) const |
| Indicates whether a block id is valid. More... | |
| bool | validChannel (channelID id) const |
| Indicates whether a channel id is valid. More... | |
| void | reduceMerges () |
| Reduce the number of merges since 1 input merges can be reduced to a wire. | |
| bool | writeDot (const std::string &filename="") |
| Writes the dataflow netlist in dot format. More... | |
| bool | writeDot (std::ostream &s) |
| Writes the dataflow netlist in dot format. More... | |
| bool | writeDotMG (const std::string &filename="") |
| bool | writeDotMG (std::ostream &s) |
| bool | writeDotBB (std::ostream &s) |
| bool | writeDotBB (const std::string &filename="") |
| bool | writeBasicBlockDot (const std::string &filename="") |
| Writes the Basic Blocks of the dataflow netlist in dot format. More... | |
| bool | writeBasicBlockDot (std::ostream &s) |
| Writes the Basic Blocks of the dataflow netlist in dot format. More... | |
| bool | addElasticBuffers (double Period=0, double BufferDelay=0, bool maxThroughput=false, double coverage=0) |
| Adds elastic buffers to meet a certain cycle period and have elasticity in the system. More... | |
| bool | addElasticBuffersBB (double Period=0, double BufferDelay=0, bool maxThroughput=false, double coverage=0, int timeout=-1, bool first_MG=false) |
| bool | addElasticBuffersBB_sc (double Period=0, double BufferDelay=0, bool maxThroughput=false, double coverage=0, int timeout=-1, bool first_MG=false, const std::string &model_mode="default", const std::string &lib_path="") |
| void | instantiateElasticBuffers () |
| Creates buffers for all those channels annotated with buffers. The information in the channels is deleted. | |
| void | instantiateAdditionalElasticBuffers (const std::string &filename) |
| Creates buffers for all those channels annotated inside input file. // Carmine 09.02.22. | |
| void | hideElasticBuffers () |
| Removes the elastic buffers and transfers the information to the channels. | |
| void | cleanElasticBuffers () |
| Removes all the elastic buffers from the netlist. | |
| void | eraseNonSCC () |
| Removes all non-SCC blocks and channels. More... | |
| void | computeSCC (bool onlyMarked) |
| void | printBlockSCCs () |
| bool | calculateBasicBlocks () |
| Calculates the Basic Blocks of the netlist. More... | |
| bool | optimize () |
| Performs different types of optimizations to reduce the complexity of the dataflow netlist. More... | |
| bool | removeControl () |
| Remove the control (synchronization) blocks of the dataflow netlist. More... | |
| double | extractMarkedGraphs (double coverage) |
| Extracts a set of marked graphs from the netlist until a certain coverage of execution frequency is achieved. More... | |
Public Attributes | |
| DFnetlist_Impl * | DFI |
| DFnetlist::DFnetlist | ( | ) |
Implementation of DFnet;.
Default constructor.
| Dataflow::DFnetlist::DFnetlist | ( | const std::string & | name | ) |
Constructor. It reads a netlist from a file.
| name | Filename of the input description. |
| DFnetlist::DFnetlist | ( | FILE * | file | ) |
Constructor. It creates a netlist from a file descriptor. The file is assumed to be opened.
| file | File descriptor. |
| Dataflow::DFnetlist::DFnetlist | ( | const std::string & | name, |
| const std::string & | name_bb | ||
| ) |
Constructor. It creates a netlist from two files. first file consists of blocks. second file consists of basic blocks.
Shabnam:
| file | File name of the input descriptions. |
| bool DFnetlist::addElasticBuffers | ( | double | Period = 0, |
| double | BufferDelay = 0, |
||
| bool | maxThroughput = false, |
||
| double | coverage = 0 |
||
| ) |
Adds elastic buffers to meet a certain cycle period and have elasticity in the system.
| Period | Target cycle Period (ignored if Period <= 0). |
| BufferDelay | CLK-to-Q delay of the Elastic Buffer. |
| maxThroughput | If asserted, it maximizes the throghput of the system. |
| bool DFnetlist::calculateBasicBlocks | ( | ) |
Calculates the Basic Blocks of the netlist.
| bool DFnetlist::check | ( | ) |
Checks that the netlist is well-formed.
| blockID DFnetlist::createBlock | ( | BlockType | type, |
| const std::string & | name = "" |
||
| ) |
Creates a new block in the netlist.
| type | Type of the block. |
| name | Name of the block. |
| channelID DFnetlist::createChannel | ( | portID | src, |
| portID | dst | ||
| ) |
Creates a channel between two ports.
| src | The source port. |
| dst | The destination port. |
| portID DFnetlist::createPort | ( | blockID | block, |
| bool | isInput, | ||
| const std::string & | name = "", |
||
| int | width = -1, |
||
| PortType | type = GENERIC_PORT |
||
| ) |
Adds a new port to a block.
| block | id of the block. |
| name | Name of the port. |
| isInput | Direction of the port. |
| width | The width of the port. |
| type | Type of the port (generic, select, true, false). |
| void DFnetlist::eraseNonSCC | ( | ) |
Removes all non-SCC blocks and channels.
| double DFnetlist::extractMarkedGraphs | ( | double | coverage | ) |
Extracts a set of marked graphs from the netlist until a certain coverage of execution frequency is achieved.
| coverage | The target coverage. |
| blockID DFnetlist::getBlock | ( | const std::string & | name | ) | const |
Returns a block id of the netlist.
| name | Name of the block. |
| double DFnetlist::getBlockDelay | ( | blockID | id, |
| int | indx | ||
| ) | const |
Returns the delay of a block.
| id | Identifier of the block. |
| blockID DFnetlist::getBlockFromPort | ( | portID | p | ) | const |
| p | Port ID. |
| const string & DFnetlist::getBlockName | ( | blockID | id | ) | const |
Returns the name of a block.
| id | Identifier of the block. |
| BlockType DFnetlist::getBlockType | ( | blockID | block | ) | const |
Returns the block type associated to a block.
| block | The block from which we want to obtain the type |
| int DFnetlist::getBufferSize | ( | blockID | id | ) | const |
Returns the number of slots of an elastic buffer.
| id | Identifier of the block. |
| int DFnetlist::getChannelBufferSize | ( | channelID | id | ) | const |
Returns the number of slots of the elastic buffer in the channel.
| id | Identifier of the channel. |
| bool DFnetlist::getChannelEB | ( | channelID | id | ) |
Gets the presence of an EB on the channel.
//Carmine 21.02.22
| id | Identifier of the channel. |
| channelID Dataflow::DFnetlist::getChannelID | ( | portID | id | ) |
Returns the channel ID.
| id | Identifier of the port. |
| string DFnetlist::getChannelName | ( | channelID | id, |
| bool | full = true |
||
| ) | const |
Returns the name of the channel.
| id | Identifier of the channel. |
| full | If asserted, a block:port -> block:port description is generated. Otherwise, a block -> block description is generated. |
| portID DFnetlist::getConditionalPort | ( | blockID | id | ) | const |
| id | Block id. |
| channelID DFnetlist::getConnectedChannel | ( | portID | port | ) | const |
Returns the channel associated to a port.
| port | The port from which we want to obtain the channel. |
| portID DFnetlist::getConnectedPort | ( | portID | port | ) | const |
Returns the opposite port connected to the same channel.
| port | The id of the port. |
| portID DFnetlist::getDemuxComplementaryPort | ( | portID | port | ) | const |
Returns the complementary port associated to one of the ports of a demux. If the parameter is an input control port, it returns the corresponding output data port, and vice versa.
| port | Port of the demux. |
| portID DFnetlist::getDemuxDataPort | ( | blockID | id | ) | const |
| id | Block id. |
| portID DFnetlist::getDstPort | ( | channelID | id | ) | const |
Returns the destination port of a channel.
| id | Id of the channel. |
| const string & DFnetlist::getError | ( | ) | const |
| int DFnetlist::getExecutionFrequency | ( | blockID | id | ) | const |
Returns the execution frequency of a block.
| id | Identifier of the block. |
| portID DFnetlist::getFalsePort | ( | blockID | id | ) | const |
| id | Block id. |
| int DFnetlist::getInitiationInterval | ( | blockID | id | ) | const |
Returns the initiation interval of a block.
| id | Identifier of the block. |
| int DFnetlist::getLatency | ( | blockID | id | ) | const |
Returns the latency of a block.
| id | Identifier of the block. |
| const string & DFnetlist::getName | ( | ) | const |
| portID DFnetlist::getPort | ( | blockID | block, |
| const std::string & | name | ||
| ) | const |
Returns the id of a port from a given block and pin name.
| block | Id of the block. |
| name | Name of the pin |
| double DFnetlist::getPortDelay | ( | portID | port | ) | const |
Returns the delay of a port.
| port | Identifier of the port. |
| const string & DFnetlist::getPortName | ( | portID | port, |
| bool | full = true |
||
| ) | const |
Returns the name of a port.
| port | Identifier of the port. |
| full | If asserted, the full name (block:port) is returned. |
| const setPorts & DFnetlist::getPorts | ( | blockID | id, |
| PortDirection | dir | ||
| ) | const |
Returns the set of ports with a certain direction.
| id | Block id (the owner of the ports). |
| dir | Direction of the ports (input/output/all). |
| PortType DFnetlist::getPortType | ( | portID | port | ) | const |
Returns the type of a port.
| port | The id of the port. |
| int DFnetlist::getPortWidth | ( | portID | port | ) | const |
Returns the width of a port.
| port | The id of the port. |
| portID DFnetlist::getSrcPort | ( | channelID | id | ) | const |
Returns the source port of a channel.
| id | Id of the channel. |
| portID DFnetlist::getTruePort | ( | blockID | id | ) | const |
| id | Block id. |
| bool DFnetlist::hasBuffer | ( | channelID | id | ) | const |
Checks whether a channel has an elastic buffer (slots > 0).
| id | Identifier of the channel. |
| bool DFnetlist::hasError | ( | ) | const |
Indicates whether there is an error.
| blockID DFnetlist::insertBuffer | ( | channelID | c, |
| int | slots, | ||
| bool | transparent | ||
| ) |
Inserts a buffer in a channel. The insertion removes the previous channel and creates two new channels.
| c | The channel identifier. |
| slots | Number of slots of the buffer. |
| transparent | True if the channel must be transparent and false if opaque. |
| blockID DFnetlist::insertBuffer | ( | channelID | c, |
| int | slots, | ||
| bool | transparent, | ||
| bool | EB | ||
| ) |
Inserts a buffer in a channel. The insertion removes the previous channel and creates two new channels.
| c | The channel identifier. |
| slots | Number of slots of the buffer. |
| transparent | True if the channel must be transparent and false if opaque. |
| EB | True if an elastic buffer needs to be placed. |
| bool DFnetlist::isBooleanPort | ( | portID | port | ) | const |
Checks whether a port is Boolean.
| port | The id of the port. |
| bool DFnetlist::isBufferTransparent | ( | blockID | id | ) | const |
Checks whether the buffer is transparent.
| id | Identifier of the block. |
| bool DFnetlist::isChannelTransparent | ( | channelID | id | ) | const |
Checks whether the buffer of the channel is transparent.
| id | Identifier of the channel. |
| bool DFnetlist::isControlPort | ( | portID | port | ) | const |
Checks whether a port is a control port.
| port | The id of the port. |
| bool DFnetlist::isInputPort | ( | portID | port | ) | const |
Indicates whether a port is input.
| port | The id of the port. |
| bool DFnetlist::isOutputPort | ( | portID | port | ) | const |
Indicates whether a port is output.
| port | The id of the port. |
| bool DFnetlist::isPortConnected | ( | portID | port | ) | const |
Checks whether a port is connected.
| port | The port id. |
| int DFnetlist::numBlocks | ( | ) | const |
| int DFnetlist::numChannels | ( | ) | const |
| int DFnetlist::numPorts | ( | ) | const |
| bool DFnetlist::optimize | ( | ) |
Performs different types of optimizations to reduce the complexity of the dataflow netlist.
| void DFnetlist::removeBlock | ( | blockID | block | ) |
Removes a block and all the associated channels from the netlist.
| block | Identifier of the block. |
| void DFnetlist::removeBuffer | ( | blockID | buf | ) |
Removes a buffer and reconnects the input and output channels.
| buf | Identifier of the buffer. |
| void DFnetlist::removeChannel | ( | channelID | id | ) |
Removes a channel.
| id | Id of the channel. |
| bool DFnetlist::removeControl | ( | ) |
Remove the control (synchronization) blocks of the dataflow netlist.
| void DFnetlist::removePort | ( | portID | port | ) |
Removes a port and the associated channels from the netlist.
| port | Identifier of the port. |
| void DFnetlist::setBlockDelay | ( | blockID | id, |
| double | d, | ||
| int | indx | ||
| ) |
Sets the delay of a block.
| id | Identifier of the block. |
| d | Delay of the block. |
| void DFnetlist::setBufferSize | ( | blockID | id, |
| int | slots | ||
| ) |
Sets the number of slots of an elastic buffer.
| id | Identifier of the block. |
| ii | Number of slots of the buffer. |
| void DFnetlist::setBufferTransparency | ( | blockID | id, |
| bool | value | ||
| ) |
Sets the transparency of an elastic buffer.
| id | Identifier of the block. |
| value | True if transparent, and false if opaque. |
| void DFnetlist::setChannelBufferSize | ( | blockID | id, |
| int | slots | ||
| ) |
Sets the number of slots of the elastic buffer in the channel.
| id | Identifier of the channel. |
| slots | Number of slots of the buffer. |
| void DFnetlist::setChannelEB | ( | channelID | id | ) |
Sets the presence of an EB on the channel.
//Carmine 21.02.22
| id | Identifier of the channel. |
| void DFnetlist::setChannelTransparency | ( | channelID | id, |
| bool | value | ||
| ) |
Sets the transparency of the elastic buffer in the channel.
| id | Identifier of the channel. |
| value | True if transparent, and false if opaque. |
| void DFnetlist::setError | ( | const std::string & | err | ) |
Sets an error message for the netlist.
| err | Error message. |
| void DFnetlist::setExecutionFrequency | ( | blockID | id, |
| double | freq | ||
| ) |
Sets the execution frequency of a block.
| id | Identifier of the block. |
| freq | Execution frequency of the block. |
| void DFnetlist::setInitiationInterval | ( | blockID | id, |
| int | ii | ||
| ) |
Sets the initiation interval of a block.
| id | Identifier of the block. |
| ii | Initiation interval of the block. |
| void DFnetlist::setLatency | ( | blockID | id, |
| int | lat | ||
| ) |
Sets the latency of a block.
| id | Identifier of the block. |
| lat | Latency of the block. |
| void DFnetlist::setMilpSolver | ( | const std::string & | solver = "cbc" | ) |
Sets the solver for MILP optimization problems.
| solver | Name of the solver (usually cbc or glpsol). |
| void DFnetlist::setPortDelay | ( | portID | port, |
| double | d | ||
| ) |
Sets the delay of a port.
| port | Identifier of the port. |
| d | The delay. |
| void DFnetlist::setTrueFrac | ( | blockID | id, |
| double | freq | ||
| ) |
Sets the true/false exe. fraction of a select op.
| id | Identifier of the block. |
| freq | Execution frequency of the block. |
| bool DFnetlist::validBlock | ( | blockID | id | ) | const |
Indicates whether a block id is valid.
| id | The id of the block. |
| bool DFnetlist::validChannel | ( | channelID | id | ) | const |
Indicates whether a channel id is valid.
| id | The id of the channel. |
| bool DFnetlist::validPort | ( | portID | p | ) | const |
| p | The port id. |
| bool Dataflow::DFnetlist::writeBasicBlockDot | ( | const std::string & | filename = "" | ) |
Writes the Basic Blocks of the dataflow netlist in dot format.
| filename | The name of the file. In case the filename is empty, it is written into cout. |
| bool DFnetlist::writeBasicBlockDot | ( | std::ostream & | s | ) |
Writes the Basic Blocks of the dataflow netlist in dot format.
| s | The output stream. |
| bool Dataflow::DFnetlist::writeDot | ( | const std::string & | filename = "" | ) |
Writes the dataflow netlist in dot format.
| filename | The name of the file. In case the filename is empty, it is written into cout. |
| bool DFnetlist::writeDot | ( | std::ostream & | s | ) |
Writes the dataflow netlist in dot format.
| s | The output stream. |
1.8.13