1 | ///////////////////////////////////////////////////////////////-*-C-*- |
---|
2 | // |
---|
3 | // Copyright (c) 2007 Xilinx, Inc. All rights reserved. |
---|
4 | // |
---|
5 | // Xilinx, Inc. XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION |
---|
6 | // "AS IS" AS A COURTESY TO YOU. BY PROVIDING THIS DESIGN, CODE, OR |
---|
7 | // INFORMATION AS ONE POSSIBLE IMPLEMENTATION OF THIS FEATURE, |
---|
8 | // APPLICATION OR STANDARD, XILINX IS MAKING NO REPRESENTATION THAT |
---|
9 | // THIS IMPLEMENTATION IS FREE FROM ANY CLAIMS OF INFRINGEMENT, AND |
---|
10 | // YOU ARE RESPONSIBLE FOR OBTAINING ANY RIGHTS YOU MAY REQUIRE FOR |
---|
11 | // YOUR IMPLEMENTATION. XILINX EXPRESSLY DISCLAIMS ANY WARRANTY |
---|
12 | // WHATSOEVER WITH RESPECT TO THE ADEQUACY OF THE IMPLEMENTATION, |
---|
13 | // INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OR REPRESENTATIONS THAT |
---|
14 | // THIS IMPLEMENTATION IS FREE FROM CLAIMS OF INFRINGEMENT, IMPLIED |
---|
15 | // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
---|
16 | // |
---|
17 | ////////////////////////////////////////////////////////////////////// |
---|
18 | |
---|
19 | #ifndef __XL_WARP_TIMER_PLBW_H__ |
---|
20 | #define __XL_WARP_TIMER_PLBW_H__ |
---|
21 | |
---|
22 | #include "xbasic_types.h" |
---|
23 | #include "xstatus.h" |
---|
24 | #include "xcope.h" |
---|
25 | |
---|
26 | typedef struct { |
---|
27 | uint32_t version; |
---|
28 | // Pointers to low-level functions |
---|
29 | xc_status_t (*xc_create)(xc_iface_t **, void *); |
---|
30 | xc_status_t (*xc_release)(xc_iface_t **); |
---|
31 | xc_status_t (*xc_open)(xc_iface_t *); |
---|
32 | xc_status_t (*xc_close)(xc_iface_t *); |
---|
33 | xc_status_t (*xc_read)(xc_iface_t *, xc_r_addr_t, uint32_t *); |
---|
34 | xc_status_t (*xc_write)(xc_iface_t *, xc_w_addr_t, const uint32_t); |
---|
35 | xc_status_t (*xc_get_shmem)(xc_iface_t *, const char *, void **shmem); |
---|
36 | // Optional parameters |
---|
37 | // (empty) |
---|
38 | // Memory map information |
---|
39 | uint32_t timer0_timeLeft; |
---|
40 | uint32_t timer0_timeLeft_n_bits; |
---|
41 | uint32_t timer0_timeLeft_bin_pt; |
---|
42 | // uint32_t timer0_timeLeft_attr; |
---|
43 | uint32_t timer1_timeLeft; |
---|
44 | uint32_t timer1_timeLeft_n_bits; |
---|
45 | uint32_t timer1_timeLeft_bin_pt; |
---|
46 | // uint32_t timer1_timeLeft_attr; |
---|
47 | uint32_t timer2_timeLeft; |
---|
48 | uint32_t timer2_timeLeft_n_bits; |
---|
49 | uint32_t timer2_timeLeft_bin_pt; |
---|
50 | // uint32_t timer2_timeLeft_attr; |
---|
51 | uint32_t timer3_timeLeft; |
---|
52 | uint32_t timer3_timeLeft_n_bits; |
---|
53 | uint32_t timer3_timeLeft_bin_pt; |
---|
54 | // uint32_t timer3_timeLeft_attr; |
---|
55 | uint32_t timer_control_r; |
---|
56 | uint32_t timer_control_r_n_bits; |
---|
57 | uint32_t timer_control_r_bin_pt; |
---|
58 | // uint32_t timer_control_r_attr; |
---|
59 | uint32_t timer_status; |
---|
60 | uint32_t timer_status_n_bits; |
---|
61 | uint32_t timer_status_bin_pt; |
---|
62 | // uint32_t timer_status_attr; |
---|
63 | uint32_t timer0_countTo; |
---|
64 | uint32_t timer0_countTo_n_bits; |
---|
65 | uint32_t timer0_countTo_bin_pt; |
---|
66 | // uint32_t timer0_countTo_attr; |
---|
67 | uint32_t timer1_countTo; |
---|
68 | uint32_t timer1_countTo_n_bits; |
---|
69 | uint32_t timer1_countTo_bin_pt; |
---|
70 | // uint32_t timer1_countTo_attr; |
---|
71 | uint32_t timer2_countTo; |
---|
72 | uint32_t timer2_countTo_n_bits; |
---|
73 | uint32_t timer2_countTo_bin_pt; |
---|
74 | // uint32_t timer2_countTo_attr; |
---|
75 | uint32_t timer3_countTo; |
---|
76 | uint32_t timer3_countTo_n_bits; |
---|
77 | uint32_t timer3_countTo_bin_pt; |
---|
78 | // uint32_t timer3_countTo_attr; |
---|
79 | uint32_t timer_control_w; |
---|
80 | uint32_t timer_control_w_n_bits; |
---|
81 | uint32_t timer_control_w_bin_pt; |
---|
82 | // uint32_t timer_control_w_attr; |
---|
83 | // XPS parameters |
---|
84 | Xuint16 DeviceId; |
---|
85 | uint32_t BaseAddr; |
---|
86 | } WARP_TIMER_PLBW_Config; |
---|
87 | |
---|
88 | extern WARP_TIMER_PLBW_Config WARP_TIMER_PLBW_ConfigTable[]; |
---|
89 | |
---|
90 | // forward declaration of low-level functions |
---|
91 | xc_status_t xc_warp_timer_plbw_create(xc_iface_t **iface, void *config_table); |
---|
92 | xc_status_t xc_warp_timer_plbw_release(xc_iface_t **iface) ; |
---|
93 | xc_status_t xc_warp_timer_plbw_open(xc_iface_t *iface); |
---|
94 | xc_status_t xc_warp_timer_plbw_close(xc_iface_t *iface); |
---|
95 | xc_status_t xc_warp_timer_plbw_read(xc_iface_t *iface, xc_r_addr_t addr, uint32_t *value); |
---|
96 | xc_status_t xc_warp_timer_plbw_write(xc_iface_t *iface, xc_w_addr_t addr, const uint32_t value); |
---|
97 | xc_status_t xc_warp_timer_plbw_getshmem(xc_iface_t *iface, const char *name, void **shmem); |
---|
98 | |
---|
99 | #endif |
---|
100 | |
---|