OpenASIP 2.2
Loading...
Searching...
No Matches
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
41namespace ProGe {
42class BaseNetlistBlock;
43class NetlistPort;
44class Netlist;
45class Parameter;
46
47/*
48 * Class for visualizing netlist structure for debug purposes.
49 */
51public:
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
71private:
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 */
static void listNetlistDescriptors(const BaseNetlistBlock &block, std::ostream &streamOut)
static void visualizeBlockTree(const BaseNetlistBlock &root, std::ostream &streamOut)
static void printBlock(const BaseNetlistBlock &root, const std::string &prefix, std::ostream &streamOut)
static void printBlockTree(const BaseNetlistBlock &node, std::string prefix, std::ostream &streamOut)
static void printPort(const NetlistPort &port, const std::string &prefix, std::ostream &streamOut)
static std::string portWidthToString(const NetlistPort &port)
static void listConnections(const BaseNetlistBlock &block, std::ostream &streamOut)
static std::string toString(Direction dir)
static void printParameter(const Parameter &parameter, const std::string &prefix, std::ostream &streamOut)
Definition FUGen.hh:54
Direction
Direction of the port.
Definition ProGeTypes.hh:52