OpenASIP 2.2
Loading...
Searching...
No Matches
HWBlockImplementation.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 HWBlockImplementation.hh
26 *
27 * Declaration of HWBlockImplementation class.
28 *
29 * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_HW_BLOCK_IMPLEMENTATION_HH
34#define TTA_HW_BLOCK_IMPLEMENTATION_HH
35
36#include <string>
37#include <vector>
38
39#include "Exception.hh"
40#include "DBTypes.hh"
41
42namespace HDB {
43
44class BlockImplementationFile;
45
46/**
47 * Base class for FUImplementation and RFImplementation.
48 */
50public:
52 const std::string& moduleName,
53 const std::string& clkPort,
54 const std::string& rstPort,
55 const std::string& glockPort);
56
58
59 virtual ~HWBlockImplementation();
60
61 bool hasID() const;
62 void setID(RowID id);
63 RowID id() const;
64
65 void setModuleName(const std::string& name);
66 std::string moduleName() const;
67 void setClkPort(const std::string& name);
68 std::string clkPort() const;
69 void setRstPort(const std::string& name);
70 std::string rstPort() const;
71 void setGlockPort(const std::string& name);
72 std::string glockPort() const;
73
75
77 int implementationFileCount() const;
78 BlockImplementationFile& file(int index) const;
79
80private:
81 /// Vector type for BlockImplementationFile.
82 typedef std::vector<BlockImplementationFile*> FileTable;
83
84 /// Name of the module.
85 std::string moduleName_;
86 /// Name of the clock port.
87 std::string clkPort_;
88 /// Name of the reset port.
89 std::string rstPort_;
90 /// Name of the global lock port.
91 std::string glockPort_;
92 /// Contains the block implementation files.
94 /// Tells whether the implementation has an ID.
95 bool hasID_;
96
97 /// ID of the implementation.
99};
100}
101
102#endif
int RowID
Type definition of row ID in relational databases.
Definition DBTypes.hh:37
void setModuleName(const std::string &name)
std::string clkPort_
Name of the clock port.
std::vector< BlockImplementationFile * > FileTable
Vector type for BlockImplementationFile.
void setClkPort(const std::string &name)
bool hasID_
Tells whether the implementation has an ID.
RowID id_
ID of the implementation.
std::string glockPort_
Name of the global lock port.
void addImplementationFile(BlockImplementationFile *file)
void removeImplementationFile(const BlockImplementationFile &file)
void setRstPort(const std::string &name)
BlockImplementationFile & file(int index) const
void setGlockPort(const std::string &name)
std::string rstPort_
Name of the reset port.
std::string moduleName_
Name of the module.
FileTable files_
Contains the block implementation files.