zuspec-be-sw 0.1.0.15240461960rc0__cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of zuspec-be-sw might be problematic. Click here for more details.
- zsp_be_sw/__build_num__.py +1 -0
- zsp_be_sw/__init__.py +0 -0
- zsp_be_sw/__version__.py +3 -0
- zsp_be_sw/core.cpython-311-x86_64-linux-gnu.so +0 -0
- zsp_be_sw/libzsp-be-sw.so +0 -0
- zsp_be_sw/share/include/zsp/be/sw/FactoryExt.h +5 -0
- zsp_be_sw/share/include/zsp/be/sw/IContext.h +102 -0
- zsp_be_sw/share/include/zsp/be/sw/IFactory.h +92 -0
- zsp_be_sw/share/include/zsp/be/sw/IFunctionInfo.h +79 -0
- zsp_be_sw/share/include/zsp/be/sw/IFunctionMap.h +48 -0
- zsp_be_sw/share/include/zsp/be/sw/IGeneratorEvalIterator.h +49 -0
- zsp_be_sw/share/include/zsp/be/sw/IGeneratorFunctions.h +55 -0
- zsp_be_sw/share/include/zsp/be/sw/IGeneratorUnrolledTrace.h +57 -0
- zsp_be_sw/share/include/zsp/be/sw/IMethodCallFactoryAssocData.h +55 -0
- zsp_be_sw/share/include/zsp/be/sw/INameMap.h +60 -0
- zsp_be_sw/share/include/zsp/be/sw/IOutput.h +82 -0
- zsp_be_sw/share/include/zsp/be/sw/IOutputStr.h +44 -0
- zsp_be_sw/share/include/zsp/be/sw/impl/MethodCallFactoryAssocDataBase.h +53 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_action.h +18 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_actor.h +31 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_actor_base.h +16 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_alloc.h +26 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_api.h +25 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_component.h +54 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_executor.h +13 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_object.h +32 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_rt.h +6 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_struct.h +42 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_thread.h +69 -0
- zsp_be_sw/share/include/zsp/be/sw/rt/zsp_types.h +15 -0
- zsp_be_sw/share/include/zsp/esw/zsp_esw_support.h +34 -0
- zuspec_be_sw-0.1.0.15240461960rc0.dist-info/METADATA +27 -0
- zuspec_be_sw-0.1.0.15240461960rc0.dist-info/RECORD +36 -0
- zuspec_be_sw-0.1.0.15240461960rc0.dist-info/WHEEL +6 -0
- zuspec_be_sw-0.1.0.15240461960rc0.dist-info/licenses/LICENSE +201 -0
- zuspec_be_sw-0.1.0.15240461960rc0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
BUILD_NUM=15240461960
|
zsp_be_sw/__init__.py
ADDED
|
File without changes
|
zsp_be_sw/__version__.py
ADDED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IContext.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "dmgr/IDebugMgr.h"
|
|
23
|
+
#include "zsp/arl/dm/IContext.h"
|
|
24
|
+
#include "zsp/be/sw/INameMap.h"
|
|
25
|
+
|
|
26
|
+
namespace zsp {
|
|
27
|
+
namespace be {
|
|
28
|
+
namespace sw {
|
|
29
|
+
|
|
30
|
+
enum class BackendFunctions {
|
|
31
|
+
Printf,
|
|
32
|
+
Read8,
|
|
33
|
+
Read16,
|
|
34
|
+
Read32,
|
|
35
|
+
Read64,
|
|
36
|
+
Write8,
|
|
37
|
+
Write16,
|
|
38
|
+
Write32,
|
|
39
|
+
Write64,
|
|
40
|
+
NumFuncs
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
enum class ExecScopeVarFlags {
|
|
44
|
+
NoFlags = 0,
|
|
45
|
+
IsPtr = (1 << 0)
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
static inline ExecScopeVarFlags operator | (const ExecScopeVarFlags lhs, const ExecScopeVarFlags rhs) {
|
|
49
|
+
return static_cast<ExecScopeVarFlags>(
|
|
50
|
+
static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static inline ExecScopeVarFlags operator & (const ExecScopeVarFlags lhs, const ExecScopeVarFlags rhs) {
|
|
54
|
+
return static_cast<ExecScopeVarFlags>(
|
|
55
|
+
static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static inline ExecScopeVarFlags operator ~ (const ExecScopeVarFlags lhs) {
|
|
59
|
+
return static_cast<ExecScopeVarFlags>(~static_cast<uint32_t>(lhs));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
struct ExecScopeVarInfo {
|
|
63
|
+
arl::dm::ITypeProcStmtVarDecl *var;
|
|
64
|
+
ExecScopeVarFlags flags;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
class IContext {
|
|
68
|
+
public:
|
|
69
|
+
|
|
70
|
+
virtual ~IContext() { }
|
|
71
|
+
|
|
72
|
+
virtual dmgr::IDebugMgr *getDebugMgr() const = 0;
|
|
73
|
+
|
|
74
|
+
virtual arl::dm::IContext *ctxt() const = 0;
|
|
75
|
+
|
|
76
|
+
virtual INameMap *nameMap() = 0;
|
|
77
|
+
|
|
78
|
+
virtual arl::dm::IDataTypeFunction *getBackendFunction(
|
|
79
|
+
BackendFunctions func) = 0;
|
|
80
|
+
|
|
81
|
+
virtual void pushTypeScope(vsc::dm::IDataTypeStruct *t) = 0;
|
|
82
|
+
|
|
83
|
+
virtual vsc::dm::IDataTypeStruct *typeScope() = 0;
|
|
84
|
+
|
|
85
|
+
virtual void popTypeScope() = 0;
|
|
86
|
+
|
|
87
|
+
virtual void pushExecScope(vsc::dm::IAccept *s) = 0;
|
|
88
|
+
|
|
89
|
+
virtual vsc::dm::IAccept *execScope(int32_t off=0) = 0;
|
|
90
|
+
|
|
91
|
+
virtual ExecScopeVarInfo execScopeVar(
|
|
92
|
+
int32_t scope_off,
|
|
93
|
+
int32_t var_off) = 0;
|
|
94
|
+
|
|
95
|
+
virtual void popExecScope() = 0;
|
|
96
|
+
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IFactory.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "dmgr/IDebugMgr.h"
|
|
23
|
+
#include "zsp/arl/dm/IModelFieldExecutor.h"
|
|
24
|
+
#include "zsp/be/sw/IContext.h"
|
|
25
|
+
#include "zsp/be/sw/IGeneratorEvalIterator.h"
|
|
26
|
+
#include "zsp/be/sw/IGeneratorFunctions.h"
|
|
27
|
+
#include "zsp/be/sw/IOutput.h"
|
|
28
|
+
|
|
29
|
+
namespace zsp {
|
|
30
|
+
namespace be {
|
|
31
|
+
namespace sw {
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class IFactory {
|
|
36
|
+
public:
|
|
37
|
+
|
|
38
|
+
virtual ~IFactory() { }
|
|
39
|
+
|
|
40
|
+
virtual void init(dmgr::IDebugMgr *dmgr) = 0;
|
|
41
|
+
|
|
42
|
+
virtual dmgr::IDebugMgr *getDebugMgr() = 0;
|
|
43
|
+
|
|
44
|
+
virtual IGeneratorFunctions *mkGeneratorFunctionsThreaded() = 0;
|
|
45
|
+
|
|
46
|
+
virtual IGeneratorEvalIterator *mkGeneratorMultiCoreSingleImageEmbCTest(
|
|
47
|
+
const std::vector<arl::dm::IModelFieldExecutor *> &executors,
|
|
48
|
+
int32_t dflt_exec,
|
|
49
|
+
IOutput *out_h,
|
|
50
|
+
IOutput *out_c
|
|
51
|
+
) = 0;
|
|
52
|
+
|
|
53
|
+
virtual IContext *mkContext(arl::dm::IContext *ctxt) = 0;
|
|
54
|
+
|
|
55
|
+
virtual void generateC(
|
|
56
|
+
IContext *ctxt,
|
|
57
|
+
const std::vector<vsc::dm::IAccept *> &roots,
|
|
58
|
+
std::ostream *csrc,
|
|
59
|
+
std::ostream *pub_h,
|
|
60
|
+
std::ostream *prv_h
|
|
61
|
+
) = 0;
|
|
62
|
+
|
|
63
|
+
virtual void generateExecModel(
|
|
64
|
+
arl::dm::IContext *ctxt,
|
|
65
|
+
arl::dm::IDataTypeComponent *comp_t,
|
|
66
|
+
arl::dm::IDataTypeAction *action_t,
|
|
67
|
+
std::ostream *out_c,
|
|
68
|
+
std::ostream *out_h,
|
|
69
|
+
std::ostream *out_h_prv) = 0;
|
|
70
|
+
|
|
71
|
+
virtual void generateType(
|
|
72
|
+
IContext *ctxt,
|
|
73
|
+
vsc::dm::IDataTypeStruct *comp_t,
|
|
74
|
+
std::ostream *out_c,
|
|
75
|
+
std::ostream *out_h) = 0;
|
|
76
|
+
|
|
77
|
+
virtual void generateTypes(
|
|
78
|
+
IContext *ctxt,
|
|
79
|
+
vsc::dm::IDataTypeStruct *root,
|
|
80
|
+
const std::string &outdir) = 0;
|
|
81
|
+
|
|
82
|
+
virtual void initContextC(arl::dm::IContext *ctxt) = 0;
|
|
83
|
+
|
|
84
|
+
virtual IOutput *mkFileOutput(const std::string &path) = 0;
|
|
85
|
+
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} /* namespace sw */
|
|
89
|
+
} /* namespace be */
|
|
90
|
+
} /* namespace zsp */
|
|
91
|
+
|
|
92
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IFunctionInfo.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <memory>
|
|
23
|
+
#include <string>
|
|
24
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
25
|
+
|
|
26
|
+
namespace zsp {
|
|
27
|
+
namespace be {
|
|
28
|
+
namespace sw {
|
|
29
|
+
|
|
30
|
+
enum class FunctionFlags {
|
|
31
|
+
NoFlags = 0,
|
|
32
|
+
Export = (1 << 0),
|
|
33
|
+
Import = (1 << 1)
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
static inline FunctionFlags operator | (const FunctionFlags lhs, const FunctionFlags rhs) {
|
|
37
|
+
return static_cast<FunctionFlags>(
|
|
38
|
+
static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
static inline FunctionFlags operator |= (FunctionFlags &lhs, const FunctionFlags rhs) {
|
|
42
|
+
lhs = static_cast<FunctionFlags>(
|
|
43
|
+
static_cast<uint32_t>(lhs) | static_cast<uint32_t>(rhs));
|
|
44
|
+
return lhs;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static inline FunctionFlags operator & (const FunctionFlags lhs, const FunctionFlags rhs) {
|
|
48
|
+
return static_cast<FunctionFlags>(
|
|
49
|
+
static_cast<uint32_t>(lhs) & static_cast<uint32_t>(rhs));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static inline FunctionFlags operator ~ (const FunctionFlags lhs) {
|
|
53
|
+
return static_cast<FunctionFlags>(~static_cast<uint32_t>(lhs));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
class IFunctionInfo;
|
|
57
|
+
using IFunctionInfoUP=std::unique_ptr<IFunctionInfo>;
|
|
58
|
+
class IFunctionInfo {
|
|
59
|
+
public:
|
|
60
|
+
|
|
61
|
+
virtual ~IFunctionInfo() { }
|
|
62
|
+
|
|
63
|
+
virtual const std::string &getImplName() const = 0;
|
|
64
|
+
|
|
65
|
+
virtual void setImplName(const std::string &n) = 0;
|
|
66
|
+
|
|
67
|
+
virtual arl::dm::IDataTypeFunction *getDecl() const = 0;
|
|
68
|
+
|
|
69
|
+
virtual FunctionFlags getFlags() const = 0;
|
|
70
|
+
|
|
71
|
+
virtual void setFlags(FunctionFlags flags) = 0;
|
|
72
|
+
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} /* namespace sw */
|
|
76
|
+
} /* namespace be */
|
|
77
|
+
} /* namespace zsp */
|
|
78
|
+
|
|
79
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IFunctionMap.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "zsp/be/sw/IFunctionInfo.h"
|
|
23
|
+
|
|
24
|
+
namespace zsp {
|
|
25
|
+
namespace be {
|
|
26
|
+
namespace sw {
|
|
27
|
+
|
|
28
|
+
class IFunctionMap;
|
|
29
|
+
using IFunctionMapUP=std::unique_ptr<IFunctionMap>;
|
|
30
|
+
class IFunctionMap {
|
|
31
|
+
public:
|
|
32
|
+
|
|
33
|
+
virtual ~IFunctionMap() { }
|
|
34
|
+
|
|
35
|
+
virtual bool addFunction(
|
|
36
|
+
arl::dm::IDataTypeFunction *func,
|
|
37
|
+
FunctionFlags flags
|
|
38
|
+
) = 0;
|
|
39
|
+
|
|
40
|
+
virtual const std::vector<IFunctionInfoUP> &getFunctions() const = 0;
|
|
41
|
+
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} /* namespace sw */
|
|
45
|
+
} /* namespace be */
|
|
46
|
+
} /* namespace zsp */
|
|
47
|
+
|
|
48
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IGeneratorEvalIterator.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <memory>
|
|
23
|
+
#include <vector>
|
|
24
|
+
#include "zsp/arl/dm/IModelEvalIterator.h"
|
|
25
|
+
#include "zsp/arl/dm/IModelFieldComponentRoot.h"
|
|
26
|
+
|
|
27
|
+
namespace zsp {
|
|
28
|
+
namespace be {
|
|
29
|
+
namespace sw {
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class IGeneratorEvalIterator;
|
|
33
|
+
using IGeneratorEvalIteratorUP=vsc::dm::UP<IGeneratorEvalIterator>;
|
|
34
|
+
class IGeneratorEvalIterator {
|
|
35
|
+
public:
|
|
36
|
+
|
|
37
|
+
virtual ~IGeneratorEvalIterator() { }
|
|
38
|
+
|
|
39
|
+
virtual void generate(
|
|
40
|
+
arl::dm::IModelFieldComponentRoot *root,
|
|
41
|
+
arl::dm::IModelEvalIterator *it) = 0;
|
|
42
|
+
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} /* namespace sw */
|
|
46
|
+
} /* namespace be */
|
|
47
|
+
} /* namespace zsp */
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IGeneratorFunctions.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <memory>
|
|
23
|
+
#include <vector>
|
|
24
|
+
#include "zsp/arl/dm/IContext.h"
|
|
25
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
26
|
+
#include "zsp/be/sw/IOutput.h"
|
|
27
|
+
|
|
28
|
+
namespace zsp {
|
|
29
|
+
namespace be {
|
|
30
|
+
namespace sw {
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class IGeneratorFunctions;
|
|
34
|
+
using IGeneratorFunctionsUP=std::unique_ptr<IGeneratorFunctions>;
|
|
35
|
+
class IGeneratorFunctions {
|
|
36
|
+
public:
|
|
37
|
+
|
|
38
|
+
virtual ~IGeneratorFunctions() { }
|
|
39
|
+
|
|
40
|
+
virtual void generate(
|
|
41
|
+
arl::dm::IContext *ctxt,
|
|
42
|
+
const std::vector<arl::dm::IDataTypeFunction *> &funcs,
|
|
43
|
+
const std::vector<std::string> &inc_c,
|
|
44
|
+
const std::vector<std::string> &inc_h,
|
|
45
|
+
IOutput *out_c,
|
|
46
|
+
IOutput *out_h
|
|
47
|
+
) = 0;
|
|
48
|
+
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
} /* namespace sw */
|
|
52
|
+
} /* namespace be */
|
|
53
|
+
} /* namespace zsp */
|
|
54
|
+
|
|
55
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IGeneratorUnrolledTrace.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2022 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include <iostream>
|
|
23
|
+
#include <memory>
|
|
24
|
+
#include <vector>
|
|
25
|
+
#include "zsp/IAccept.h"
|
|
26
|
+
#include "zsp/IMarker.h"
|
|
27
|
+
#include "zsp/IModelActivity.h"
|
|
28
|
+
#include "zsp/IModelFieldComponent.h"
|
|
29
|
+
|
|
30
|
+
namespace zsp {
|
|
31
|
+
namespace be {
|
|
32
|
+
namespace sw {
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class IGeneratorUnrolledTrace;
|
|
36
|
+
using IGeneratorUnrolledTraceUP=std::unique_ptr<IGeneratorUnrolledTrace>;
|
|
37
|
+
class IGeneratorUnrolledTrace {
|
|
38
|
+
public:
|
|
39
|
+
|
|
40
|
+
virtual ~IGeneratorUnrolledTrace() { }
|
|
41
|
+
|
|
42
|
+
virtual void generate(
|
|
43
|
+
std::ostream *c_os,
|
|
44
|
+
std::ostream *h_os,
|
|
45
|
+
arl::IModelFieldComponent *pss_top,
|
|
46
|
+
// std::vector // TODO: executors
|
|
47
|
+
const std::vector<IModelActivity *> &activities,
|
|
48
|
+
std::vector<IMarkerUP> &markers
|
|
49
|
+
) = 0;
|
|
50
|
+
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
} /* namespace sw */
|
|
54
|
+
} /* namespace be */
|
|
55
|
+
} /* namespace arl */
|
|
56
|
+
|
|
57
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMethodCallFactoryAssocData.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "vsc/dm/IAssociatedData.h"
|
|
23
|
+
#include "zsp/arl/dm/IContext.h"
|
|
24
|
+
#include "zsp/arl/dm/ITypeExprMethodCallContext.h"
|
|
25
|
+
#include "zsp/arl/dm/ITypeExprMethodCallStatic.h"
|
|
26
|
+
#include "zsp/be/sw/IContext.h"
|
|
27
|
+
|
|
28
|
+
namespace zsp {
|
|
29
|
+
namespace be {
|
|
30
|
+
namespace sw {
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class IMethodCallFactoryAssocData : public virtual vsc::dm::IAssociatedData {
|
|
35
|
+
public:
|
|
36
|
+
|
|
37
|
+
virtual ~IMethodCallFactoryAssocData() { }
|
|
38
|
+
|
|
39
|
+
virtual vsc::dm::ITypeExpr *mkCallContext(
|
|
40
|
+
IContext *ctxt,
|
|
41
|
+
arl::dm::ITypeExprMethodCallContext *call
|
|
42
|
+
) = 0;
|
|
43
|
+
|
|
44
|
+
virtual vsc::dm::ITypeExpr *mkCallStatic(
|
|
45
|
+
IContext *ctxt,
|
|
46
|
+
arl::dm::ITypeExprMethodCallStatic *call
|
|
47
|
+
) = 0;
|
|
48
|
+
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
} /* namespace sw */
|
|
52
|
+
} /* namespace be */
|
|
53
|
+
} /* namespace zsp */
|
|
54
|
+
|
|
55
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* INameMap.h
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2023 Matthew Ballance and Contributors
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
7
|
+
* not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at:
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
* Created on:
|
|
19
|
+
* Author:
|
|
20
|
+
*/
|
|
21
|
+
#pragma once
|
|
22
|
+
#include "vsc/dm/IDataType.h"
|
|
23
|
+
#include "zsp/arl/dm/IDataTypeFunction.h"
|
|
24
|
+
|
|
25
|
+
namespace zsp {
|
|
26
|
+
namespace be {
|
|
27
|
+
namespace sw {
|
|
28
|
+
|
|
29
|
+
class INameMap;
|
|
30
|
+
using INameMapUP=vsc::dm::UP<INameMap>;
|
|
31
|
+
class INameMap {
|
|
32
|
+
public:
|
|
33
|
+
|
|
34
|
+
enum class Kind {
|
|
35
|
+
Mangled,
|
|
36
|
+
Hierarchical
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
virtual ~INameMap() { }
|
|
40
|
+
|
|
41
|
+
virtual bool hasName(
|
|
42
|
+
vsc::dm::IAccept *type,
|
|
43
|
+
Kind kind=Kind::Mangled) = 0;
|
|
44
|
+
|
|
45
|
+
virtual void setName(
|
|
46
|
+
vsc::dm::IAccept *type,
|
|
47
|
+
const std::string &name,
|
|
48
|
+
Kind kind=Kind::Mangled) = 0;
|
|
49
|
+
|
|
50
|
+
virtual std::string getName(
|
|
51
|
+
vsc::dm::IAccept *type,
|
|
52
|
+
Kind kind=Kind::Mangled) = 0;
|
|
53
|
+
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
} /* namespace sw */
|
|
57
|
+
} /* namespace be */
|
|
58
|
+
} /* namespace zsp */
|
|
59
|
+
|
|
60
|
+
|