OpenASIP  2.0
MOMTextGenerator.cc
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 MOMTextGenerator.cc
26  *
27  * Implementation of MOMTextGenerator class.
28  *
29  * @author Lasse Laasonen 2004 (lasse.laasonen-no.spam-tut.fi)
30  */
31 
32 #include "MOMTextGenerator.hh"
33 
34 /**
35  * Constructor.
36  */
39  "Cannot resolve references to other components from guard of "
40  "bus '%1%' because the bus is not registered to a machine.");
42  "Cannot resolve the reference from guard of bus '%1%' to "
43  "function unit '%2%'.");
45  "Cannot resolve the reference from guard of bus '%1%' to "
46  "register file '%2%'.");
48  "Cannot resolve the reference from guard of bus '%1%' to port "
49  "'%2%' of function unit '%3%'.");
51  "Cannot resolve the reference from guard of bus '%1%' to "
52  "register '%2%' of register file '%3%' because the register "
53  "file has only '%4%' registers.");
55  "Cannot create two equal port guards referencing to port '%1%' "
56  "of function unit '%2%' to bus '%3%'.");
58  "Cannot create two equal register guards referencing to "
59  "register '%1%' of register file '%2%' to bus '%3%'.");
61  "Cannot create two equal unconditional guards to bus '%1%'.");
63  "Bus '%1%' has no segment that doesn't write any segment.");
65  "Bus '%1%' has no segment that writes to '%2%'.");
67  "Cannot create two segments called '%1%' to bus '%2%'.");
69  "Cannot resolve references to other components from segment "
70  "'%1%' of bus '%2%' because the bus is not registered to a "
71  "machine.");
73  "Cannot resolve the reference from segment '%1%' of bus '%2%' "
74  "to socket '%3%'.");
76  "Cannot resolve references to other components from socket "
77  "'%1%' because the socket is not registered to a machine.");
79  "Cannot resolve the reference to bus '%1%' from socket '%2%'.");
81  "Cannot resolve the reference from socket '%1%' to segment "
82  "'%2%' of bus '%3%'.");
84  "Direction of socket cannot be 'UNKNOWN' because the socket is "
85  "connected to segments.");
87  "Direction of socket '%1%' cannot be set because it is not "
88  "registered to a machine.");
90  "Cannot create two operation code setting ports to function "
91  "unit '%1%'.");
93  "Port '%1%' of function unit '%2%' should be triggering because "
94  "it sets operation code.");
96  "Cannot create bridge '%1%' because there is another one by the "
97  "same name.");
99  "Bridge '%1%' has unknown source or destination bus.");
101  "Cannot create instruction template '%1%' because there is "
102  "another by the same name.");
104  "Cannot resolve the reference to slot '%1%' from instruction "
105  "template '%2%'.");
107  "Cannot resolve the reference to immediate unit '%2%' from "
108  "instruction template '%2%'.");
110  "Cannot create address space '%1%' because there is another one "
111  "by the same name.");
113  "Cannot create port '%1%' of unit '%2%' because there is "
114  "another one by the same name.");
116  "Cannot resolve the reference to socket '%1%' from port '%2%' "
117  "of unit '%3%'.");
119  "Cannot resolve the reference to address space '%1%' from "
120  "function unit '%2%'.");
122  "Cannot resolve the reference to port '%1%' from operation "
123  "'%2%' of function unit '%3%'.");
125  "Cannot create operation '%1%' because another one exists by "
126  "the same name in function unit '%2%'.");
128  "At least two operands of operation '%1%' are bound to port "
129  "'%2%' of function unit '%3%'.");
131  "Cannot bound operand '%1%' to port '%2%' in operation '%3%' "
132  "of function unit '%4%' because the operand is bound to port "
133  "'%5%' already.");
135  "Operand '%1%' is both read and written by pipeline of "
136  "operation '%2%' in function unit '%3%'. Operand can be only "
137  "read or written.");
139  "Pipeline of operation '%1%' of function unit '%2%' starts at "
140  "cycle '%3%'. Pipeline must always start at cycle 0 or 1.");
142  "Pipeline of operation '%1%' of function unit '%2%' is not "
143  "canonical.");
144  addText(TXT_SAME_NAME, "Two components of same type exists by name "
145  "'%1%'.");
147  "'%1%' is not a valid name of a machine part.");
149  "There is a bus and immediate slot with the same name '%1%' in "
150  "the machine.");
152  "Cannot create immediate slot '%1%' because there is another "
153  "one by the same name.");
155  "Total guard latency cannot be zero. Global guard latency must "
156  "be at least one if local guard latency is zero.");
157 }
158 
159 
160 /**
161  * Destructor.
162  */
164 }
165 
MOMTextGenerator::TXT_INVALID_GUARD_LATENCY
@ TXT_INVALID_GUARD_LATENCY
Definition: MOMTextGenerator.hh:87
MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR
@ TXT_GUARD_REF_LOAD_ERR
Definition: MOMTextGenerator.hh:47
MOMTextGenerator::TXT_SEGMENT_REF_LOAD_ERR_SOCKET
@ TXT_SEGMENT_REF_LOAD_ERR_SOCKET
Definition: MOMTextGenerator.hh:59
MOMTextGenerator::TXT_IT_REF_LOAD_ERR_SLOT
@ TXT_IT_REF_LOAD_ERR_SLOT
Definition: MOMTextGenerator.hh:70
MOMTextGenerator::TXT_NO_SOURCE_SEGMENT
@ TXT_NO_SOURCE_SEGMENT
Definition: MOMTextGenerator.hh:56
MOMTextGenerator::TXT_PIPELINE_START_TOO_LATE
@ TXT_PIPELINE_START_TOO_LATE
Definition: MOMTextGenerator.hh:81
MOMTextGenerator::TXT_NO_LAST_SEGMENT
@ TXT_NO_LAST_SEGMENT
Definition: MOMTextGenerator.hh:55
MOMTextGenerator::TXT_IMM_SLOT_EXISTS_BY_SAME_NAME
@ TXT_IMM_SLOT_EXISTS_BY_SAME_NAME
Definition: MOMTextGenerator.hh:86
MOMTextGenerator::TXT_SOCKET_REF_LOAD_ERR
@ TXT_SOCKET_REF_LOAD_ERR
Definition: MOMTextGenerator.hh:60
MOMTextGenerator::TXT_INVALID_NAME
@ TXT_INVALID_NAME
Definition: MOMTextGenerator.hh:84
MOMTextGenerator::~MOMTextGenerator
virtual ~MOMTextGenerator()
Definition: MOMTextGenerator.cc:163
MOMTextGenerator::MOMTextGenerator
MOMTextGenerator()
Definition: MOMTextGenerator.cc:37
MOMTextGenerator::TXT_FU_REF_LOAD_ERR_AS
@ TXT_FU_REF_LOAD_ERR_AS
Definition: MOMTextGenerator.hh:75
MOMTextGenerator::TXT_OPCODE_SETTING_MUST_BE_TRIGGERING
@ TXT_OPCODE_SETTING_MUST_BE_TRIGGERING
Definition: MOMTextGenerator.hh:66
MOMTextGenerator::TXT_IT_REF_LOAD_ERR_IU
@ TXT_IT_REF_LOAD_ERR_IU
Definition: MOMTextGenerator.hh:71
MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR_FU
@ TXT_GUARD_REF_LOAD_ERR_FU
Definition: MOMTextGenerator.hh:48
MOMTextGenerator::TXT_PORT_READ_AND_WRITTEN_BY_PIPELINE
@ TXT_PORT_READ_AND_WRITTEN_BY_PIPELINE
Definition: MOMTextGenerator.hh:80
MOMTextGenerator::TXT_IT_EXISTS_BY_NAME
@ TXT_IT_EXISTS_BY_NAME
Definition: MOMTextGenerator.hh:69
MOMTextGenerator::TXT_SET_DIR_SOCKET_NOT_REGISTERED
@ TXT_SET_DIR_SOCKET_NOT_REGISTERED
Definition: MOMTextGenerator.hh:64
Texts::TextGenerator::addText
virtual void addText(int textId, const std::string &templateString)
Definition: TextGenerator.cc:118
MOMTextGenerator::TXT_OPERATION_REF_LOAD_ERR_PORT
@ TXT_OPERATION_REF_LOAD_ERR_PORT
Definition: MOMTextGenerator.hh:76
MOMTextGenerator::TXT_EQUAL_PORT_GUARDS
@ TXT_EQUAL_PORT_GUARDS
Definition: MOMTextGenerator.hh:52
MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR_RF
@ TXT_GUARD_REF_LOAD_ERR_RF
Definition: MOMTextGenerator.hh:49
MOMTextGenerator::TXT_SAME_NAME
@ TXT_SAME_NAME
Definition: MOMTextGenerator.hh:83
MOMTextGenerator::TXT_EQUAL_REGISTER_GUARDS
@ TXT_EQUAL_REGISTER_GUARDS
Definition: MOMTextGenerator.hh:53
MOMTextGenerator::TXT_SOCKET_REF_LOAD_ERR_SEGMENT
@ TXT_SOCKET_REF_LOAD_ERR_SEGMENT
Definition: MOMTextGenerator.hh:62
MOMTextGenerator::TXT_EQUAL_UNCONDITIONAL_GUARDS
@ TXT_EQUAL_UNCONDITIONAL_GUARDS
Definition: MOMTextGenerator.hh:54
MOMTextGenerator::TXT_UNKNOWN_SOCKET_DIR_AND_SEGMENT_CONN
@ TXT_UNKNOWN_SOCKET_DIR_AND_SEGMENT_CONN
Definition: MOMTextGenerator.hh:63
MOMTextGenerator::TXT_PIPELINE_NOT_CANONICAL
@ TXT_PIPELINE_NOT_CANONICAL
Definition: MOMTextGenerator.hh:82
MOMTextGenerator::TXT_OPERAND_ALREADY_BOUND
@ TXT_OPERAND_ALREADY_BOUND
Definition: MOMTextGenerator.hh:79
MOMTextGenerator::TXT_SEGMENT_REF_LOAD_ERR
@ TXT_SEGMENT_REF_LOAD_ERR
Definition: MOMTextGenerator.hh:58
MOMTextGenerator::TXT_AS_EXISTS_BY_NAME
@ TXT_AS_EXISTS_BY_NAME
Definition: MOMTextGenerator.hh:72
MOMTextGenerator.hh
MOMTextGenerator::TXT_PORT_REF_LOAD_ERR_SOCKET
@ TXT_PORT_REF_LOAD_ERR_SOCKET
Definition: MOMTextGenerator.hh:74
MOMTextGenerator::TXT_SOCKET_REF_LOAD_ERR_BUS
@ TXT_SOCKET_REF_LOAD_ERR_BUS
Definition: MOMTextGenerator.hh:61
MOMTextGenerator::TXT_SEGMENT_WITH_SAME_NAME
@ TXT_SEGMENT_WITH_SAME_NAME
Definition: MOMTextGenerator.hh:57
MOMTextGenerator::TXT_BUS_AND_IMM_SLOT_WITH_SAME_NAME
@ TXT_BUS_AND_IMM_SLOT_WITH_SAME_NAME
Definition: MOMTextGenerator.hh:85
MOMTextGenerator::TXT_OPERAND_BOUND_TO_PORT
@ TXT_OPERAND_BOUND_TO_PORT
Definition: MOMTextGenerator.hh:78
MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR_REGISTER
@ TXT_GUARD_REF_LOAD_ERR_REGISTER
Definition: MOMTextGenerator.hh:51
MOMTextGenerator::TXT_PORT_EXISTS_BY_NAME
@ TXT_PORT_EXISTS_BY_NAME
Definition: MOMTextGenerator.hh:73
MOMTextGenerator::TXT_BRIDGE_EXISTS_BY_SAME_NAME
@ TXT_BRIDGE_EXISTS_BY_SAME_NAME
Definition: MOMTextGenerator.hh:67
MOMTextGenerator::TXT_OPCODE_SETTING_PORT_EXISTS
@ TXT_OPCODE_SETTING_PORT_EXISTS
Definition: MOMTextGenerator.hh:65
MOMTextGenerator::TXT_GUARD_REF_LOAD_ERR_PORT
@ TXT_GUARD_REF_LOAD_ERR_PORT
Definition: MOMTextGenerator.hh:50
MOMTextGenerator::TXT_BRIDGE_UNKNOWN_SRC_OR_DST
@ TXT_BRIDGE_UNKNOWN_SRC_OR_DST
Definition: MOMTextGenerator.hh:68
MOMTextGenerator::TXT_OPERATION_EXISTS_BY_SAME_NAME
@ TXT_OPERATION_EXISTS_BY_SAME_NAME
Definition: MOMTextGenerator.hh:77