zuspec-be-sw 0.1.0.15240461960rc0__cp39-cp39-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-39-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,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IOutput.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
|
+
|
|
25
|
+
namespace zsp {
|
|
26
|
+
namespace be {
|
|
27
|
+
namespace sw {
|
|
28
|
+
|
|
29
|
+
class IOutput;
|
|
30
|
+
using IOutputUP=std::unique_ptr<IOutput>;
|
|
31
|
+
class IOutput {
|
|
32
|
+
public:
|
|
33
|
+
|
|
34
|
+
virtual ~IOutput() { }
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @brief Writes indent, content, then a newline
|
|
38
|
+
*
|
|
39
|
+
* @param fmt
|
|
40
|
+
* @param ...
|
|
41
|
+
*/
|
|
42
|
+
virtual void println(const char *fmt, ...) = 0;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @brief Writes indent and content without a newline
|
|
46
|
+
*
|
|
47
|
+
* @param fmt
|
|
48
|
+
* @param ...
|
|
49
|
+
*/
|
|
50
|
+
virtual void print(const char *fmt, ...) = 0;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @brief Writes content only
|
|
54
|
+
*
|
|
55
|
+
* @param fmt
|
|
56
|
+
* @param ...
|
|
57
|
+
*/
|
|
58
|
+
virtual void write(const char *fmt, ...) = 0;
|
|
59
|
+
|
|
60
|
+
virtual void writes(const std::string &str) = 0;
|
|
61
|
+
|
|
62
|
+
virtual void close() = 0;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @brief Writes the current indent
|
|
66
|
+
*
|
|
67
|
+
*/
|
|
68
|
+
virtual void indent() = 0;
|
|
69
|
+
|
|
70
|
+
virtual void inc_ind() = 0;
|
|
71
|
+
|
|
72
|
+
virtual void dec_ind() = 0;
|
|
73
|
+
|
|
74
|
+
virtual const char *ind() const = 0;
|
|
75
|
+
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
} /* namespace sw */
|
|
79
|
+
} /* namespace be */
|
|
80
|
+
} /* namespace arl */
|
|
81
|
+
|
|
82
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IOutputStr.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 <string>
|
|
23
|
+
#include "zsp/be/sw/IOutput.h"
|
|
24
|
+
|
|
25
|
+
namespace zsp {
|
|
26
|
+
namespace be {
|
|
27
|
+
namespace sw {
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class IOutputStr : public virtual IOutput {
|
|
32
|
+
public:
|
|
33
|
+
|
|
34
|
+
virtual ~IOutputStr() { }
|
|
35
|
+
|
|
36
|
+
virtual std::string getValue() const = 0;
|
|
37
|
+
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
} /* namespace sw */
|
|
41
|
+
} /* namespace be */
|
|
42
|
+
} /* namespace arl */
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MethodCallFactoryAssocDataBase.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 "zsp/be/sw/IMethodCallFactoryAssocData.h"
|
|
23
|
+
|
|
24
|
+
namespace zsp {
|
|
25
|
+
namespace be {
|
|
26
|
+
namespace sw {
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class MethodCallFactoryAssocDataBase : public virtual IMethodCallFactoryAssocData {
|
|
31
|
+
public:
|
|
32
|
+
|
|
33
|
+
virtual ~MethodCallFactoryAssocDataBase() { }
|
|
34
|
+
|
|
35
|
+
virtual vsc::dm::ITypeExpr *mkCallContext(
|
|
36
|
+
IContext *ctxt,
|
|
37
|
+
arl::dm::ITypeExprMethodCallContext *call) override {
|
|
38
|
+
return 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
virtual vsc::dm::ITypeExpr *mkCallStatic(
|
|
42
|
+
IContext *ctxt,
|
|
43
|
+
arl::dm::ITypeExprMethodCallStatic *call) override {
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
} /* namespace sw */
|
|
50
|
+
} /* namespace be */
|
|
51
|
+
} /* namespace zsp */
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
#ifndef INCLUDED_ZSP_ACTION_H
|
|
3
|
+
#define INCLUDED_ZSP_ACTION_H
|
|
4
|
+
#include "zsp/be/sw/rt/zsp_struct.h"
|
|
5
|
+
#include "zsp/be/sw/rt/zsp_thread.h"
|
|
6
|
+
|
|
7
|
+
typedef struct zsp_action_type_s {
|
|
8
|
+
zsp_struct_type_t base;
|
|
9
|
+
|
|
10
|
+
} zsp_action_type_t;
|
|
11
|
+
|
|
12
|
+
typedef struct zsp_action_s {
|
|
13
|
+
zsp_struct_t base;
|
|
14
|
+
zsp_task_func body;
|
|
15
|
+
|
|
16
|
+
} zsp_action_t;
|
|
17
|
+
|
|
18
|
+
#endif /* INCLUDED_ZSP_ACTION_H */
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_ACTOR_H
|
|
2
|
+
#define INCLUDED_ZSP_ACTOR_H
|
|
3
|
+
#include "zsp/be/sw/rt/zsp_api.h"
|
|
4
|
+
#include "zsp/be/sw/rt/zsp_action.h"
|
|
5
|
+
#include "zsp/be/sw/rt/zsp_actor_base.h"
|
|
6
|
+
#include "zsp/be/sw/rt/zsp_component.h"
|
|
7
|
+
|
|
8
|
+
#ifdef __cplusplus
|
|
9
|
+
extern "C" {
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
typedef struct zsp_actor_s {
|
|
13
|
+
zsp_actor_base_t base;
|
|
14
|
+
zsp_component_t comp;
|
|
15
|
+
} zsp_actor_t;
|
|
16
|
+
|
|
17
|
+
#define zsp_actor(comp_t) struct { \
|
|
18
|
+
zsp_actor_base_t base; \
|
|
19
|
+
comp_t ## _t comp; \
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
void zsp_actor_init(
|
|
23
|
+
zsp_actor_t *actor,
|
|
24
|
+
zsp_api_t *api,
|
|
25
|
+
zsp_component_type_t *comp_t,
|
|
26
|
+
zsp_action_type_t *action_t);
|
|
27
|
+
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
}
|
|
30
|
+
#endif
|
|
31
|
+
#endif /* INCLUDED_ZSP_ACTOR_H */
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
|
|
2
|
+
#ifndef INCLUDED_ZSP_ACTOR_BASE_H
|
|
3
|
+
#define INCLUDED_ZSP_ACTOR_BASE_H
|
|
4
|
+
|
|
5
|
+
typedef struct zsp_actor_base_s {
|
|
6
|
+
// Base class for all actors, providing common functionality
|
|
7
|
+
// and properties that all actors will inherit.
|
|
8
|
+
// This can include methods for initialization, destruction,
|
|
9
|
+
// and other common actor behaviors.
|
|
10
|
+
|
|
11
|
+
// Example member variables (to be defined as needed):
|
|
12
|
+
// int actor_id; // Unique identifier for the actor
|
|
13
|
+
// const char *name; // Name of the actor
|
|
14
|
+
} zsp_actor_base_t;
|
|
15
|
+
|
|
16
|
+
#endif /* INCLUDED_ZSP_ACTOR_BASE_H */
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_ALLOC_H
|
|
2
|
+
#define INCLUDED_ZSP_ALLOC_H
|
|
3
|
+
|
|
4
|
+
#include <sys/types.h>
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
struct zsp_alloc_s;
|
|
11
|
+
|
|
12
|
+
typedef void *(*zsp_alloc_func)(struct zsp_alloc_s *, size_t);
|
|
13
|
+
typedef void (*zsp_free_func)(struct zsp_alloc_s *, void *);
|
|
14
|
+
|
|
15
|
+
typedef struct zsp_alloc_s {
|
|
16
|
+
zsp_alloc_func alloc;
|
|
17
|
+
zsp_free_func free;
|
|
18
|
+
} zsp_alloc_t;
|
|
19
|
+
|
|
20
|
+
void zsp_alloc_malloc_init(zsp_alloc_t *alloc);
|
|
21
|
+
|
|
22
|
+
#ifdef __cplusplus
|
|
23
|
+
}
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
#endif /* INCLUDED_ZSP_ALLOC_H */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
#ifndef INCLUDED_ZSP_API_H
|
|
3
|
+
#define INCLUDED_ZSP_API_H
|
|
4
|
+
#include "zsp/be/sw/rt/zsp_thread.h"
|
|
5
|
+
|
|
6
|
+
struct zsp_actor_s;
|
|
7
|
+
struct zsp_frame_s;
|
|
8
|
+
struct zsp_thread_s;
|
|
9
|
+
|
|
10
|
+
typedef struct zsp_api_s {
|
|
11
|
+
void (*print)(struct zsp_api_s *self, const char *fmt, ...);
|
|
12
|
+
|
|
13
|
+
// zsp_task_func write64;
|
|
14
|
+
// zsp_task_func write32;
|
|
15
|
+
// zsp_task_func write16;
|
|
16
|
+
// zsp_task_func write8;
|
|
17
|
+
|
|
18
|
+
// zsp_task_func read64;
|
|
19
|
+
// zsp_task_func read32;
|
|
20
|
+
// zsp_task_func read16;
|
|
21
|
+
// zsp_task_func read8;
|
|
22
|
+
|
|
23
|
+
} zsp_api_t;
|
|
24
|
+
|
|
25
|
+
#endif /* INCLUDED_ZSP_API_H */
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_COMPONENT_H
|
|
2
|
+
#define INCLUDED_ZSP_COMPONENT_H
|
|
3
|
+
#include <stdint.h>
|
|
4
|
+
#include "zsp/be/sw/rt/zsp_alloc.h"
|
|
5
|
+
#include "zsp/be/sw/rt/zsp_struct.h"
|
|
6
|
+
|
|
7
|
+
#ifdef _cplusplus
|
|
8
|
+
extern "C" {
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
struct zsp_component_s;
|
|
12
|
+
struct zsp_actor_s;
|
|
13
|
+
|
|
14
|
+
typedef void (*zsp_component_init_f)(
|
|
15
|
+
struct zsp_actor_s *actor,
|
|
16
|
+
struct zsp_component_s *comp,
|
|
17
|
+
const char *name,
|
|
18
|
+
struct zsp_component_s *parent);
|
|
19
|
+
|
|
20
|
+
typedef struct zsp_component_type_s {
|
|
21
|
+
zsp_object_type_t __base;
|
|
22
|
+
zsp_component_init_f init;
|
|
23
|
+
|
|
24
|
+
void (*init_down)(struct zsp_component_s *comp);
|
|
25
|
+
void (*init_up)(struct zsp_component_s *comp);
|
|
26
|
+
} zsp_component_type_t;
|
|
27
|
+
|
|
28
|
+
typedef struct zsp_component_s {
|
|
29
|
+
zsp_object_t base;
|
|
30
|
+
|
|
31
|
+
struct zsp_component_s *parent;
|
|
32
|
+
struct zsp_component_s *sibling;
|
|
33
|
+
struct zsp_component_s *children;
|
|
34
|
+
const char *name;
|
|
35
|
+
} zsp_component_t;
|
|
36
|
+
|
|
37
|
+
void zsp_component_init(
|
|
38
|
+
struct zsp_actor_s *actor,
|
|
39
|
+
zsp_component_t *comp,
|
|
40
|
+
const char *name,
|
|
41
|
+
zsp_component_t *parent);
|
|
42
|
+
|
|
43
|
+
zsp_component_type_t *zsp_component__type();
|
|
44
|
+
|
|
45
|
+
#define zsp_component_type(comp) \
|
|
46
|
+
((zsp_component_type_t *)((comp)->base.type))
|
|
47
|
+
|
|
48
|
+
void zsp_component_do_init(zsp_component_t *comp);
|
|
49
|
+
|
|
50
|
+
#ifdef _cplusplus
|
|
51
|
+
}
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#endif /* INCLUDED_ZSP_COMPONENT_H */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
#ifndef INCLUDED_ZSP_EXECUTOR_H
|
|
3
|
+
#define INCLUDED_ZSP_EXECUTOR_H
|
|
4
|
+
#include "zsp/be/sw/rt/zsp_component.h"
|
|
5
|
+
|
|
6
|
+
struct zsp_actor_s;
|
|
7
|
+
|
|
8
|
+
typedef struct zsp_executor_s {
|
|
9
|
+
zsp_component_t super;
|
|
10
|
+
|
|
11
|
+
} zsp_executor_t;
|
|
12
|
+
|
|
13
|
+
#endif /* INCLUDED_ZSP_EXECUTOR_H */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_OBJECT_H
|
|
2
|
+
#define INCLUDED_ZSP_OBJECT_H
|
|
3
|
+
#include "zsp/be/sw/rt/zsp_types.h"
|
|
4
|
+
|
|
5
|
+
#ifdef __cplusplus
|
|
6
|
+
extern "C" {
|
|
7
|
+
#endif
|
|
8
|
+
|
|
9
|
+
struct zsp_object_s;
|
|
10
|
+
struct zsp_actor_s;
|
|
11
|
+
|
|
12
|
+
typedef void (*zsp_dtor_f)(struct zsp_actor_s *, struct zsp_object_s *);
|
|
13
|
+
|
|
14
|
+
typedef struct zsp_object_type_s {
|
|
15
|
+
struct zsp_object_type_s *super;
|
|
16
|
+
const char *name;
|
|
17
|
+
zsp_dtor_f dtor;
|
|
18
|
+
} zsp_object_type_t;
|
|
19
|
+
|
|
20
|
+
typedef struct zsp_object_s {
|
|
21
|
+
zsp_object_type_t *type;
|
|
22
|
+
|
|
23
|
+
} zsp_object_t;
|
|
24
|
+
|
|
25
|
+
zsp_object_type_t *zsp_object__type(void);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
}
|
|
30
|
+
#endif
|
|
31
|
+
|
|
32
|
+
#endif /* INCLUDED_ZSP_OBJECT_H */
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_STRUCT_H
|
|
2
|
+
#define INCLUDED_ZSP_STRUCT_H
|
|
3
|
+
#ifdef __cplusplus
|
|
4
|
+
extern "C" {
|
|
5
|
+
#endif
|
|
6
|
+
#include "zsp/be/sw/rt/zsp_object.h"
|
|
7
|
+
|
|
8
|
+
struct zsp_struct_s;
|
|
9
|
+
|
|
10
|
+
typedef void (*zsp_solve_exec_f)(struct zsp_actor_s *, struct zsp_struct_s *);
|
|
11
|
+
|
|
12
|
+
typedef struct zsp_struct_type_s {
|
|
13
|
+
zsp_object_type_t base;
|
|
14
|
+
|
|
15
|
+
zsp_solve_exec_f pre_solve;
|
|
16
|
+
zsp_solve_exec_f post_solve;
|
|
17
|
+
|
|
18
|
+
} zsp_struct_type_t;
|
|
19
|
+
|
|
20
|
+
typedef struct zsp_struct_s {
|
|
21
|
+
zsp_object_t base;
|
|
22
|
+
|
|
23
|
+
} zsp_struct_t;
|
|
24
|
+
|
|
25
|
+
#define zsp_struct_call(method, actor, this_p) \
|
|
26
|
+
((zsp_struct_type_t *)((zsp_object_t *)(this_p))->type)-> method ( \
|
|
27
|
+
(struct zsp_actor_s *)(actor), \
|
|
28
|
+
(struct zsp_struct_s *)(this_p));
|
|
29
|
+
|
|
30
|
+
#define zsp_struct_pre_solve(actor, this_p) \
|
|
31
|
+
zsp_struct_call(pre_solve, actor, this_p)
|
|
32
|
+
|
|
33
|
+
#define zsp_struct_post_solve(actor, this_p) \
|
|
34
|
+
zsp_struct_call(post_solve, actor, this_p)
|
|
35
|
+
|
|
36
|
+
void zsp_struct_init(struct zsp_actor_s *actor, struct zsp_struct_s *this_p);
|
|
37
|
+
|
|
38
|
+
#ifdef __cplusplus
|
|
39
|
+
}
|
|
40
|
+
#endif
|
|
41
|
+
#endif /* INCLUDED_ZSP_STRUCT_H */
|
|
42
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#ifndef INCLUDED_ZSP_THREAD_H
|
|
2
|
+
#define INCLUDED_ZSP_THREAD_H
|
|
3
|
+
|
|
4
|
+
#include <stdint.h>
|
|
5
|
+
#include <stdarg.h>
|
|
6
|
+
#include "zsp_alloc.h"
|
|
7
|
+
|
|
8
|
+
#ifdef __cplusplus
|
|
9
|
+
extern "C" {
|
|
10
|
+
#endif
|
|
11
|
+
|
|
12
|
+
#define STACK_FRAME_SZ 4096
|
|
13
|
+
#define STACK_FRAME_MAX (STACK_FRAME_SZ-(sizeof(frame_t *)+sizeof(uint32_t)))
|
|
14
|
+
|
|
15
|
+
struct zsp_thread_s;
|
|
16
|
+
|
|
17
|
+
typedef struct zsp_frame_s *(*zsp_task_func)(struct zsp_thread_s *, struct zsp_frame_s *, va_list *args);
|
|
18
|
+
|
|
19
|
+
typedef struct zsp_frame_s {
|
|
20
|
+
zsp_task_func func;
|
|
21
|
+
struct zsp_frame_s *prev;
|
|
22
|
+
uint32_t sz;
|
|
23
|
+
int32_t idx;
|
|
24
|
+
} zsp_frame_t;
|
|
25
|
+
|
|
26
|
+
typedef struct zsp_frame_wrap_s {
|
|
27
|
+
zsp_frame_t frame;
|
|
28
|
+
uintptr_t locals;
|
|
29
|
+
} frame_wrap_t;
|
|
30
|
+
|
|
31
|
+
typedef struct zsp_stack_block_s {
|
|
32
|
+
struct zsp_stack_block_s *prev;
|
|
33
|
+
uint32_t idx;
|
|
34
|
+
uint32_t sz;
|
|
35
|
+
uint8_t data[
|
|
36
|
+
STACK_FRAME_SZ-(sizeof(zsp_frame_t *)+sizeof(uint32_t))];
|
|
37
|
+
} zsp_stack_block_t;
|
|
38
|
+
|
|
39
|
+
typedef struct zsp_thread_s {
|
|
40
|
+
zsp_alloc_t *alloc;
|
|
41
|
+
zsp_stack_block_t *block;
|
|
42
|
+
struct zsp_thread_s *next;
|
|
43
|
+
struct zsp_frame_s *leaf;
|
|
44
|
+
uintptr_t rval;
|
|
45
|
+
} zsp_thread_t;
|
|
46
|
+
|
|
47
|
+
typedef struct zsp_scheduler_s {
|
|
48
|
+
zsp_alloc_t *alloc;
|
|
49
|
+
zsp_thread_t *next;
|
|
50
|
+
zsp_thread_t *tail;
|
|
51
|
+
} zsp_scheduler_t;
|
|
52
|
+
|
|
53
|
+
void zsp_scheduler_init(zsp_scheduler_t *sched, zsp_alloc_t *alloc);
|
|
54
|
+
zsp_thread_t *zsp_scheduler_create_thread(zsp_scheduler_t *sched, zsp_task_func func, ...);
|
|
55
|
+
int zsp_scheduler_run(zsp_scheduler_t *sched);
|
|
56
|
+
zsp_thread_t *zsp_thread_create(zsp_alloc_t *alloc, zsp_task_func func, ...);
|
|
57
|
+
zsp_frame_t *zsp_thread_alloc_frame( zsp_thread_t *thread, uint32_t sz, zsp_task_func func);
|
|
58
|
+
zsp_frame_t *zsp_thread_suspend(zsp_thread_t *thread, zsp_frame_t *frame);
|
|
59
|
+
zsp_frame_t *zsp_thread_return(zsp_thread_t *thread, zsp_frame_t *frame, uintptr_t ret);
|
|
60
|
+
zsp_frame_t *zsp_thread_call(zsp_thread_t *thread, zsp_task_func func, ...);
|
|
61
|
+
zsp_frame_t *zsp_thread_run(zsp_thread_t *thread);
|
|
62
|
+
void zsp_thread_free(zsp_thread_t *thread);
|
|
63
|
+
|
|
64
|
+
#ifdef __cplusplus
|
|
65
|
+
}
|
|
66
|
+
#endif
|
|
67
|
+
|
|
68
|
+
#endif /* INCLUDED_ZSP_THREAD_H */
|
|
69
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
#ifndef INCLUDED_ZSP_TYPES_H
|
|
3
|
+
#define INCLUDED_ZSP_TYPES_H
|
|
4
|
+
#include <stdint.h>
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
typedef bool zsp_bool_t;
|
|
8
|
+
#else
|
|
9
|
+
typedef enum {
|
|
10
|
+
false = 0,
|
|
11
|
+
true = 1
|
|
12
|
+
} zsp_bool_t;
|
|
13
|
+
#endif
|
|
14
|
+
|
|
15
|
+
#endif /* INCLUDED_ZSP_TYPES_H */
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* zsp_esw_support.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
|
+
* This file defines and describes APIs used by embedded software tests that
|
|
22
|
+
* must be provided by the platform. These APIs may be implemented as:
|
|
23
|
+
* - C pre-processor macros
|
|
24
|
+
* - C functions
|
|
25
|
+
* - C static-inline functions
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* zsp_esw_notify(point_id)
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* zsp_esw_wait(executor_id, point_id)
|
|
34
|
+
*/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: zuspec-be-sw
|
|
3
|
+
Version: 0.1.0.15240461960rc0
|
|
4
|
+
Summary: Backend library to generate software output
|
|
5
|
+
Home-page: https://github.com/zuspec/zuspec-be-sw
|
|
6
|
+
Author: Matthew Ballance
|
|
7
|
+
Author-email: matt.ballance@gmail.com
|
|
8
|
+
License: Apache 2.0
|
|
9
|
+
Keywords: SystemVerilog,Verilog,RTL,Python
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: ciostream
|
|
12
|
+
Requires-Dist: zuspec-arl-dm>=0.1.0
|
|
13
|
+
Requires-Dist: vsc-dm
|
|
14
|
+
Requires-Dist: debug-mgr
|
|
15
|
+
Dynamic: author
|
|
16
|
+
Dynamic: author-email
|
|
17
|
+
Dynamic: description
|
|
18
|
+
Dynamic: home-page
|
|
19
|
+
Dynamic: keywords
|
|
20
|
+
Dynamic: license
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: summary
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Provides features for mapping ARL models to software output
|
|
27
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
zsp_be_sw/__build_num__.py,sha256=4uuJ66QL0MtpSoHm_TT09IDaYWY6NS9M9X00tEAQX0k,22
|
|
2
|
+
zsp_be_sw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
zsp_be_sw/__version__.py,sha256=qYfFeP_WfzKHujAK6ObxvwJyOYCihKdIW-PHpoq-6Cc,69
|
|
4
|
+
zsp_be_sw/core.cpython-39-x86_64-linux-gnu.so,sha256=bvz1U3nabHVCD0rt9QowkqEN-v6FrGL3ENIOECHSP_4,1654976
|
|
5
|
+
zsp_be_sw/libzsp-be-sw.so,sha256=6kvoZFqLM4RZm1iUqnTczxbH4KUe1a0hulwGayh4I5g,4045696
|
|
6
|
+
zsp_be_sw/share/include/zsp/be/sw/FactoryExt.h,sha256=zzqqdoxxJIQhsDb-cDT4vJBqhYC8XJpq1ZEN48FX2z0,100
|
|
7
|
+
zsp_be_sw/share/include/zsp/be/sw/IContext.h,sha256=5S7rVTz-Itsuleraru7iEC8KZUU0cRK-LD_v0bsX114,2481
|
|
8
|
+
zsp_be_sw/share/include/zsp/be/sw/IFactory.h,sha256=eyDpv3rpvvXxWLTnnIlNiYfxMzQzX1OzIDmEdBn4GQg,3118
|
|
9
|
+
zsp_be_sw/share/include/zsp/be/sw/IFunctionInfo.h,sha256=NiuncP9446DXXXdufMhu6n09rsf9HC0OkWz6tykYO1o,2120
|
|
10
|
+
zsp_be_sw/share/include/zsp/be/sw/IFunctionMap.h,sha256=Hf1cQw-5J3j93v1tlL1_MiWUey9AqkbiWl6TQSfgVgE,1193
|
|
11
|
+
zsp_be_sw/share/include/zsp/be/sw/IGeneratorEvalIterator.h,sha256=TpK9eVkelsm-hTVqV5wvXk_-2dgPEG0K1Uux493dgU0,1264
|
|
12
|
+
zsp_be_sw/share/include/zsp/be/sw/IGeneratorFunctions.h,sha256=qbsVZSdVifLCSq6OxXJXSwZ3X_anQYHLUxJvkD2oYfQ,1576
|
|
13
|
+
zsp_be_sw/share/include/zsp/be/sw/IGeneratorUnrolledTrace.h,sha256=YFibFsePVVs6kx2aJScxMkJJhhrOK1zZrl4CXWfRAIA,1534
|
|
14
|
+
zsp_be_sw/share/include/zsp/be/sw/IMethodCallFactoryAssocData.h,sha256=k04P_XksEkB6XWHnxMqrWgT-F6py_HpelEwbbOhaKwQ,1484
|
|
15
|
+
zsp_be_sw/share/include/zsp/be/sw/INameMap.h,sha256=W_YrhZ1YbSgG9FrEuPRD6sadroNDscW3qBbY2FIxS40,1445
|
|
16
|
+
zsp_be_sw/share/include/zsp/be/sw/IOutput.h,sha256=Im0xoATfu_xOobUzfTOmM0ROuXO8w9-VMr0BXVKJRmQ,1727
|
|
17
|
+
zsp_be_sw/share/include/zsp/be/sw/IOutputStr.h,sha256=exVx0hu40uMci_GVP9TCyhVsMFC6DLDRrrpUVwu0SH8,991
|
|
18
|
+
zsp_be_sw/share/include/zsp/be/sw/impl/MethodCallFactoryAssocDataBase.h,sha256=RdRdW7nWYgd7h_wzCeVDLM3xLlzgZ8m0hc9fbdyK9U8,1395
|
|
19
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_action.h,sha256=Vnis_Jvhi3RDGanBb_JjzadqhQ4sB5VUDTmmPz_P7Kw,376
|
|
20
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_actor.h,sha256=JMwWl7lg77PFQZLm1or-7_UR7xgN77hhOsm3A2o2TEo,696
|
|
21
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_actor_base.h,sha256=WuZYe8Dg8VPesRzvYjASLCaa3RKzp2wqQtVpnit7nYU,563
|
|
22
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_alloc.h,sha256=DzPRmm1n8SgurZWVY2yQqz2dYaUZH7LJ69Ml17EdkU0,481
|
|
23
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_api.h,sha256=_LDHsT1TkSuwaWS_0_kZWZYsIWelvGjqB_miBzBV0N0,582
|
|
24
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_component.h,sha256=ED4eQpDrwRNcItLr0JGImAJNlylO92QUU94l3bpH1h8,1287
|
|
25
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_executor.h,sha256=xjZqwENgaj1hHrPcDVdgbKlQ236JWslsd40nygeUvok,246
|
|
26
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_object.h,sha256=mlX6ZZILj-NsIKJR1NSE3kgY8P2ZIccHsbaHikTW-xI,613
|
|
27
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_rt.h,sha256=sVJjb90VQdfoMc6UAgaKJXVKX2y7GVCKO-4L7aNU6iU,195
|
|
28
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_struct.h,sha256=wBrO90eQbD7NqPET5AXexl0EvOpjsE1pvvznWkQQFhU,1005
|
|
29
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_thread.h,sha256=bIfYO3kyr8bFNJkC3wz2c7i7UthaMoP3z_BOxjw59TI,2080
|
|
30
|
+
zsp_be_sw/share/include/zsp/be/sw/rt/zsp_types.h,sha256=aIrwZ-3VeBqYHO92WCOMgIxy9TEUTcW2wjVbn64-p7g,233
|
|
31
|
+
zsp_be_sw/share/include/zsp/esw/zsp_esw_support.h,sha256=5hpBmWfy9cN0fg4g7ZM9uyZCxjCuJzW0T_KFMv5pwug,995
|
|
32
|
+
zuspec_be_sw-0.1.0.15240461960rc0.dist-info/METADATA,sha256=MUvtGPcW2qF3epDOygJ-HDyKTlNQANgW5IjZ4tea5lY,672
|
|
33
|
+
zuspec_be_sw-0.1.0.15240461960rc0.dist-info/WHEEL,sha256=U0gVz0LfHNGzhj3MY7drwX3PhtRs6JtjuQTNIphzGgo,147
|
|
34
|
+
zuspec_be_sw-0.1.0.15240461960rc0.dist-info/top_level.txt,sha256=F69v5yvtf2MTsB19kN7iCBNm1-HkyITrIjM7enDpIh8,10
|
|
35
|
+
zuspec_be_sw-0.1.0.15240461960rc0.dist-info/RECORD,,
|
|
36
|
+
zuspec_be_sw-0.1.0.15240461960rc0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|