CIRCT  20.0.0git
DummySvDpi.cpp
Go to the documentation of this file.
1 //===- DummySvDpi.cpp - Dummy stubs the svdpi.h -----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Dummy stubs for every function in svdpi.h. This produces an MtiPli.so for
10 // linking a DPI library in the absence of a simulator. Should dynamicall link
11 // with the MtiPli library supplied with the simulator at runtime. This shared
12 // object should not be distributed with CIRCT.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 // On MSVC++ we need svdpi.h to declare exports, not imports
17 #define DPI_PROTOTYPES
18 #undef XXTERN
19 #define XXTERN DPI_EXTERN DPI_DLLESPEC
20 #undef EETERN
21 #define EETERN DPI_EXTERN DPI_DLLESPEC
22 
23 #include "svdpi.h"
24 #undef NDEBUG
25 #include <cassert>
26 
27 const char *svDpiVersion(void) {
28  assert(false && "Linking error: should not ever execute.");
29  return nullptr;
30 }
31 svBit svGetBitselBit(const svBitVecVal *s, int i) {
32  assert(false && "Linking error: should not ever execute.");
33  return 0;
34 }
36  assert(false && "Linking error: should not ever execute.");
37  return 0;
38 }
39 void svPutBitselBit(svBitVecVal *d, int i, svBit s) {
40  assert(false && "Linking error: should not ever execute.");
41 }
43  assert(false && "Linking error: should not ever execute.");
44 }
45 void svGetPartselBit(svBitVecVal *d, const svBitVecVal *s, int i, int w) {
46  assert(false && "Linking error: should not ever execute.");
47 }
48 void svGetPartselLogic(svLogicVecVal *d, const svLogicVecVal *s, int i, int w) {
49  assert(false && "Linking error: should not ever execute.");
50 }
51 void svPutPartselBit(svBitVecVal *d, const svBitVecVal s, int i, int w) {
52  assert(false && "Linking error: should not ever execute.");
53 }
54 void svPutPartselLogic(svLogicVecVal *d, const svLogicVecVal s, int i, int w) {
55  assert(false && "Linking error: should not ever execute.");
56 }
57 int svLeft(const svOpenArrayHandle h, int d) {
58  assert(false && "Linking error: should not ever execute.");
59  return 0;
60 }
61 int svRight(const svOpenArrayHandle h, int d) {
62  assert(false && "Linking error: should not ever execute.");
63  return 0;
64 }
65 int svLow(const svOpenArrayHandle h, int d) {
66  assert(false && "Linking error: should not ever execute.");
67  return 0;
68 }
69 int svHigh(const svOpenArrayHandle h, int d) {
70  assert(false && "Linking error: should not ever execute.");
71  return 0;
72 }
73 int svIncrement(const svOpenArrayHandle h, int d) {
74  assert(false && "Linking error: should not ever execute.");
75  return 0;
76 }
77 int svSize(const svOpenArrayHandle h, int d) {
78  assert(false && "Linking error: should not ever execute.");
79  return 0;
80 }
82  assert(false && "Linking error: should not ever execute.");
83  return 0;
84 }
86  assert(false && "Linking error: should not ever execute.");
87  return nullptr;
88 }
90  assert(false && "Linking error: should not ever execute.");
91  return 0;
92 }
93 void *svGetArrElemPtr(const svOpenArrayHandle, int indx1, ...) {
94  assert(false && "Linking error: should not ever execute.");
95  return nullptr;
96 }
97 void *svGetArrElemPtr1(const svOpenArrayHandle, int indx1) {
98  assert(false && "Linking error: should not ever execute.");
99  return nullptr;
100 }
101 void *svGetArrElemPtr2(const svOpenArrayHandle, int indx1, int indx2) {
102  assert(false && "Linking error: should not ever execute.");
103  return nullptr;
104 }
105 void *svGetArrElemPtr3(const svOpenArrayHandle, int indx1, int indx2,
106  int indx3) {
107  assert(false && "Linking error: should not ever execute.");
108  return nullptr;
109 }
111  int indx1, ...) {
112  assert(false && "Linking error: should not ever execute.");
113 }
115  int indx1) {
116  assert(false && "Linking error: should not ever execute.");
117 }
119  int indx1, int indx2) {
120  assert(false && "Linking error: should not ever execute.");
121 }
123  int indx1, int indx2, int indx3) {
124  assert(false && "Linking error: should not ever execute.");
125 }
127  int indx1, ...) {
128  assert(false && "Linking error: should not ever execute.");
129 }
131  int indx1) {
132  assert(false && "Linking error: should not ever execute.");
133 }
135  int indx1, int indx2) {
136  assert(false && "Linking error: should not ever execute.");
137 }
139  int indx1, int indx2, int indx3) {
140  assert(false && "Linking error: should not ever execute.");
141 }
143  ...) {
144  assert(false && "Linking error: should not ever execute.");
145 }
147  int indx1) {
148  assert(false && "Linking error: should not ever execute.");
149 }
151  int indx1, int indx2) {
152  assert(false && "Linking error: should not ever execute.");
153 }
155  int indx1, int indx2, int indx3) {
156  assert(false && "Linking error: should not ever execute.");
157 }
159  int indx1, ...) {
160  assert(false && "Linking error: should not ever execute.");
161 }
163  int indx1) {
164  assert(false && "Linking error: should not ever execute.");
165 }
167  int indx1, int indx2) {
168  assert(false && "Linking error: should not ever execute.");
169 }
171  int indx1, int indx2, int indx3) {
172  assert(false && "Linking error: should not ever execute.");
173 }
174 svBit svGetBitArrElem(const svOpenArrayHandle s, int indx1, ...) {
175  assert(false && "Linking error: should not ever execute.");
176  return 0;
177 }
179  assert(false && "Linking error: should not ever execute.");
180  return 0;
181 }
182 svBit svGetBitArrElem2(const svOpenArrayHandle s, int indx1, int indx2) {
183  assert(false && "Linking error: should not ever execute.");
184  return 0;
185 }
186 svBit svGetBitArrElem3(const svOpenArrayHandle s, int indx1, int indx2,
187  int indx3) {
188  assert(false && "Linking error: should not ever execute.");
189  return 0;
190 }
191 svLogic svGetLogicArrElem(const svOpenArrayHandle s, int indx1, ...) {
192  assert(false && "Linking error: should not ever execute.");
193  return 0;
194 }
196  assert(false && "Linking error: should not ever execute.");
197  return 0;
198 }
199 svLogic svGetLogicArrElem2(const svOpenArrayHandle s, int indx1, int indx2) {
200  assert(false && "Linking error: should not ever execute.");
201  return 0;
202 }
203 svLogic svGetLogicArrElem3(const svOpenArrayHandle s, int indx1, int indx2,
204  int indx3) {
205  assert(false && "Linking error: should not ever execute.");
206  return 0;
207 }
208 void svPutLogicArrElem(const svOpenArrayHandle d, svLogic value, int indx1,
209  ...) {
210  assert(false && "Linking error: should not ever execute.");
211 }
212 void svPutLogicArrElem1(const svOpenArrayHandle d, svLogic value, int indx1) {
213  assert(false && "Linking error: should not ever execute.");
214 }
215 void svPutLogicArrElem2(const svOpenArrayHandle d, svLogic value, int indx1,
216  int indx2) {
217  assert(false && "Linking error: should not ever execute.");
218 }
219 void svPutLogicArrElem3(const svOpenArrayHandle d, svLogic value, int indx1,
220  int indx2, int indx3) {
221  assert(false && "Linking error: should not ever execute.");
222 }
223 void svPutBitArrElem(const svOpenArrayHandle d, svBit value, int indx1, ...) {
224  assert(false && "Linking error: should not ever execute.");
225 }
226 void svPutBitArrElem1(const svOpenArrayHandle d, svBit value, int indx1) {
227  assert(false && "Linking error: should not ever execute.");
228 }
229 void svPutBitArrElem2(const svOpenArrayHandle d, svBit value, int indx1,
230  int indx2) {
231  assert(false && "Linking error: should not ever execute.");
232 }
233 void svPutBitArrElem3(const svOpenArrayHandle d, svBit value, int indx1,
234  int indx2, int indx3) {
235  assert(false && "Linking error: should not ever execute.");
236 }
238  assert(false && "Linking error: should not ever execute.");
239  return 0;
240 }
241 svScope svSetScope(const svScope scope) {
242  assert(false && "Linking error: should not ever execute.");
243  return 0;
244 }
245 const char *svGetNameFromScope(const svScope) {
246  assert(false && "Linking error: should not ever execute.");
247  return 0;
248 }
249 svScope svGetScopeFromName(const char *scopeName) {
250  assert(false && "Linking error: should not ever execute.");
251  return 0;
252 }
253 int svPutUserData(const svScope scope, void *userKey, void *userData) {
254  assert(false && "Linking error: should not ever execute.");
255  return 0;
256 }
257 void *svGetUserData(const svScope scope, void *userKey) {
258  assert(false && "Linking error: should not ever execute.");
259  return nullptr;
260 }
261 int svGetCallerInfo(const char **fileName, int *lineNumber) {
262  assert(false && "Linking error: should not ever execute.");
263  return 0;
264 }
265 int svIsDisabledState(void) {
266  assert(false && "Linking error: should not ever execute.");
267  return 0;
268 }
269 void svAckDisabledState(void) {
270  assert(false && "Linking error: should not ever execute.");
271 }
assert(baseType &&"element must be base type")
svBit svGetBitselBit(const svBitVecVal *s, int i)
Definition: DummySvDpi.cpp:31
void svPutLogicArrElem1VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1)
Definition: DummySvDpi.cpp:130
void * svGetArrElemPtr2(const svOpenArrayHandle, int indx1, int indx2)
Definition: DummySvDpi.cpp:101
int svIsDisabledState(void)
Definition: DummySvDpi.cpp:265
void svGetPartselBit(svBitVecVal *d, const svBitVecVal *s, int i, int w)
Definition: DummySvDpi.cpp:45
int svSizeOfArray(const svOpenArrayHandle)
Definition: DummySvDpi.cpp:89
void svPutLogicArrElem2VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1, int indx2)
Definition: DummySvDpi.cpp:134
void svPutBitArrElemVecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1,...)
Definition: DummySvDpi.cpp:110
int svPutUserData(const svScope scope, void *userKey, void *userData)
Definition: DummySvDpi.cpp:253
void svPutLogicArrElem(const svOpenArrayHandle d, svLogic value, int indx1,...)
Definition: DummySvDpi.cpp:208
svScope svGetScopeFromName(const char *scopeName)
Definition: DummySvDpi.cpp:249
void svGetLogicArrElem1VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1)
Definition: DummySvDpi.cpp:162
svLogic svGetBitselLogic(const svLogicVecVal *s, int i)
Definition: DummySvDpi.cpp:35
svBit svGetBitArrElem2(const svOpenArrayHandle s, int indx1, int indx2)
Definition: DummySvDpi.cpp:182
void * svGetArrElemPtr1(const svOpenArrayHandle, int indx1)
Definition: DummySvDpi.cpp:97
svBit svGetBitArrElem(const svOpenArrayHandle s, int indx1,...)
Definition: DummySvDpi.cpp:174
svBit svGetBitArrElem1(const svOpenArrayHandle s, int indx1)
Definition: DummySvDpi.cpp:178
void svGetLogicArrElem3VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:170
void svGetLogicArrElemVecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1,...)
Definition: DummySvDpi.cpp:158
void svPutBitArrElem3(const svOpenArrayHandle d, svBit value, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:233
void svGetLogicArrElem2VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1, int indx2)
Definition: DummySvDpi.cpp:166
void svPutBitArrElem2VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1, int indx2)
Definition: DummySvDpi.cpp:118
int svSize(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:77
void svPutLogicArrElem3(const svOpenArrayHandle d, svLogic value, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:219
void svPutLogicArrElemVecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1,...)
Definition: DummySvDpi.cpp:126
int svIncrement(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:73
void svPutLogicArrElem2(const svOpenArrayHandle d, svLogic value, int indx1, int indx2)
Definition: DummySvDpi.cpp:215
svLogic svGetLogicArrElem(const svOpenArrayHandle s, int indx1,...)
Definition: DummySvDpi.cpp:191
int svGetCallerInfo(const char **fileName, int *lineNumber)
Definition: DummySvDpi.cpp:261
void svPutBitArrElem2(const svOpenArrayHandle d, svBit value, int indx1, int indx2)
Definition: DummySvDpi.cpp:229
svScope svSetScope(const svScope scope)
Definition: DummySvDpi.cpp:241
const char * svGetNameFromScope(const svScope)
Definition: DummySvDpi.cpp:245
void svPutBitArrElem1VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1)
Definition: DummySvDpi.cpp:114
void svPutLogicArrElem1(const svOpenArrayHandle d, svLogic value, int indx1)
Definition: DummySvDpi.cpp:212
void * svGetUserData(const svScope scope, void *userKey)
Definition: DummySvDpi.cpp:257
int svHigh(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:69
void svPutBitselBit(svBitVecVal *d, int i, svBit s)
Definition: DummySvDpi.cpp:39
void svGetPartselLogic(svLogicVecVal *d, const svLogicVecVal *s, int i, int w)
Definition: DummySvDpi.cpp:48
void svPutBitselLogic(svLogicVecVal *d, int i, svLogic s)
Definition: DummySvDpi.cpp:42
void svPutBitArrElem3VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:122
svLogic svGetLogicArrElem1(const svOpenArrayHandle s, int indx1)
Definition: DummySvDpi.cpp:195
int svDimensions(const svOpenArrayHandle h)
Definition: DummySvDpi.cpp:81
svLogic svGetLogicArrElem3(const svOpenArrayHandle s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:203
void svGetBitArrElem1VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1)
Definition: DummySvDpi.cpp:146
void * svGetArrElemPtr3(const svOpenArrayHandle, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:105
int svLeft(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:57
void * svGetArrayPtr(const svOpenArrayHandle)
Definition: DummySvDpi.cpp:85
int svLow(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:65
void svAckDisabledState(void)
Definition: DummySvDpi.cpp:269
const char * svDpiVersion(void)
Definition: DummySvDpi.cpp:27
void svPutBitArrElem1(const svOpenArrayHandle d, svBit value, int indx1)
Definition: DummySvDpi.cpp:226
int svRight(const svOpenArrayHandle h, int d)
Definition: DummySvDpi.cpp:61
void svGetBitArrElem3VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:154
svLogic svGetLogicArrElem2(const svOpenArrayHandle s, int indx1, int indx2)
Definition: DummySvDpi.cpp:199
void svGetBitArrElem2VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1, int indx2)
Definition: DummySvDpi.cpp:150
void svPutPartselLogic(svLogicVecVal *d, const svLogicVecVal s, int i, int w)
Definition: DummySvDpi.cpp:54
void svPutPartselBit(svBitVecVal *d, const svBitVecVal s, int i, int w)
Definition: DummySvDpi.cpp:51
void svPutLogicArrElem3VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:138
void svGetBitArrElemVecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1,...)
Definition: DummySvDpi.cpp:142
void svPutBitArrElem(const svOpenArrayHandle d, svBit value, int indx1,...)
Definition: DummySvDpi.cpp:223
svBit svGetBitArrElem3(const svOpenArrayHandle s, int indx1, int indx2, int indx3)
Definition: DummySvDpi.cpp:186
void * svGetArrElemPtr(const svOpenArrayHandle, int indx1,...)
Definition: DummySvDpi.cpp:93
svScope svGetScope(void)
Definition: DummySvDpi.cpp:237
svScalar svLogic
Definition: svdpi.h:84
svScalar svBit
Definition: svdpi.h:83
XXTERN typedef void * svScope
Definition: svdpi.h:130
XXTERN typedef void * svOpenArrayHandle
Definition: svdpi.h:133
uint32_t svBitVecVal
Definition: svdpi.h:102