TCE  1.14
MDFLayoutConstraints.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University of Technology.
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 MDFLayoutConstraints.hh
26  *
27  * Declaration of MDFLayoutConstraints class.
28  *
29  * @author Ari Metsähalme 2003 (ari.metsahalme-no.spam-tut.fi)
30  * @note rating: yellow
31  * @note reviewed Jul 22 2004 by tr, ml, jm, am
32  */
33 
34 #ifndef TTA_MDF_LAYOUT_CONSTRAINTS_HH
35 #define TTA_MDF_LAYOUT_CONSTRAINTS_HH
36 
37 /**
38  * Defines some layout constraints used in visualizing the machine.
39  */
41 public:
42  /// Minimum unit width.
43  static const int UNIT_WIDTH = 85;
44  /// Minimum unit height.
45  static const int UNIT_HEIGHT = 65;
46  /// Space between units.
47  static const int UNIT_SPACE = 36;
48  /// Maximun unit name width in pixels.
49  static const int MAX_UNIT_NAME_WIDTH = 250;
50  /// Width of a port.
51  static const int PORT_WIDTH = 16;
52  /// Space between ports.
53  static const int PORT_SPACE = 20;
54  /// Width of a socket.
55  static const int SOCKET_WIDTH = PORT_WIDTH;
56  /// Height of a socket.
57  static const int SOCKET_HEIGHT = 100;
58  /// Space dividing unconnected sockets.
59  static const int SOCKET_SPACE = SOCKET_WIDTH;
60  /// Space dividing connected sockets.
61  static const int SOCKET_MIN_SPACE = 2;
62  /// Space dividing segments.
63  static const int SEGMENT_SPACE = 14;
64  /// Height of a segment.
65  static const int SEGMENT_HEIGHT = 4;
66  /// Minimum width of a bus.
67  static const int BUS_MIN_WIDTH = 206;
68  /// Minimum height of a bus.
69  static const int BUS_MIN_HEIGHT = SEGMENT_HEIGHT;
70  /// Space between buses and bus chains.
71  static const int BUS_SPACE = 30;
72  /// Width of a bridge.
73  static const int BRIDGE_WIDTH = BUS_MIN_WIDTH;
74  /// Height of a bridge.
75  static const int BRIDGE_HEIGHT = 30;
76  /// Space dividing buses and bridges.
77  static const int BRIDGE_SPACE = 12;
78  /// Top margin for the whole processor view.
79  static const int VIEW_MARGIN = 30;
80  /// Left margin.
81  static const int VIEW_LEFT_MARGIN = 30;
82  /// Space reserved for port-socket-connections.
83  static const int CONNECTIONS_SPACE = 80;
84  /// Size of the sockets' direction triangle.
85  static const int TRIANGLE_HEIGHT = 15;
86 };
87 
88 #endif
static const int TRIANGLE_HEIGHT
Size of the sockets' direction triangle.
static const int VIEW_MARGIN
Top margin for the whole processor view.
static const int CONNECTIONS_SPACE
Space reserved for port-socket-connections.
static const int BRIDGE_SPACE
Space dividing buses and bridges.
static const int UNIT_SPACE
Space between units.
static const int BRIDGE_HEIGHT
Height of a bridge.
static const int SOCKET_HEIGHT
Height of a socket.
static const int SOCKET_SPACE
Space dividing unconnected sockets.
static const int SEGMENT_HEIGHT
Height of a segment.
static const int MAX_UNIT_NAME_WIDTH
Maximun unit name width in pixels.
static const int BUS_MIN_HEIGHT
Minimum height of a bus.
static const int BRIDGE_WIDTH
Width of a bridge.
static const int SOCKET_MIN_SPACE
Space dividing connected sockets.
static const int SEGMENT_SPACE
Space dividing segments.
static const int BUS_SPACE
Space between buses and bus chains.
static const int VIEW_LEFT_MARGIN
Left margin.
static const int SOCKET_WIDTH
Width of a socket.
static const int PORT_SPACE
Space between ports.
static const int UNIT_HEIGHT
Minimum unit height.
static const int PORT_WIDTH
Width of a port.
static const int UNIT_WIDTH
Minimum unit width.
static const int BUS_MIN_WIDTH
Minimum width of a bus.