OpenASIP 2.2
Loading...
Searching...
No Matches
CostDBTypes.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 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 CostDBTypes.hh
26 *
27 * Declaration of CostDBTypes class.
28 *
29 * @author Tommi Rantanen 2004 (tommi.rantanen-no.spam-tut.fi)
30 * @author Jari Mäntyneva 2005 (jari.mantyneva-no.spam-tut.fi)
31 * @note rating: red
32 */
33
34
35#ifndef TTA_COST_DB_TYPES_HH
36#define TTA_COST_DB_TYPES_HH
37
38
39#include <string>
40#include <vector>
41
42class CostDBEntry;
43class MatchType;
44
45/**
46 * Type definiotions and constant for the cost database.
47 */
49public:
50 /**
51 * Type of match to be accepted in the database queries for a
52 * certain field.
53 */
55 MATCH_ALL, //< All entries accepted.
56 MATCH_EXACT, //< Equally matching entries accepted.
57 MATCH_SUBSET, //< Smaller or equally matching entries accepted.
58 MATCH_SUPERSET, //< Greater or equally matching entries accepted.
59 MATCH_INTERPOLATION //< Interpolation of smaller and greater entries.
60 };
61
62 /// Entry type for function units.
63 static const std::string EK_UNIT;
64 /// Entry type for register files.
65 static const std::string EK_RFILE;
66 /// Entry type for move bus.
67 static const std::string EK_MBUS;
68 /// Entry type for sockets.
69 static const std::string EK_SOCKET;
70 /// Entry type for input sockets.
71 static const std::string EK_INPUT_SOCKET;
72 /// Entry type for output sockets.
73 static const std::string EK_OUTPUT_SOCKET;
74 /// Entry type for immediate sockets.
75 static const std::string EK_INLINE_IMM_SOCKET;
76
77 /// Field type for bit width of an entry.
78 static const std::string EKF_BIT_WIDTH;
79 /// Field type for operations supported by an entry.
80 static const std::string EKF_OPERATIONS;
81 /// Field type for latency of an entry.
82 static const std::string EKF_LATENCY;
83 /// Field type for number of registers in an entry.
84 static const std::string EKF_NUM_REGISTERS;
85 /// Field type for number of read ports in an entry.
86 static const std::string EKF_READ_PORTS;
87 /// Field type for number of write ports in an entry.
88 static const std::string EKF_WRITE_PORTS;
89 /// Field type for number of bidirectional ports in an entry.
90 static const std::string EKF_BIDIR_PORTS;
91 /// Field type for number of max simultaneous reads in an entry.
92 static const std::string EKF_MAX_READS;
93 /// Field type for number of max simultaneous writes in an entry.
94 static const std::string EKF_MAX_WRITES;
95 /// Field type for fanin of bus in an entry.
96 static const std::string EKF_BUS_FANIN;
97 /// Field type for fanout of bus in an entry.
98 static const std::string EKF_BUS_FANOUT;
99 /// Field type for fanin of input socket in an entry.
100 static const std::string EKF_INPUT_SOCKET_FANIN;
101 /// Field type for fanout of output socket in an entry.
102 static const std::string EKF_OUTPUT_SOCKET_FANOUT;
103 /// Field type for guard support in an entry.
104 static const std::string EKF_GUARD_SUPPORT;
105 /// Field type for guard latency in an entry.
106 static const std::string EKF_GUARD_LATENCY;
107 /// Field type for function unit entry;
108 static const std::string EKF_FUNCTION_UNIT;
109
110 /// Table of database entries.
111 typedef std::vector<CostDBEntry*> EntryTable;
112
113 /// Table of types of match.
114 typedef std::vector<MatchType*> MatchTypeTable;
115};
116
117#endif
static const std::string EKF_READ_PORTS
Field type for number of read ports in an entry.
static const std::string EK_INPUT_SOCKET
Entry type for input sockets.
static const std::string EKF_OPERATIONS
Field type for operations supported by an entry.
static const std::string EKF_INPUT_SOCKET_FANIN
Field type for fanin of input socket in an entry.
static const std::string EKF_OUTPUT_SOCKET_FANOUT
Field type for fanout of output socket in an entry.
static const std::string EKF_MAX_WRITES
Field type for number of max simultaneous writes in an entry.
static const std::string EK_SOCKET
Entry type for sockets.
static const std::string EK_UNIT
Entry type for function units.
static const std::string EKF_BIDIR_PORTS
Field type for number of bidirectional ports in an entry.
static const std::string EK_INLINE_IMM_SOCKET
Entry type for immediate sockets.
static const std::string EKF_GUARD_SUPPORT
Field type for guard support in an entry.
std::vector< MatchType * > MatchTypeTable
Table of types of match.
static const std::string EKF_BUS_FANOUT
Field type for fanout of bus in an entry.
static const std::string EKF_LATENCY
Field type for latency of an entry.
static const std::string EK_OUTPUT_SOCKET
Entry type for output sockets.
static const std::string EKF_GUARD_LATENCY
Field type for guard latency in an entry.
static const std::string EKF_FUNCTION_UNIT
Field type for function unit entry;.
static const std::string EKF_MAX_READS
Field type for number of max simultaneous reads in an entry.
static const std::string EKF_WRITE_PORTS
Field type for number of write ports in an entry.
static const std::string EK_RFILE
Entry type for register files.
static const std::string EK_MBUS
Entry type for move bus.
static const std::string EKF_BUS_FANIN
Field type for fanin of bus in an entry.
static const std::string EKF_NUM_REGISTERS
Field type for number of registers in an entry.
std::vector< CostDBEntry * > EntryTable
Table of database entries.
static const std::string EKF_BIT_WIDTH
Field type for bit width of an entry.