2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-05 09:46:36 +08:00
artiq/soc/runtime/dds.h

28 lines
643 B
C

#ifndef __DDS_H
#define __DDS_H
#include <hw/common.h>
#include <generated/mem.h>
#define DDS_READ(addr) \
MMPTR(DDS_BASE + (addr)*4)
#define DDS_WRITE(addr, data) \
MMPTR(DDS_BASE + (addr)*4) = data
#define DDS_FTW0 0x0a
#define DDS_FTW1 0x0b
#define DDS_FTW2 0x0c
#define DDS_FTW3 0x0d
#define DDS_POW0 0x0e
#define DDS_POW1 0x0f
#define DDS_GPIO 0x41
void dds_init(void);
void dds_phase_clear_en(int channel, int phase_clear_en);
void dds_program(long long int timestamp, int channel,
unsigned int ftw, unsigned int pow, unsigned int sysclk_per_microcycle,
int rt_fud, int phase_tracking);
#endif /* __DDS_H */