OpenASIP  2.0
NetlistVisualization.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2015 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /*
25  * @file NetlistVisualization.hh
26  *
27  * Declaration of NetlistVisualization class.
28  *
29  * Created on: 23.4.2015
30  * @author: Henry Linjamäki (henry.linjamaki-no.spam-tut.fi)
31  * @note rating: red
32  */
33 
34 #ifndef NETLISTVISUALIZATION_HH
35 #define NETLISTVISUALIZATION_HH
36 
37 #include <iostream>
38 
39 #include "ProGeTypes.hh"
40 
41 namespace ProGe {
42 class BaseNetlistBlock;
43 class NetlistPort;
44 class Netlist;
45 class Parameter;
46 
47 /*
48  * Class for visualizing netlist structure for debug purposes.
49  */
51 public:
53  virtual ~NetlistVisualization();
54 
55  static void visualizeBlockTree(
56  const BaseNetlistBlock& root,
57  std::ostream& streamOut);
58  static void listConnections(
59  const BaseNetlistBlock& block,
60  std::ostream& streamOut);
61  static void listNetlistDescriptors(
62  const BaseNetlistBlock& block,
63  std::ostream& streamOut);
64  static void listNetlistDescriptors(
65  const Netlist& netlist,
66  std::ostream& streamOut);
67 
68  static std::string toString(Direction dir);
69  static std::string portWidthToString(const NetlistPort& port);
70 
71 private:
72 
73  static void printBlockTree(
74  const BaseNetlistBlock& node,
75  std::string prefix,
76  std::ostream& streamOut);
77  static void printBlock(
78  const BaseNetlistBlock& root,
79  const std::string& prefix,
80  std::ostream& streamOut);
81  static void printParameter(
82  const Parameter& parameter,
83  const std::string& prefix,
84  std::ostream& streamOut);
85  static void printPort(
86  const NetlistPort& port,
87  const std::string& prefix,
88  std::ostream& streamOut);
89 
90 };
91 
92 } /* namespace ProGe */
93 
94 #endif /* NETLISTVISUALIZATION_HH */
ProGe::BaseNetlistBlock
Definition: BaseNetlistBlock.hh:59
ProGe::NetlistVisualization::printPort
static void printPort(const NetlistPort &port, const std::string &prefix, std::ostream &streamOut)
Definition: NetlistVisualization.cc:161
ProGe::NetlistVisualization::listNetlistDescriptors
static void listNetlistDescriptors(const BaseNetlistBlock &block, std::ostream &streamOut)
Definition: NetlistVisualization.cc:103
ProGe::NetlistVisualization::printBlock
static void printBlock(const BaseNetlistBlock &root, const std::string &prefix, std::ostream &streamOut)
Definition: NetlistVisualization.cc:145
ProGe::NetlistVisualization::printParameter
static void printParameter(const Parameter &parameter, const std::string &prefix, std::ostream &streamOut)
Definition: NetlistVisualization.cc:153
ProGe::NetlistVisualization::printBlockTree
static void printBlockTree(const BaseNetlistBlock &node, std::string prefix, std::ostream &streamOut)
Definition: NetlistVisualization.cc:123
ProGe::Netlist
Definition: Netlist.hh:63
ProGe::NetlistVisualization::~NetlistVisualization
virtual ~NetlistVisualization()
Definition: NetlistVisualization.cc:55
ProGe::NetlistVisualization::portWidthToString
static std::string portWidthToString(const NetlistPort &port)
Definition: NetlistVisualization.cc:184
ProGe::Parameter
Definition: Parameter.hh:62
ProGe::NetlistVisualization::visualizeBlockTree
static void visualizeBlockTree(const BaseNetlistBlock &root, std::ostream &streamOut)
Definition: NetlistVisualization.cc:58
ProGe::NetlistVisualization::NetlistVisualization
NetlistVisualization()
Definition: NetlistVisualization.cc:53
ProGeTypes.hh
ProGe::NetlistVisualization::listConnections
static void listConnections(const BaseNetlistBlock &block, std::ostream &streamOut)
Definition: NetlistVisualization.cc:65
ProGe::NetlistVisualization::toString
static std::string toString(Direction dir)
Definition: NetlistVisualization.cc:170
ProGe
Definition: FUGen.hh:54
ProGe::NetlistPort
Definition: NetlistPort.hh:70
ProGe::NetlistVisualization
Definition: NetlistVisualization.hh:50
ProGe::Direction
Direction
Direction of the port.
Definition: ProGeTypes.hh:52