24 lines
855 B
C
24 lines
855 B
C
#ifndef ZYNQ_LA_STREAM_H
|
|
#define ZYNQ_LA_STREAM_H
|
|
#include <stdint.h>
|
|
|
|
#define ZLS_MAGIC UINT32_C(0x31534c5a)
|
|
#define ZLS_PORT 37574
|
|
#define ZLS_CLOCK_HZ UINT32_C(100000000)
|
|
#define ZLS_BLOCK UINT32_C(16384)
|
|
#define ZLS_SLOTS UINT32_C(512)
|
|
#define ZLS_DDR_BASE UINT32_C(0x3e000000)
|
|
#define ZLS_REG_BASE UINT32_C(0x43c40000)
|
|
|
|
/* Little endian. Request: magic, version, divider, reserved.
|
|
* Header: magic, version, error, clock, divider, block bytes, channels, flags.
|
|
* Then frames: sequence, length, error, followed by length sample bytes.
|
|
* A zero length denotes a terminal error. Sequence starts at zero.
|
|
*/
|
|
enum zls_reg {
|
|
ZLS_ID=0, ZLS_STATUS=4, ZLS_CLOCK=8, ZLS_BLOCK_SIZE=12,
|
|
ZLS_DIVIDER=16, ZLS_COMMAND=20, ZLS_PRODUCED=24, ZLS_CONSUMED=28
|
|
};
|
|
enum zls_error { ZLS_BAD_REQUEST=1, ZLS_OVERFLOW=2, ZLS_DDR_ERROR=3, ZLS_NOT_READY=4 };
|
|
#endif
|