OpenASIP  2.0
IPXact.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2017 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 IPXact.hh
26 *
27 * @author Lasse Lehtonen 2017 (lasse.lehtonen-no.spam-tut.fi)
28 */
29 #pragma once
30 
31 #include <string>
32 #include <vector>
33 
34 namespace ipxact {
35 
36  struct Parameter {
37  std::string id;
38  std::string type;
39  std::string name;
40  std::string value;
41  };
42 
43  struct Port {
44  std::string name;
45  std::string direction;
46  bool vector;
47  std::string left;
48  std::string right;
49  std::string width;
50  std::string defaultValue;
51  };
52 
53  struct ModuleInfo {
54  std::string name;
55  std::vector<Parameter> parameters;
56  std::vector<Port> ports;
57  };
58 
59  struct BusInfo {
60  std::string name;
61  std::vector<Port> ports;
62  };
63 
64  /**
65  * Parse IP-XACT abstraction bus definition.
66  */
67  BusInfo parseBus(std::string file);
68 
69  /**
70  * Parse IP-XACT component description.
71  */
72  ModuleInfo parseComponent(std::string file);
73 }
ipxact::Port::direction
std::string direction
Definition: IPXact.hh:45
ipxact::Port::name
std::string name
Definition: IPXact.hh:44
ipxact::Port::defaultValue
std::string defaultValue
Definition: IPXact.hh:50
ipxact::BusInfo
Definition: IPXact.hh:59
ipxact::parseBus
BusInfo parseBus(std::string file)
Definition: IPXact.cc:39
ipxact::BusInfo::name
std::string name
Definition: IPXact.hh:60
ipxact::Port
Definition: IPXact.hh:43
ipxact::Parameter::value
std::string value
Definition: IPXact.hh:40
ipxact::ModuleInfo::ports
std::vector< Port > ports
Definition: IPXact.hh:56
ipxact::Parameter::name
std::string name
Definition: IPXact.hh:39
ipxact::Port::right
std::string right
Definition: IPXact.hh:48
ipxact::ModuleInfo::name
std::string name
Definition: IPXact.hh:54
ipxact::Port::left
std::string left
Definition: IPXact.hh:47
ipxact::Port::width
std::string width
Definition: IPXact.hh:49
ipxact::BusInfo::ports
std::vector< Port > ports
Definition: IPXact.hh:61
ipxact
Definition: IPXact.cc:36
ipxact::Parameter::id
std::string id
Definition: IPXact.hh:37
ipxact::ModuleInfo
Definition: IPXact.hh:53
ipxact::Port::vector
bool vector
Definition: IPXact.hh:46
ipxact::Parameter::type
std::string type
Definition: IPXact.hh:38
ipxact::Parameter
Definition: IPXact.hh:36
ipxact::parseComponent
ModuleInfo parseComponent(std::string file)
Definition: IPXact.cc:86
ipxact::ModuleInfo::parameters
std::vector< Parameter > parameters
Definition: IPXact.hh:55