strcop_defs_asm.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef __strcop_defs_asm_h
  2. #define __strcop_defs_asm_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 -asm --outfile asm/strcop_defs_asm.h ../../inst/strcop/rtl/strcop_regs.r
  10. * id: $Id: strcop_defs_asm.h,v 1.1 2005/04/24 18:31:04 starvik Exp $
  11. * Any changes here will be lost.
  12. *
  13. * -*- buffer-read-only: t -*-
  14. */
  15. #ifndef REG_FIELD
  16. #define REG_FIELD( scope, reg, field, value ) \
  17. REG_FIELD_X_( value, reg_##scope##_##reg##___##field##___lsb )
  18. #define REG_FIELD_X_( value, shift ) ((value) << shift)
  19. #endif
  20. #ifndef REG_STATE
  21. #define REG_STATE( scope, reg, field, symbolic_value ) \
  22. REG_STATE_X_( regk_##scope##_##symbolic_value, reg_##scope##_##reg##___##field##___lsb )
  23. #define REG_STATE_X_( k, shift ) (k << shift)
  24. #endif
  25. #ifndef REG_MASK
  26. #define REG_MASK( scope, reg, field ) \
  27. REG_MASK_X_( reg_##scope##_##reg##___##field##___width, reg_##scope##_##reg##___##field##___lsb )
  28. #define REG_MASK_X_( width, lsb ) (((1 << width)-1) << lsb)
  29. #endif
  30. #ifndef REG_LSB
  31. #define REG_LSB( scope, reg, field ) reg_##scope##_##reg##___##field##___lsb
  32. #endif
  33. #ifndef REG_BIT
  34. #define REG_BIT( scope, reg, field ) reg_##scope##_##reg##___##field##___bit
  35. #endif
  36. #ifndef REG_ADDR
  37. #define REG_ADDR( scope, inst, reg ) REG_ADDR_X_(inst, reg_##scope##_##reg##_offset)
  38. #define REG_ADDR_X_( inst, offs ) ((inst) + offs)
  39. #endif
  40. #ifndef REG_ADDR_VECT
  41. #define REG_ADDR_VECT( scope, inst, reg, index ) \
  42. REG_ADDR_VECT_X_(inst, reg_##scope##_##reg##_offset, index, \
  43. STRIDE_##scope##_##reg )
  44. #define REG_ADDR_VECT_X_( inst, offs, index, stride ) \
  45. ((inst) + offs + (index) * stride)
  46. #endif
  47. /* Register rw_cfg, scope strcop, type rw */
  48. #define reg_strcop_rw_cfg___td3___lsb 0
  49. #define reg_strcop_rw_cfg___td3___width 1
  50. #define reg_strcop_rw_cfg___td3___bit 0
  51. #define reg_strcop_rw_cfg___td2___lsb 1
  52. #define reg_strcop_rw_cfg___td2___width 1
  53. #define reg_strcop_rw_cfg___td2___bit 1
  54. #define reg_strcop_rw_cfg___td1___lsb 2
  55. #define reg_strcop_rw_cfg___td1___width 1
  56. #define reg_strcop_rw_cfg___td1___bit 2
  57. #define reg_strcop_rw_cfg___ipend___lsb 3
  58. #define reg_strcop_rw_cfg___ipend___width 1
  59. #define reg_strcop_rw_cfg___ipend___bit 3
  60. #define reg_strcop_rw_cfg___ignore_sync___lsb 4
  61. #define reg_strcop_rw_cfg___ignore_sync___width 1
  62. #define reg_strcop_rw_cfg___ignore_sync___bit 4
  63. #define reg_strcop_rw_cfg___en___lsb 5
  64. #define reg_strcop_rw_cfg___en___width 1
  65. #define reg_strcop_rw_cfg___en___bit 5
  66. #define reg_strcop_rw_cfg_offset 0
  67. /* Constants */
  68. #define regk_strcop_big 0x00000001
  69. #define regk_strcop_d 0x00000001
  70. #define regk_strcop_e 0x00000000
  71. #define regk_strcop_little 0x00000000
  72. #define regk_strcop_rw_cfg_default 0x00000002
  73. #endif /* __strcop_defs_asm_h */