CIRCT 20.0.0git
Loading...
Searching...
No Matches
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
27const char *svDpiVersion(void) {
28 assert(false && "Linking error: should not ever execute.");
29 return nullptr;
30}
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}
39void 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}
45void svGetPartselBit(svBitVecVal *d, const svBitVecVal *s, int i, int w) {
46 assert(false && "Linking error: should not ever execute.");
47}
48void svGetPartselLogic(svLogicVecVal *d, const svLogicVecVal *s, int i, int w) {
49 assert(false && "Linking error: should not ever execute.");
50}
51void svPutPartselBit(svBitVecVal *d, const svBitVecVal s, int i, int w) {
52 assert(false && "Linking error: should not ever execute.");
53}
54void svPutPartselLogic(svLogicVecVal *d, const svLogicVecVal s, int i, int w) {
55 assert(false && "Linking error: should not ever execute.");
56}
57int svLeft(const svOpenArrayHandle h, int d) {
58 assert(false && "Linking error: should not ever execute.");
59 return 0;
60}
61int svRight(const svOpenArrayHandle h, int d) {
62 assert(false && "Linking error: should not ever execute.");
63 return 0;
64}
65int svLow(const svOpenArrayHandle h, int d) {
66 assert(false && "Linking error: should not ever execute.");
67 return 0;
68}
69int svHigh(const svOpenArrayHandle h, int d) {
70 assert(false && "Linking error: should not ever execute.");
71 return 0;
72}
73int svIncrement(const svOpenArrayHandle h, int d) {
74 assert(false && "Linking error: should not ever execute.");
75 return 0;
76}
77int 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}
93void *svGetArrElemPtr(const svOpenArrayHandle, int indx1, ...) {
94 assert(false && "Linking error: should not ever execute.");
95 return nullptr;
96}
97void *svGetArrElemPtr1(const svOpenArrayHandle, int indx1) {
98 assert(false && "Linking error: should not ever execute.");
99 return nullptr;
100}
101void *svGetArrElemPtr2(const svOpenArrayHandle, int indx1, int indx2) {
102 assert(false && "Linking error: should not ever execute.");
103 return nullptr;
104}
105void *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}
174svBit 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}
182svBit svGetBitArrElem2(const svOpenArrayHandle s, int indx1, int indx2) {
183 assert(false && "Linking error: should not ever execute.");
184 return 0;
185}
186svBit svGetBitArrElem3(const svOpenArrayHandle s, int indx1, int indx2,
187 int indx3) {
188 assert(false && "Linking error: should not ever execute.");
189 return 0;
190}
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}
199svLogic svGetLogicArrElem2(const svOpenArrayHandle s, int indx1, int indx2) {
200 assert(false && "Linking error: should not ever execute.");
201 return 0;
202}
203svLogic svGetLogicArrElem3(const svOpenArrayHandle s, int indx1, int indx2,
204 int indx3) {
205 assert(false && "Linking error: should not ever execute.");
206 return 0;
207}
208void svPutLogicArrElem(const svOpenArrayHandle d, svLogic value, int indx1,
209 ...) {
210 assert(false && "Linking error: should not ever execute.");
211}
212void svPutLogicArrElem1(const svOpenArrayHandle d, svLogic value, int indx1) {
213 assert(false && "Linking error: should not ever execute.");
214}
215void svPutLogicArrElem2(const svOpenArrayHandle d, svLogic value, int indx1,
216 int indx2) {
217 assert(false && "Linking error: should not ever execute.");
218}
219void svPutLogicArrElem3(const svOpenArrayHandle d, svLogic value, int indx1,
220 int indx2, int indx3) {
221 assert(false && "Linking error: should not ever execute.");
222}
223void svPutBitArrElem(const svOpenArrayHandle d, svBit value, int indx1, ...) {
224 assert(false && "Linking error: should not ever execute.");
225}
226void svPutBitArrElem1(const svOpenArrayHandle d, svBit value, int indx1) {
227 assert(false && "Linking error: should not ever execute.");
228}
229void svPutBitArrElem2(const svOpenArrayHandle d, svBit value, int indx1,
230 int indx2) {
231 assert(false && "Linking error: should not ever execute.");
232}
233void 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}
242 assert(false && "Linking error: should not ever execute.");
243 return 0;
244}
245const char *svGetNameFromScope(const svScope) {
246 assert(false && "Linking error: should not ever execute.");
247 return 0;
248}
249svScope svGetScopeFromName(const char *scopeName) {
250 assert(false && "Linking error: should not ever execute.");
251 return 0;
252}
253int svPutUserData(const svScope scope, void *userKey, void *userData) {
254 assert(false && "Linking error: should not ever execute.");
255 return 0;
256}
257void *svGetUserData(const svScope scope, void *userKey) {
258 assert(false && "Linking error: should not ever execute.");
259 return nullptr;
260}
261int svGetCallerInfo(const char **fileName, int *lineNumber) {
262 assert(false && "Linking error: should not ever execute.");
263 return 0;
264}
266 assert(false && "Linking error: should not ever execute.");
267 return 0;
268}
270 assert(false && "Linking error: should not ever execute.");
271}
assert(baseType &&"element must be base type")
svBit svGetBitselBit(const svBitVecVal *s, int i)
void svPutLogicArrElem1VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1)
int svIsDisabledState(void)
void svGetPartselBit(svBitVecVal *d, const svBitVecVal *s, int i, int w)
int svSizeOfArray(const svOpenArrayHandle)
void svPutLogicArrElem2VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1, int indx2)
void svPutBitArrElemVecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1,...)
int svPutUserData(const svScope scope, void *userKey, void *userData)
void * svGetArrElemPtr1(const svOpenArrayHandle, int indx1)
void svPutLogicArrElem(const svOpenArrayHandle d, svLogic value, int indx1,...)
const char * svGetNameFromScope(const svScope)
svScope svGetScopeFromName(const char *scopeName)
void svGetLogicArrElem1VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1)
svLogic svGetBitselLogic(const svLogicVecVal *s, int i)
svBit svGetBitArrElem2(const svOpenArrayHandle s, int indx1, int indx2)
svBit svGetBitArrElem(const svOpenArrayHandle s, int indx1,...)
svBit svGetBitArrElem1(const svOpenArrayHandle s, int indx1)
void svGetLogicArrElem3VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1, int indx2, int indx3)
void svGetLogicArrElemVecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1,...)
void svPutBitArrElem3(const svOpenArrayHandle d, svBit value, int indx1, int indx2, int indx3)
void svGetLogicArrElem2VecVal(svLogicVecVal *d, const svOpenArrayHandle s, int indx1, int indx2)
void svPutBitArrElem2VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1, int indx2)
int svSize(const svOpenArrayHandle h, int d)
void svPutLogicArrElem3(const svOpenArrayHandle d, svLogic value, int indx1, int indx2, int indx3)
const char * svDpiVersion(void)
void svPutLogicArrElemVecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1,...)
int svIncrement(const svOpenArrayHandle h, int d)
void * svGetArrayPtr(const svOpenArrayHandle)
void svPutLogicArrElem2(const svOpenArrayHandle d, svLogic value, int indx1, int indx2)
svLogic svGetLogicArrElem(const svOpenArrayHandle s, int indx1,...)
int svGetCallerInfo(const char **fileName, int *lineNumber)
void * svGetArrElemPtr3(const svOpenArrayHandle, int indx1, int indx2, int indx3)
void svPutBitArrElem2(const svOpenArrayHandle d, svBit value, int indx1, int indx2)
svScope svSetScope(const svScope scope)
void svPutBitArrElem1VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1)
void * svGetArrElemPtr2(const svOpenArrayHandle, int indx1, int indx2)
void svPutLogicArrElem1(const svOpenArrayHandle d, svLogic value, int indx1)
int svHigh(const svOpenArrayHandle h, int d)
void svPutBitselBit(svBitVecVal *d, int i, svBit s)
void svGetPartselLogic(svLogicVecVal *d, const svLogicVecVal *s, int i, int w)
void svPutBitselLogic(svLogicVecVal *d, int i, svLogic s)
void svPutBitArrElem3VecVal(const svOpenArrayHandle d, const svBitVecVal *s, int indx1, int indx2, int indx3)
svLogic svGetLogicArrElem1(const svOpenArrayHandle s, int indx1)
void * svGetUserData(const svScope scope, void *userKey)
int svDimensions(const svOpenArrayHandle h)
void * svGetArrElemPtr(const svOpenArrayHandle, int indx1,...)
svLogic svGetLogicArrElem3(const svOpenArrayHandle s, int indx1, int indx2, int indx3)
void svGetBitArrElem1VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1)
int svLeft(const svOpenArrayHandle h, int d)
int svLow(const svOpenArrayHandle h, int d)
void svAckDisabledState(void)
void svPutBitArrElem1(const svOpenArrayHandle d, svBit value, int indx1)
int svRight(const svOpenArrayHandle h, int d)
void svGetBitArrElem3VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1, int indx2, int indx3)
svLogic svGetLogicArrElem2(const svOpenArrayHandle s, int indx1, int indx2)
void svGetBitArrElem2VecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1, int indx2)
void svPutPartselLogic(svLogicVecVal *d, const svLogicVecVal s, int i, int w)
void svPutPartselBit(svBitVecVal *d, const svBitVecVal s, int i, int w)
void svPutLogicArrElem3VecVal(const svOpenArrayHandle d, const svLogicVecVal *s, int indx1, int indx2, int indx3)
void svGetBitArrElemVecVal(svBitVecVal *d, const svOpenArrayHandle s, int indx1,...)
void svPutBitArrElem(const svOpenArrayHandle d, svBit value, int indx1,...)
svBit svGetBitArrElem3(const svOpenArrayHandle s, int indx1, int indx2, int indx3)
svScope svGetScope(void)
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