virtex2.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * (C) Copyright 2002
  3. * Rich Ireland, Enterasys Networks, rireland@enterasys.com.
  4. * Keith Outwater, keith_outwater@mvis.com
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. *
  24. */
  25. #ifndef _VIRTEX2_H_
  26. #define _VIRTEX2_H_
  27. #include <xilinx.h>
  28. extern int Virtex2_load( Xilinx_desc *desc, void *image, size_t size );
  29. extern int Virtex2_dump( Xilinx_desc *desc, void *buf, size_t bsize );
  30. extern int Virtex2_info( Xilinx_desc *desc );
  31. /*
  32. * Slave SelectMap Implementation function table.
  33. */
  34. typedef struct {
  35. Xilinx_pre_fn pre;
  36. Xilinx_pgm_fn pgm;
  37. Xilinx_init_fn init;
  38. Xilinx_err_fn err;
  39. Xilinx_done_fn done;
  40. Xilinx_clk_fn clk;
  41. Xilinx_cs_fn cs;
  42. Xilinx_wr_fn wr;
  43. Xilinx_rdata_fn rdata;
  44. Xilinx_wdata_fn wdata;
  45. Xilinx_busy_fn busy;
  46. Xilinx_abort_fn abort;
  47. Xilinx_post_fn post;
  48. } Xilinx_Virtex2_Slave_SelectMap_fns;
  49. /* Slave Serial Implementation function table */
  50. typedef struct {
  51. Xilinx_pgm_fn pgm;
  52. Xilinx_clk_fn clk;
  53. Xilinx_rdata_fn rdata;
  54. Xilinx_wdata_fn wdata;
  55. } Xilinx_Virtex2_Slave_Serial_fns;
  56. /* Device Image Sizes (in bytes)
  57. *********************************************************************/
  58. #define XILINX_XC2V40_SIZE (338208 / 8)
  59. #define XILINX_XC2V80_SIZE (597408 / 8)
  60. #define XILINX_XC2V250_SIZE (1591584 / 8)
  61. #define XILINX_XC2V500_SIZE (2557857 / 8)
  62. #define XILINX_XC2V1000_SIZE (3749408 / 8)
  63. #define XILINX_XC2V1500_SIZE (5166240 / 8)
  64. #define XILINX_XC2V2000_SIZE (6808352 / 8)
  65. #define XILINX_XC2V3000_SIZE (9589408 / 8)
  66. #define XILINX_XC2V4000_SIZE (14220192 / 8)
  67. #define XILINX_XC2V6000_SIZE (19752096 / 8)
  68. #define XILINX_XC2V8000_SIZE (26185120 / 8)
  69. #define XILINX_XC2V10000_SIZE (33519264 / 8)
  70. /* Descriptor Macros
  71. *********************************************************************/
  72. #define XILINX_XC2V40_DESC(iface, fn_table, cookie) \
  73. { Xilinx_Virtex2, iface, XILINX_XC2V40_SIZE, fn_table, cookie }
  74. #define XILINX_XC2V80_DESC(iface, fn_table, cookie) \
  75. { Xilinx_Virtex2, iface, XILINX_XC2V80_SIZE, fn_table, cookie }
  76. #define XILINX_XC2V250_DESC(iface, fn_table, cookie) \
  77. { Xilinx_Virtex2, iface, XILINX_XC2V250_SIZE, fn_table, cookie }
  78. #define XILINX_XC2V500_DESC(iface, fn_table, cookie) \
  79. { Xilinx_Virtex2, iface, XILINX_XC2V500_SIZE, fn_table, cookie }
  80. #define XILINX_XC2V1000_DESC(iface, fn_table, cookie) \
  81. { Xilinx_Virtex2, iface, XILINX_XC2V1000_SIZE, fn_table, cookie }
  82. #define XILINX_XC2V1500_DESC(iface, fn_table, cookie) \
  83. { Xilinx_Virtex2, iface, XILINX_XC2V1500_SIZE, fn_table, cookie }
  84. #define XILINX_XC2V2000_DESC(iface, fn_table, cookie) \
  85. { Xilinx_Virtex2, iface, XILINX_XC2V2000_SIZE, fn_table, cookie }
  86. #define XILINX_XC2V3000_DESC(iface, fn_table, cookie) \
  87. { Xilinx_Virtex2, iface, XILINX_XC2V3000_SIZE, fn_table, cookie }
  88. #define XILINX_XC2V4000_DESC(iface, fn_table, cookie) \
  89. { Xilinx_Virtex2, iface, XILINX_XC2V4000_SIZE, fn_table, cookie }
  90. #define XILINX_XC2V6000_DESC(iface, fn_table, cookie) \
  91. { Xilinx_Virtex2, iface, XILINX_XC2V6000_SIZE, fn_table, cookie }
  92. #define XILINX_XC2V8000_DESC(iface, fn_table, cookie) \
  93. { Xilinx_Virtex2, iface, XILINX_XC2V8000_SIZE, fn_table, cookie }
  94. #define XILINX_XC2V10000_DESC(iface, fn_table, cookie) \
  95. { Xilinx_Virtex2, iface, XILINX_XC2V10000_SIZE, fn_table, cookie }
  96. #endif /* _VIRTEX2_H_ */