OpenASIP  2.0
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 
39 namespace 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  */
49 class POMValidator {
50 public:
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 
69 private:
74 
75  /// The program's instructions in a quickly accessed vector.
77 
78 };
79 
80 #endif
POMValidator::instructions_
const TTAProgram::Program::InstructionVector instructions_
The program's instructions in a quickly accessed vector.
Definition: POMValidator.hh:76
TTAProgram::Program
Definition: Program.hh:63
POMValidator::CONNECTION_MISSING
@ CONNECTION_MISSING
Connection required for a move is missing.
Definition: POMValidator.hh:55
POMValidatorResults
Definition: POMValidatorResults.hh:45
POMValidator::SIMULATION_NOT_POSSIBLE
@ SIMULATION_NOT_POSSIBLE
Program contains operations with unknown behaviour.
Definition: POMValidator.hh:59
POMValidator::LONG_IMMEDIATE_NOT_SUPPORTED
@ LONG_IMMEDIATE_NOT_SUPPORTED
Instruction template missing for a long immediate.
Definition: POMValidator.hh:57
POMValidator::checkLongImmediates
void checkLongImmediates(POMValidatorResults &results)
Definition: POMValidator.cc:192
POMValidator::checkConnectivity
void checkConnectivity(POMValidatorResults &results)
Definition: POMValidator.cc:108
TTAProgram::Program::InstructionVector
std::vector< Instruction * > InstructionVector
Vector for instructions.
Definition: Program.hh:66
POMValidator::checkSimulatability
void checkSimulatability(POMValidatorResults &results)
Definition: POMValidator.cc:281
POMValidator::ErrorCode
ErrorCode
Error codes for different errors.
Definition: POMValidator.hh:53
POMValidator::COMPILED_SIMULATION_NOT_POSSIBLE
@ COMPILED_SIMULATION_NOT_POSSIBLE
Compiled simulation is not possible.
Definition: POMValidator.hh:61
POMValidator::~POMValidator
virtual ~POMValidator()
Definition: POMValidator.cc:69
POMValidator
Definition: POMValidator.hh:49
Program.hh
POMValidator::POMValidator
POMValidator(const TTAProgram::Program &program)
Definition: POMValidator.cc:61
program
find Finds info of the inner loops in the program
Definition: InnerLoopFinder.cc:80
POMValidator::checkCompiledSimulatability
void checkCompiledSimulatability(POMValidatorResults &results)
Definition: POMValidator.cc:325
POMValidator::validate
POMValidatorResults * validate(const std::set< ErrorCode > &errorsToCheck)
Definition: POMValidator.cc:79
TTAMachine
Definition: Assembler.hh:48