Adding burst functionality with first/last byte enables, and byte oriented burst transfers.

This commit is contained in:
Simon Southwell 2024-04-28 15:20:52 +01:00
commit 751a3e6ec9
12 changed files with 174 additions and 34 deletions

View file

@ -28,6 +28,7 @@ static wfunc_p Vwrite;
static wbefunc_p VwriteBE;
static rfunc_p Vread;
static wbfunc_p VburstWrite;
static wbbefunc_p VburstWriteBE;
static rbfunc_p VburstRead;
static tkfunc_p Vtick;
static regirqfunc_p VregIrqPy;
@ -75,6 +76,12 @@ static int BindToApiFuncs(void)
fprintf(stderr, "***ERROR: failed to find symbol VBurstWrite\n");
return 1;
}
if ((VburstWriteBE = (wbbefunc_p)dlsym(hdl, "VBurstWriteBE")) == NULL)
{
fprintf(stderr, "***ERROR: failed to find symbol VBurstWriteBE\n");
return 1;
}
if ((VburstRead = (rbfunc_p)dlsym(hdl, "VBurstRead")) == NULL)
{
@ -254,6 +261,15 @@ uint32_t PyBurstWrite (const uint32_t addr, void *data, const uint32_t len, cons
return VburstWrite(addr, data, len, node);
}
// ------------------------------------------------------------
// VBurstWriteBE wrapper function for Python
// ------------------------------------------------------------
uint32_t PyBurstWriteBE (const uint32_t addr, void *data, const uint32_t len, uint32_t fbe, uint32_t lbe, const uint32_t node)
{
return VburstWrite(addr, data, len, node);
}
// ------------------------------------------------------------
// VBurstRead wrapper function for Python
// ------------------------------------------------------------

View file

@ -36,6 +36,7 @@ typedef int (*wfunc_p) (const unsigned, const unsigned, const int, con
typedef int (*wbefunc_p) (const unsigned, const unsigned, const unsigned, const int, const unsigned);
typedef int (*rfunc_p) (const unsigned, unsigned *, const int, const unsigned);
typedef int (*wbfunc_p) (const unsigned, void *, const unsigned, const unsigned);
typedef int (*wbbefunc_p) (const unsigned, void *, const unsigned, const unsigned, const unsigned, const unsigned);
typedef int (*rbfunc_p) (const unsigned, void *, const unsigned, const unsigned);
typedef int (*tkfunc_p) (const unsigned, const unsigned );
typedef void (*regirqfunc_p) (const pPyIrqCB_t, const unsigned);
@ -49,6 +50,7 @@ uint32_t PyWriteBE (const uint32_t addr, const uint32_t data, const uint3
uint32_t PyRead (const uint32_t addr, const int delta, const uint32_t node);
uint32_t PyTick (const uint32_t ticks, const uint32_t node);
uint32_t PyBurstWrite (const uint32_t addr, void *data, const uint32_t len, const uint32_t node);
uint32_t PyBurstWriteBE (const uint32_t addr, void *data, const uint32_t len, const uint32_t fbe, const uint32_t lbe, const uint32_t node);
uint32_t PyBurstRead (const uint32_t addr, void *data, const uint32_t len, const uint32_t node);
uint32_t PyRegIrq (const pPyIrqCB_t func, const uint32_t node);