Go to the documentation of this file.
33 #ifndef CLK_AXI_CLKGEN_H_
34 #define CLK_AXI_CLKGEN_H_
uint32_t parent_rate
Definition: clk_axi_clkgen.h:47
const char * name
Definition: clk_axi_clkgen.h:51
const char * name
Definition: clk_axi_clkgen.h:45
uint32_t timeout
Definition: ad413x.c:49
@ AXI_FPGA_TECH_UNKNOWN
Definition: clk_axi_clkgen.c:126
@ AXI_FPGA_SPEED_2L
Definition: clk_axi_clkgen.c:148
@ AXI_FPGA_SPEED_3
Definition: clk_axi_clkgen.c:150
#define AXI_CLKGEN_REG_STATUS
Definition: clk_axi_clkgen.c:75
#define AXI_CLKGEN_REG_DRP_STATUS
Definition: clk_axi_clkgen.c:82
@ AXI_FPGA_SPEED_1H
Definition: clk_axi_clkgen.c:144
Driver for the Analog Devices AXI CLKGEN.
@ AXI_FPGA_FAMILY_KINTEX
Definition: clk_axi_clkgen.c:135
Header file of Delay functions.
@ AXI_FPGA_SPEED_UNKNOWN
Definition: clk_axi_clkgen.c:141
#define no_os_max(x, y)
Definition: no_os_util.h:64
#define MMCM_REG_CLKOUT0_1
Definition: clk_axi_clkgen.c:85
Definition: clk_axi_clkgen.h:50
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:414
axi_fgpa_technology
Enum for technology/generation of the FPGA device.
Definition: clk_axi_clkgen.c:125
#define MMCM_REG_LOCK2
Definition: clk_axi_clkgen.c:93
uint32_t base
Definition: clk_axi_clkgen.h:46
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:520
Definition: clk_axi_clkgen.h:44
@ AXI_FPGA_TECH_ULTRASCALE
Definition: clk_axi_clkgen.c:128
#define MMCM_REG_CLK_FB1
Definition: clk_axi_clkgen.c:89
@ AXI_FPGA_FAMILY_VIRTEX
Definition: clk_axi_clkgen.c:136
int32_t axi_clkgen_get_rate(struct axi_clkgen *clkgen, uint32_t *rate)
axi_clkgen_get_rate
Definition: clk_axi_clkgen.c:488
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:541
@ AXI_FPGA_SPEED_2
Definition: clk_axi_clkgen.c:147
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
#define no_os_min(x, y)
Definition: no_os_util.h:59
#define AXI_REG_FPGA_INFO
Definition: clk_axi_clkgen.c:62
#define MMCM_REG_CLKOUT1_2
Definition: clk_axi_clkgen.c:88
@ AXI_FPGA_FAMILY_ARTIX
Definition: clk_axi_clkgen.c:134
@ AXI_FPGA_FAMILY_UNKNOWN
Definition: clk_axi_clkgen.c:133
@ AXI_FPGA_FAMILY_ZYNQ
Definition: clk_axi_clkgen.c:137
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
@ AXI_FPGA_SPEED_1HV
Definition: clk_axi_clkgen.c:145
#define MMCM_REG_CLK_FB2
Definition: clk_axi_clkgen.c:90
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:314
#define MMCM_REG_CLKOUT1_1
Definition: clk_axi_clkgen.c:87
#define AXI_CLKGEN_REG_RESETN
Definition: clk_axi_clkgen.c:71
int32_t axi_clkgen_get_rate(struct axi_clkgen *clkgen, uint32_t *rate)
axi_clkgen_get_rate
Definition: clk_axi_clkgen.c:488
#define AXI_CLKGEN_RESETN
Definition: clk_axi_clkgen.c:73
uint32_t base
Definition: clk_axi_clkgen.h:52
@ AXI_FPGA_SPEED_1
Definition: clk_axi_clkgen.c:142
int32_t axi_clkgen_init(struct axi_clkgen **clk, const struct axi_clkgen_init *init)
axi_clkgen_init
Definition: clk_axi_clkgen.c:520
#define MMCM_REG_FILTER1
Definition: clk_axi_clkgen.c:95
uint32_t parent_rate
Definition: clk_axi_clkgen.h:53
#define AXI_CLKGEN_REG_DRP_CNTRL
Definition: clk_axi_clkgen.c:78
#define AXI_CLKGEN_DRP_CNTRL_READ
Definition: clk_axi_clkgen.c:80
#define AXI_REG_VERSION
Definition: clk_axi_clkgen.c:57
@ AXI_FPGA_SPEED_2LV
Definition: clk_axi_clkgen.c:149
#define MMCM_REG_CLKOUT0_2
Definition: clk_axi_clkgen.c:86
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:53
#define no_os_clamp(val, min_val, max_val)
Definition: no_os_util.h:69
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:168
#define MMCM_REG_CLK_DIV
Definition: clk_axi_clkgen.c:91
#define AXI_REG_FPGA_VOLTAGE
Definition: clk_axi_clkgen.c:63
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
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:213
#define MMCM_REG_LOCK3
Definition: clk_axi_clkgen.c:94
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:69
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:382
#define MMCM_REG_FILTER2
Definition: clk_axi_clkgen.c:96
@ AXI_FPGA_TECH_SERIES7
Definition: clk_axi_clkgen.c:127
#define AXI_CLKGEN_DRP_STATUS_BUSY
Definition: clk_axi_clkgen.c:83
#define AXI_PCORE_VER_MAJOR(version)
Definition: clk_axi_clkgen.c:53
int32_t axi_clkgen_set_rate(struct axi_clkgen *clkgen, uint32_t rate)
axi_clkgen_set_rate
Definition: clk_axi_clkgen.c:414
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:67
#define AXI_CLKGEN_MMCM_RESETN
Definition: clk_axi_clkgen.c:72
#define AXI_INFO_FPGA_TECH(info)
Definition: clk_axi_clkgen.c:65
axi_fpga_speed_grade
Enum for FPGA's speed-grade.
Definition: clk_axi_clkgen.c:140
#define AXI_CLKGEN_STATUS
Definition: clk_axi_clkgen.c:76
#define AXI_CLKGEN_DRP_CNTRL_SEL
Definition: clk_axi_clkgen.c:79
@ AXI_FPGA_TECH_ULTRASCALE_PLUS
Definition: clk_axi_clkgen.c:129
int32_t axi_clkgen_remove(struct axi_clkgen *clkgen)
axi_clkgen_remove
Definition: clk_axi_clkgen.c:541
Header file of utility functions.
#define MMCM_REG_LOCK1
Definition: clk_axi_clkgen.c:92
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:156
axi_fpga_family
Enum for family variant of the FPGA device.
Definition: clk_axi_clkgen.c:132
@ AXI_FPGA_SPEED_1L
Definition: clk_axi_clkgen.c:143
#define AXI_INFO_FPGA_FAMILY(info)
Definition: clk_axi_clkgen.c:66
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
@ AXI_FPGA_SPEED_1LV
Definition: clk_axi_clkgen.c:146
#define AXI_INFO_FPGA_VOLTAGE(val)
Definition: clk_axi_clkgen.c:69
#define AXI_INFO_FPGA_SPEED_GRADE(info)
Definition: clk_axi_clkgen.c:67