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#ifndef _VIRTEX2_H_
27#define _VIRTEX2_H_
28
29#include <xilinx.h>
30
31extern int Virtex2_load(Xilinx_desc *desc, const void *image, size_t size);
32extern int Virtex2_dump(Xilinx_desc *desc, const void *buf, size_t bsize);
33extern int Virtex2_info(Xilinx_desc *desc);
34
35
36
37
38typedef struct {
39 Xilinx_pre_fn pre;
40 Xilinx_pgm_fn pgm;
41 Xilinx_init_fn init;
42 Xilinx_err_fn err;
43 Xilinx_done_fn done;
44 Xilinx_clk_fn clk;
45 Xilinx_cs_fn cs;
46 Xilinx_wr_fn wr;
47 Xilinx_rdata_fn rdata;
48 Xilinx_wdata_fn wdata;
49 Xilinx_busy_fn busy;
50 Xilinx_abort_fn abort;
51 Xilinx_post_fn post;
52} Xilinx_Virtex2_Slave_SelectMap_fns;
53
54
55typedef struct {
56 Xilinx_pgm_fn pgm;
57 Xilinx_clk_fn clk;
58 Xilinx_rdata_fn rdata;
59 Xilinx_wdata_fn wdata;
60} Xilinx_Virtex2_Slave_Serial_fns;
61
62
63
64#define XILINX_XC2V40_SIZE (338208 / 8)
65#define XILINX_XC2V80_SIZE (597408 / 8)
66#define XILINX_XC2V250_SIZE (1591584 / 8)
67#define XILINX_XC2V500_SIZE (2557857 / 8)
68#define XILINX_XC2V1000_SIZE (3749408 / 8)
69#define XILINX_XC2V1500_SIZE (5166240 / 8)
70#define XILINX_XC2V2000_SIZE (6808352 / 8)
71#define XILINX_XC2V3000_SIZE (9589408 / 8)
72#define XILINX_XC2V4000_SIZE (14220192 / 8)
73#define XILINX_XC2V6000_SIZE (19752096 / 8)
74#define XILINX_XC2V8000_SIZE (26185120 / 8)
75#define XILINX_XC2V10000_SIZE (33519264 / 8)
76
77
78
79#define XILINX_XC2V40_DESC(iface, fn_table, cookie) \
80{ Xilinx_Virtex2, iface, XILINX_XC2V40_SIZE, fn_table, cookie }
81
82#define XILINX_XC2V80_DESC(iface, fn_table, cookie) \
83{ Xilinx_Virtex2, iface, XILINX_XC2V80_SIZE, fn_table, cookie }
84
85#define XILINX_XC2V250_DESC(iface, fn_table, cookie) \
86{ Xilinx_Virtex2, iface, XILINX_XC2V250_SIZE, fn_table, cookie }
87
88#define XILINX_XC2V500_DESC(iface, fn_table, cookie) \
89{ Xilinx_Virtex2, iface, XILINX_XC2V500_SIZE, fn_table, cookie }
90
91#define XILINX_XC2V1000_DESC(iface, fn_table, cookie) \
92{ Xilinx_Virtex2, iface, XILINX_XC2V1000_SIZE, fn_table, cookie }
93
94#define XILINX_XC2V1500_DESC(iface, fn_table, cookie) \
95{ Xilinx_Virtex2, iface, XILINX_XC2V1500_SIZE, fn_table, cookie }
96
97#define XILINX_XC2V2000_DESC(iface, fn_table, cookie) \
98{ Xilinx_Virtex2, iface, XILINX_XC2V2000_SIZE, fn_table, cookie }
99
100#define XILINX_XC2V3000_DESC(iface, fn_table, cookie) \
101{ Xilinx_Virtex2, iface, XILINX_XC2V3000_SIZE, fn_table, cookie }
102
103#define XILINX_XC2V4000_DESC(iface, fn_table, cookie) \
104{ Xilinx_Virtex2, iface, XILINX_XC2V4000_SIZE, fn_table, cookie }
105
106#define XILINX_XC2V6000_DESC(iface, fn_table, cookie) \
107{ Xilinx_Virtex2, iface, XILINX_XC2V6000_SIZE, fn_table, cookie }
108
109#define XILINX_XC2V8000_DESC(iface, fn_table, cookie) \
110{ Xilinx_Virtex2, iface, XILINX_XC2V8000_SIZE, fn_table, cookie }
111
112#define XILINX_XC2V10000_DESC(iface, fn_table, cookie) \
113{ Xilinx_Virtex2, iface, XILINX_XC2V10000_SIZE, fn_table, cookie }
114
115#endif
116