OpenASIP 2.2
Loading...
Searching...
No Matches
POMValidator.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 POMValidator.hh
26 *
27 * Declaration of POMValidator class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2006 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating red
31 */
32
33#ifndef TTA_POM_VALIDATOR_HH
34#define TTA_POM_VALIDATOR_HH
35
36#include <set>
37#include "Program.hh"
38
39namespace TTAMachine {
40 class Machine;
41}
42
44
45/**
46 * POMValidator validates a program object model against a target
47 * processor architecture using varoius criteria.
48 */
50public:
51
52 /// Error codes for different errors.
53 enum ErrorCode {
54 /// Connection required for a move is missing.
56 /// Instruction template missing for a long immediate.
58 /// Program contains operations with unknown behaviour.
60 /// Compiled simulation is not possible
62 };
63
65 virtual ~POMValidator();
66
67 POMValidatorResults* validate(const std::set<ErrorCode>& errorsToCheck);
68
69private:
74
75 /// The program's instructions in a quickly accessed vector.
77
78};
79
80#endif
find Finds info of the inner loops in the program
void checkSimulatability(POMValidatorResults &results)
void checkCompiledSimulatability(POMValidatorResults &results)
ErrorCode
Error codes for different errors.
@ CONNECTION_MISSING
Connection required for a move is missing.
@ LONG_IMMEDIATE_NOT_SUPPORTED
Instruction template missing for a long immediate.
@ SIMULATION_NOT_POSSIBLE
Program contains operations with unknown behaviour.
@ COMPILED_SIMULATION_NOT_POSSIBLE
Compiled simulation is not possible.
void checkConnectivity(POMValidatorResults &results)
virtual ~POMValidator()
POMValidatorResults * validate(const std::set< ErrorCode > &errorsToCheck)
const TTAProgram::Program::InstructionVector instructions_
The program's instructions in a quickly accessed vector.
void checkLongImmediates(POMValidatorResults &results)
std::vector< Instruction * > InstructionVector
Vector for instructions.
Definition Program.hh:66