strcop_defs.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #ifndef __strcop_defs_h
  2. #define __strcop_defs_h
  3. /*
  4. * This file is autogenerated from
  5. * file: ../../inst/strcop/rtl/strcop_regs.r
  6. * id: strcop_regs.r,v 1.5 2003/10/15 12:09:45 kriskn Exp
  7. * last modfied: Mon Apr 11 16:09:38 2005
  8. *
  9. * by /n/asic/design/tools/rdesc/src/rdes2c --outfile strcop_defs.h ../../inst/strcop/rtl/strcop_regs.r
  10. * id: $Id: strcop_defs.h,v 1.7 2005/04/24 18:30:58 starvik Exp $
  11. * Any changes here will be lost.
  12. *
  13. * -*- buffer-read-only: t -*-
  14. */
  15. /* Main access macros */
  16. #ifndef REG_RD
  17. #define REG_RD( scope, inst, reg ) \
  18. REG_READ( reg_##scope##_##reg, \
  19. (inst) + REG_RD_ADDR_##scope##_##reg )
  20. #endif
  21. #ifndef REG_WR
  22. #define REG_WR( scope, inst, reg, val ) \
  23. REG_WRITE( reg_##scope##_##reg, \
  24. (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  25. #endif
  26. #ifndef REG_RD_VECT
  27. #define REG_RD_VECT( scope, inst, reg, index ) \
  28. REG_READ( reg_##scope##_##reg, \
  29. (inst) + REG_RD_ADDR_##scope##_##reg + \
  30. (index) * STRIDE_##scope##_##reg )
  31. #endif
  32. #ifndef REG_WR_VECT
  33. #define REG_WR_VECT( scope, inst, reg, index, val ) \
  34. REG_WRITE( reg_##scope##_##reg, \
  35. (inst) + REG_WR_ADDR_##scope##_##reg + \
  36. (index) * STRIDE_##scope##_##reg, (val) )
  37. #endif
  38. #ifndef REG_RD_INT
  39. #define REG_RD_INT( scope, inst, reg ) \
  40. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
  41. #endif
  42. #ifndef REG_WR_INT
  43. #define REG_WR_INT( scope, inst, reg, val ) \
  44. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
  45. #endif
  46. #ifndef REG_RD_INT_VECT
  47. #define REG_RD_INT_VECT( scope, inst, reg, index ) \
  48. REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
  49. (index) * STRIDE_##scope##_##reg )
  50. #endif
  51. #ifndef REG_WR_INT_VECT
  52. #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
  53. REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
  54. (index) * STRIDE_##scope##_##reg, (val) )
  55. #endif
  56. #ifndef REG_TYPE_CONV
  57. #define REG_TYPE_CONV( type, orgtype, val ) \
  58. ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
  59. #endif
  60. #ifndef reg_page_size
  61. #define reg_page_size 8192
  62. #endif
  63. #ifndef REG_ADDR
  64. #define REG_ADDR( scope, inst, reg ) \
  65. ( (inst) + REG_RD_ADDR_##scope##_##reg )
  66. #endif
  67. #ifndef REG_ADDR_VECT
  68. #define REG_ADDR_VECT( scope, inst, reg, index ) \
  69. ( (inst) + REG_RD_ADDR_##scope##_##reg + \
  70. (index) * STRIDE_##scope##_##reg )
  71. #endif
  72. /* C-code for register scope strcop */
  73. /* Register rw_cfg, scope strcop, type rw */
  74. typedef struct {
  75. unsigned int td3 : 1;
  76. unsigned int td2 : 1;
  77. unsigned int td1 : 1;
  78. unsigned int ipend : 1;
  79. unsigned int ignore_sync : 1;
  80. unsigned int en : 1;
  81. unsigned int dummy1 : 26;
  82. } reg_strcop_rw_cfg;
  83. #define REG_RD_ADDR_strcop_rw_cfg 0
  84. #define REG_WR_ADDR_strcop_rw_cfg 0
  85. /* Constants */
  86. enum {
  87. regk_strcop_big = 0x00000001,
  88. regk_strcop_d = 0x00000001,
  89. regk_strcop_e = 0x00000000,
  90. regk_strcop_little = 0x00000000,
  91. regk_strcop_rw_cfg_default = 0x00000002
  92. };
  93. #endif /* __strcop_defs_h */