Go to the documentation of this file.
40 #include <boost/graph/graph_traits.hpp>
69 typedef std::pair<std::string, std::string> PortNamePair;
70 typedef std::set<PortNamePair> ConnectionSet;
72 ConnectionSet connections;
83 port_a_name +=
":" + port_a->
name();
85 port_b_name +=
":" + port_b->
name();
87 if (port_a_name < port_b_name) {
88 connections.insert(std::make_pair(port_a_name, port_b_name));
90 connections.insert(std::make_pair(port_b_name, port_a_name));
94 ConnectionSet::const_iterator conn_it;
95 for (conn_it = connections.begin(); conn_it != connections.end();
97 streamOut << conn_it->first <<
" <-> " << conn_it->second
110 const Netlist& netlist, std::ostream& streamOut) {
116 size_t descriptor = desc_it->second;
118 << descriptor << std::endl;
125 std::ostream& streamOut) {
130 for (
size_t i = 0; i < blockNode.
portCount(); i++) {
147 std::ostream& streamOut) {
148 streamOut << prefix <<
"Blk: " << blockNode.
instanceName() <<
" : "
154 const Parameter& parameter,
const std::string& prefix,
155 std::ostream& streamOut) {
156 streamOut << prefix <<
"Prm: " << parameter.
name() <<
" : "
157 << parameter.
type() <<
" := " << parameter.
value() << std::endl;
162 const NetlistPort& port,
const std::string& prefix,
163 std::ostream& streamOut) {
164 streamOut << prefix <<
"Prt: " << port.
name() <<
" "
192 return std::string(
"[") + port.
widthFormula() +
"-1:0]";
const BaseNetlistBlock & parentBlock() const
static void printPort(const NetlistPort &port, const std::string &prefix, std::ostream &streamOut)
@ BIT_VECTOR
Several bits.
static std::string applyIf(bool expression, stringCRef ifTrue, stringCRef ifFalse)
virtual size_t parameterCount() const
const TCEString & type() const
static void listNetlistDescriptors(const BaseNetlistBlock &block, std::ostream &streamOut)
std::string widthFormula() const
Direction direction() const
const std::string & instanceName() const
static void printBlock(const BaseNetlistBlock &root, const std::string &prefix, std::ostream &streamOut)
@ BIDIR
Bidirectional port.
static void printParameter(const Parameter ¶meter, const std::string &prefix, std::ostream &streamOut)
static void printBlockTree(const BaseNetlistBlock &node, std::string prefix, std::ostream &streamOut)
descriptor_iterator descriptorEnd()
virtual const Netlist & netlist() const
static std::string toString(const T &source)
virtual ~NetlistVisualization()
static std::string portWidthToString(const NetlistPort &port)
bool realWidthAvailable() const
descriptor_iterator descriptorBegin()
virtual const Parameter & parameter(const std::string &name) const
DescriptorMap::const_iterator const_descriptor_iterator
virtual size_t portCount() const
static void visualizeBlockTree(const BaseNetlistBlock &root, std::ostream &streamOut)
const TCEString & name() const
const TCEString & value() const
DataType dataType() const
static void listConnections(const BaseNetlistBlock &block, std::ostream &streamOut)
static std::string toString(Direction dir)
boost::graph_traits< const Netlist >::edge_iterator const_iterator
const std::string & moduleName() const
virtual const BaseNetlistBlock & subBlock(size_t index) const
Direction
Direction of the port.
virtual size_t subBlockCount() const
virtual const NetlistPort & port(size_t index) const