Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef VNA_CONFIG_H
#define VNA_CONFIG_H
/****************** Include Files ********************/
#include "xil_types.h"
#include "xstatus.h"
#define VNA_CONFIG_VNA_Config_AXI_SLV_REG0_OFFSET 0
#define VNA_CONFIG_VNA_Config_AXI_SLV_REG1_OFFSET 4
#define VNA_CONFIG_VNA_Config_AXI_SLV_REG2_OFFSET 8
#define VNA_CONFIG_VNA_Config_AXI_SLV_REG3_OFFSET 12
/**************************** Type Definitions *****************************/
/**
*
* Write a value to a VNA_CONFIG register. A 32 bit write is performed.
* If the component is implemented in a smaller width, only the least
* significant data is written.
*
* @param BaseAddress is the base address of the VNA_CONFIGdevice.
* @param RegOffset is the register offset from the base to write to.
* @param Data is the data written to the register.
*
* @return None.
*
* @note
* C-style signature:
* void VNA_CONFIG_mWriteReg(u32 BaseAddress, unsigned RegOffset, u32 Data)
*
*/
#define VNA_CONFIG_mWriteReg(BaseAddress, RegOffset, Data) \
Xil_Out32((BaseAddress) + (RegOffset), (u32)(Data))
/**
*
* Read a value from a VNA_CONFIG register. A 32 bit read is performed.
* If the component is implemented in a smaller width, only the least
* significant data is read from the register. The most significant data
* will be read as 0.
*
* @param BaseAddress is the base address of the VNA_CONFIG device.
* @param RegOffset is the register offset from the base to write to.
*
* @return Data is the data from the register.
*
* @note
* C-style signature:
* u32 VNA_CONFIG_mReadReg(u32 BaseAddress, unsigned RegOffset)
*
*/
#define VNA_CONFIG_mReadReg(BaseAddress, RegOffset) \
Xil_In32((BaseAddress) + (RegOffset))
/************************** Function Prototypes ****************************/
/**
*
* Run a self-test on the driver/device. Note this may be a destructive test if
* resets of the device are performed.
*
* If the hardware system is not built correctly, this function may never
* return to the caller.
*
* @param baseaddr_p is the base address of the VNA_CONFIG instance to be worked on.
*
* @return
*
* - XST_SUCCESS if all self-test code passed
* - XST_FAILURE if any self-test code failed
*
* @note Caching must be turned off for this function to work.
* @note Self test may fail if data memory and device are not on the same bus.
*
*/
XStatus VNA_CONFIG_Reg_SelfTest(void * baseaddr_p);
#endif // VNA_CONFIG_H