CIRCT  19.0.0git
Macros | Functions
dpi.h File Reference
#include "dpi/svdpi.h"
Include dependency graph for dpi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DPI   extern "C"
 

Functions

DPI int sv2cCosimserverEpRegister (char *endpointId, char *fromHostTypeId, int fromHostTypeSize, char *toHostTypeId, int toHostTypeSize)
 Register an endpoint. More...
 
DPI int sv2cCosimserverEpTryGet (char *endpointId, const svOpenArrayHandle data, unsigned int *sizeBytes)
 Try to get a message from a client. More...
 
DPI int sv2cCosimserverEpTryPut (char *endpointId, const svOpenArrayHandle data, int dataLimit)
 Send a message to a client. More...
 
DPI int sv2cCosimserverInit ()
 Start the server. More...
 
DPI void sv2cCosimserverFinish ()
 Shutdown the RPC server. More...
 
DPI void sv2cCosimserverSetManifest (unsigned int esiVersion, const svOpenArrayHandle compressedManifest)
 Set the system zlib-compressed manifest. More...
 
DPI int sv2cCosimserverMMIORegister ()
 Register an MMIO module. Just checks that there is only one instantiated. More...
 
DPI int sv2cCosimserverMMIOReadTryGet (uint32_t *address)
 Read MMIO function pair. More...
 
DPI void sv2cCosimserverMMIOReadRespond (uint32_t data, char error)
 
DPI int sv2cCosimserverMMIOWriteTryGet (uint32_t *address, uint32_t *data)
 Write MMIO function pair. More...
 
DPI void sv2cCosimserverMMIOWriteRespond (char error)
 

Macro Definition Documentation

◆ DPI

#define DPI   extern "C"

Definition at line 23 of file dpi.h.

Function Documentation

◆ sv2cCosimserverEpRegister()

DPI int sv2cCosimserverEpRegister ( char *  endpointId,
char *  fromHostTypeId,
int  fromHostTypeSize,
char *  toHostTypeId,
int  toHostTypeSize 
)

Register an endpoint.

Definition at line 106 of file DpiEntryPoints.cpp.

References esi::cosim::RpcServer::registerEndpoint(), server, and sv2cCosimserverInit().

◆ sv2cCosimserverEpTryGet()

DPI int sv2cCosimserverEpTryGet ( char *  endpointId,
const svOpenArrayHandle  data,
unsigned int *  sizeBytes 
)

◆ sv2cCosimserverEpTryPut()

DPI int sv2cCosimserverEpTryPut ( char *  endpointId,
const svOpenArrayHandle  data,
int  dataLimit 
)

◆ sv2cCosimserverFinish()

DPI void sv2cCosimserverFinish ( )

Shutdown the RPC server.

Definition at line 231 of file DpiEntryPoints.cpp.

References logFile, server, serverMutex, and esi::cosim::CapnpCosimThread::stop().

◆ sv2cCosimserverInit()

DPI int sv2cCosimserverInit ( )

Start the server.

Not required as the first endpoint registration will do this. Provided if one wants to start the server early.

Definition at line 245 of file DpiEntryPoints.cpp.

References findPort(), logFile, esi::cosim::RpcServer::run(), server, and serverMutex.

Referenced by sv2cCosimserverEpRegister(), sv2cCosimserverMMIORegister(), and sv2cCosimserverSetManifest().

◆ sv2cCosimserverMMIOReadRespond()

DPI void sv2cCosimserverMMIOReadRespond ( uint32_t  data,
char  error 
)

◆ sv2cCosimserverMMIOReadTryGet()

DPI int sv2cCosimserverMMIOReadTryGet ( uint32_t *  address)

Read MMIO function pair.

Assumes that reads come back in the order in which they were requested.

Definition at line 301 of file DpiEntryPoints.cpp.

References assert(), esi::cosim::CapnpCosimThread::getLowLevel(), esi::cosim::TSQueue< T >::pop(), esi::cosim::LowLevel::readReqs, esi::cosim::LowLevel::readsOutstanding, and server.

◆ sv2cCosimserverMMIORegister()

DPI int sv2cCosimserverMMIORegister ( )

Register an MMIO module. Just checks that there is only one instantiated.

Definition at line 291 of file DpiEntryPoints.cpp.

References mmioRegistered, and sv2cCosimserverInit().

◆ sv2cCosimserverMMIOWriteRespond()

DPI void sv2cCosimserverMMIOWriteRespond ( char  error)

◆ sv2cCosimserverMMIOWriteTryGet()

DPI int sv2cCosimserverMMIOWriteTryGet ( uint32_t *  address,
uint32_t *  data 
)

Write MMIO function pair.

Assumes that write errors come back in the order in which the writes were issued.

Definition at line 335 of file DpiEntryPoints.cpp.

References assert(), esi::cosim::CapnpCosimThread::getLowLevel(), esi::cosim::TSQueue< T >::pop(), server, esi::cosim::LowLevel::writeReqs, and esi::cosim::LowLevel::writesOutstanding.

◆ sv2cCosimserverSetManifest()

DPI void sv2cCosimserverSetManifest ( unsigned int  esiVersion,
const svOpenArrayHandle  compressedManifest 
)

Set the system zlib-compressed manifest.

Definition at line 266 of file DpiEntryPoints.cpp.

References server, esi::cosim::RpcServer::setManifest(), sv2cCosimserverInit(), svGetArrElemPtr1(), svSizeOfArray(), and validateSvOpenArray().