Go to the documentation of this file.
39 #ifndef CLK_AXI_CLKGEN_H_
40 #define CLK_AXI_CLKGEN_H_
uint32_t parent_rate
Definition: clk_axi_clkgen.h:53
const char * name
Definition: clk_axi_clkgen.h:57
const char * name
Definition: clk_axi_clkgen.h:51
uint32_t timeout
Definition: ad413x.c:55
@ AXI_FPGA_TECH_UNKNOWN
Definition: clk_axi_clkgen.c:131
@ AXI_FPGA_SPEED_2L
Definition: clk_axi_clkgen.c:153
@ AXI_FPGA_SPEED_3
Definition: clk_axi_clkgen.c:155
#define AXI_CLKGEN_REG_STATUS
Definition: clk_axi_clkgen.c:80
#define AXI_CLKGEN_REG_DRP_STATUS
Definition: clk_axi_clkgen.c:87
@ AXI_FPGA_SPEED_1H
Definition: clk_axi_clkgen.c:149
Driver for the Analog Devices AXI CLKGEN.
@ AXI_FPGA_FAMILY_KINTEX
Definition: clk_axi_clkgen.c:140
Header file of Delay functions.
@ AXI_FPGA_SPEED_UNKNOWN
Definition: clk_axi_clkgen.c:146
#define no_os_max(x, y)
Definition: no_os_util.h:68
#define MMCM_REG_CLKOUT0_1
Definition: clk_axi_clkgen.c:90
Definition: clk_axi_clkgen.h:56
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:419
axi_fgpa_technology
Enum for technology/generation of the FPGA device.
Definition: clk_axi_clkgen.c:130
#define MMCM_REG_LOCK2
Definition: clk_axi_clkgen.c:98
uint32_t base
Definition: clk_axi_clkgen.h:52
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:525
Definition: clk_axi_clkgen.h:50
@ AXI_FPGA_TECH_ULTRASCALE
Definition: clk_axi_clkgen.c:133
#define MMCM_REG_CLK_FB1
Definition: clk_axi_clkgen.c:94
@ AXI_FPGA_FAMILY_VIRTEX
Definition: clk_axi_clkgen.c:141
int32_t axi_clkgen_get_rate(struct axi_clkgen *clkgen, uint32_t *rate)
axi_clkgen_get_rate
Definition: clk_axi_clkgen.c:493
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:546
@ AXI_FPGA_SPEED_2
Definition: clk_axi_clkgen.c:152
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:132
#define no_os_min(x, y)
Definition: no_os_util.h:63
#define AXI_REG_FPGA_INFO
Definition: clk_axi_clkgen.c:67
#define MMCM_REG_CLKOUT1_2
Definition: clk_axi_clkgen.c:93
@ AXI_FPGA_FAMILY_ARTIX
Definition: clk_axi_clkgen.c:139
@ AXI_FPGA_FAMILY_UNKNOWN
Definition: clk_axi_clkgen.c:138
@ AXI_FPGA_FAMILY_ZYNQ
Definition: clk_axi_clkgen.c:142
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:56
@ AXI_FPGA_SPEED_1HV
Definition: clk_axi_clkgen.c:150
#define MMCM_REG_CLK_FB2
Definition: clk_axi_clkgen.c:95
void axi_clkgen_calc_params(struct axi_clkgen *axi_clkgen, uint32_t fin, uint32_t fout, uint32_t *best_d, uint32_t *best_m, uint32_t *best_dout)
axi_clkgen_calc_params
Definition: clk_axi_clkgen.c:319
#define MMCM_REG_CLKOUT1_1
Definition: clk_axi_clkgen.c:92
#define AXI_CLKGEN_REG_RESETN
Definition: clk_axi_clkgen.c:76
int32_t axi_clkgen_get_rate(struct axi_clkgen *clkgen, uint32_t *rate)
axi_clkgen_get_rate
Definition: clk_axi_clkgen.c:493
#define AXI_CLKGEN_RESETN
Definition: clk_axi_clkgen.c:78
uint32_t base
Definition: clk_axi_clkgen.h:58
@ AXI_FPGA_SPEED_1
Definition: clk_axi_clkgen.c:147
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:525
#define MMCM_REG_FILTER1
Definition: clk_axi_clkgen.c:100
uint32_t parent_rate
Definition: clk_axi_clkgen.h:59
#define AXI_CLKGEN_REG_DRP_CNTRL
Definition: clk_axi_clkgen.c:83
#define AXI_CLKGEN_DRP_CNTRL_READ
Definition: clk_axi_clkgen.c:85
#define AXI_REG_VERSION
Definition: clk_axi_clkgen.c:62
@ AXI_FPGA_SPEED_2LV
Definition: clk_axi_clkgen.c:154
#define MMCM_REG_CLKOUT0_2
Definition: clk_axi_clkgen.c:91
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:59
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:73
int32_t axi_clkgen_read(struct axi_clkgen *clkgen, uint32_t reg_addr, uint32_t *reg_val)
axi_clkgen_read
Definition: clk_axi_clkgen.c:173
#define MMCM_REG_CLK_DIV
Definition: clk_axi_clkgen.c:96
#define AXI_REG_FPGA_VOLTAGE
Definition: clk_axi_clkgen.c:68
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
void axi_clkgen_mmcm_write(struct axi_clkgen *clkgen, uint32_t reg, uint32_t val, uint32_t mask)
axi_clkgen_mmcm_write
Definition: clk_axi_clkgen.c:218
#define MMCM_REG_LOCK3
Definition: clk_axi_clkgen.c:99
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:75
void axi_clkgen_calc_clk_params(uint32_t divider, uint32_t *low, uint32_t *high, uint32_t *edge, uint32_t *nocount)
axi_clkgen_calc_clk_params
Definition: clk_axi_clkgen.c:387
#define MMCM_REG_FILTER2
Definition: clk_axi_clkgen.c:101
@ AXI_FPGA_TECH_SERIES7
Definition: clk_axi_clkgen.c:132
#define AXI_CLKGEN_DRP_STATUS_BUSY
Definition: clk_axi_clkgen.c:88
#define AXI_PCORE_VER_MAJOR(version)
Definition: clk_axi_clkgen.c:58
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:419
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:73
#define AXI_CLKGEN_MMCM_RESETN
Definition: clk_axi_clkgen.c:77
#define AXI_INFO_FPGA_TECH(info)
Definition: clk_axi_clkgen.c:70
axi_fpga_speed_grade
Enum for FPGA's speed-grade.
Definition: clk_axi_clkgen.c:145
#define AXI_CLKGEN_STATUS
Definition: clk_axi_clkgen.c:81
#define AXI_CLKGEN_DRP_CNTRL_SEL
Definition: clk_axi_clkgen.c:84
@ AXI_FPGA_TECH_ULTRASCALE_PLUS
Definition: clk_axi_clkgen.c:134
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:546
Header file of utility functions.
#define MMCM_REG_LOCK1
Definition: clk_axi_clkgen.c:97
int32_t axi_clkgen_write(struct axi_clkgen *clkgen, uint32_t reg_addr, uint32_t reg_val)
axi_clkgen_write
Definition: clk_axi_clkgen.c:161
axi_fpga_family
Enum for family variant of the FPGA device.
Definition: clk_axi_clkgen.c:137
@ AXI_FPGA_SPEED_1L
Definition: clk_axi_clkgen.c:148
#define AXI_INFO_FPGA_FAMILY(info)
Definition: clk_axi_clkgen.c:71
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:58
@ AXI_FPGA_SPEED_1LV
Definition: clk_axi_clkgen.c:151
#define AXI_INFO_FPGA_VOLTAGE(val)
Definition: clk_axi_clkgen.c:74
#define AXI_INFO_FPGA_SPEED_GRADE(info)
Definition: clk_axi_clkgen.c:72