Loading [MathJax]/extensions/tex2jax.js
CIRCT 20.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dpi.h
Go to the documentation of this file.
1//===- dpi.h - DPI function C++ declarations --------------------*- 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// Originally generated from 'Cosim_DpiPkg.sv' by an RTL simulator. All these
10// functions are called from RTL. Some of the funky types are produced by the
11// RTL simulators when it did the conversion.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef CIRCT_DIALECT_ESI_COSIM_DPI_H
16#define CIRCT_DIALECT_ESI_COSIM_DPI_H
17
18#include "svdpi.h"
19
20#ifdef WIN32
21#define DPI extern "C" __declspec(dllexport)
22#else
23#define DPI extern "C"
24#endif
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29/// Register an endpoint.
30DPI int sv2cCosimserverEpRegister(char *endpointId, char *fromHostTypeId,
31 int fromHostTypeSize, char *toHostTypeId,
32 int toHostTypeSize);
33/// Try to get a message from a client.
34DPI int sv2cCosimserverEpTryGet(char *endpointId,
35 // NOLINTNEXTLINE(misc-misplaced-const)
36 const svOpenArrayHandle data,
37 unsigned int *sizeBytes);
38/// Send a message to a client.
39DPI int sv2cCosimserverEpTryPut(char *endpointId,
40 // NOLINTNEXTLINE(misc-misplaced-const)
41 const svOpenArrayHandle data, int dataLimit);
42
43/// Start the server. Not required as the first endpoint registration will do
44/// this. Provided if one wants to start the server early.
46/// Shutdown the RPC server.
48
49/// Set the system zlib-compressed manifest.
50DPI void sv2cCosimserverSetManifest(int esiVersion,
51 const svOpenArrayHandle compressedManifest);
52
53/// Register an MMIO module. Just checks that there is only one instantiated.
55
56/// Read MMIO function pair. Assumes that reads come back in the order in which
57/// they were requested.
58DPI int sv2cCosimserverMMIOReadTryGet(uint32_t *address);
59DPI void sv2cCosimserverMMIOReadRespond(uint32_t data, char error);
60
61/// Write MMIO function pair. Assumes that write errors come back in the order
62/// in which the writes were issued.
63DPI int sv2cCosimserverMMIOWriteTryGet(uint32_t *address, uint32_t *data);
65
66#ifdef __cplusplus
67}
68
69#endif
70
71#endif
DPI int sv2cCosimserverEpTryPut(char *endpointId, const svOpenArrayHandle data, int dataLimit)
Send a message to a client.
DPI void sv2cCosimserverMMIOWriteRespond(char error)
DPI void sv2cCosimserverSetManifest(int esiVersion, const svOpenArrayHandle compressedManifest)
Set the system zlib-compressed manifest.
DPI int sv2cCosimserverMMIORegister()
Register an MMIO module. Just checks that there is only one instantiated.
DPI void sv2cCosimserverFinish()
Shutdown the RPC server.
DPI int sv2cCosimserverEpRegister(char *endpointId, char *fromHostTypeId, int fromHostTypeSize, char *toHostTypeId, int toHostTypeSize)
Register an endpoint.
DPI int sv2cCosimserverEpTryGet(char *endpointId, const svOpenArrayHandle data, unsigned int *sizeBytes)
Try to get a message from a client.
#define DPI
Definition dpi.h:23
DPI int sv2cCosimserverInit()
Start the server.
DPI int sv2cCosimserverMMIOWriteTryGet(uint32_t *address, uint32_t *data)
Write MMIO function pair.
DPI int sv2cCosimserverMMIOReadTryGet(uint32_t *address)
Read MMIO function pair.
DPI void sv2cCosimserverMMIOReadRespond(uint32_t data, char error)
XXTERN typedef void * svOpenArrayHandle
Definition svdpi.h:133