Class: OrigenARMDebug::JTAG_DPV6
- Inherits:
-
Object
- Object
- OrigenARMDebug::JTAG_DPV6
- Includes:
- Origen::Model
- Defined in:
- lib/origen_arm_debug/jtag_dp_v6.rb
Instance Attribute Summary collapse
-
#apacc_select ⇒ Object
readonly
Returns the value of attribute apacc_select.
-
#dpacc_select ⇒ Object
readonly
Returns the value of attribute dpacc_select.
Instance Method Summary collapse
- #abort ⇒ Object
-
#initialize(options = {}) ⇒ JTAG_DPV6
constructor
A new instance of JTAG_DPV6.
- #is_jtag? ⇒ Boolean
- #is_swd? ⇒ Boolean (also: #is_sw?)
- #select ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ JTAG_DPV6
Returns a new instance of JTAG_DPV6.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 7 def initialize( = {}) = { ir_size: 4, idcode_select: 0b1110, abort_select: 0b1000, dpacc_select: 0b1010, apacc_select: 0b1011 }.merge() @dpacc_select = [:dpacc_select] @apacc_select = [:apacc_select] add_reg :ir, 0, size: [:ir_size] # Virtual reg used to represent all of the various 35-bit scan chains reg :dr, 0, size: 35 do |reg| reg.bit 34..3, :data reg.bit 2..1, :a reg.bit 0, :rnw end reg :idcode, [:idcode_select], access: :ro do |reg| reg.bit 31..28, :version reg.bit 27..12, :partno reg.bit 11..1, :designer reg.bit 0, :bit0, reset: 1 end reg :ctrlstat, 0x4, dpbanksel: 0 do |reg| reg.bit 31, :csyspwrupack reg.bit 30, :csyspwrupreq reg.bit 29, :cdbgpwrupack reg.bit 28, :cdbgpwrupreq reg.bit 27, :cdbgrstack reg.bit 26, :cdbgrstreq reg.bit 23..12, :trncnt reg.bit 11..8, :masklane reg.bit 7, :wdataerr reg.bit 6, :readok reg.bit 5, :stickyerr reg.bit 4, :stickycmp reg.bit 3..2, :trnmode reg.bit 1, :stickyorun reg.bit 0, :orundetect end reg :select, 0x8 do |reg| reg.bit 31..4, :addr reg.bit 3..0, :dpbanksel end reg :select1, 0x4, dpbanksel: 5 do |reg| reg.bit 31..0, :addr end select.write [:dp_select_reset] if [:dp_select_reset] add_reg :rdbuff, 0xC, access: :ro, reset: 0 reg :abort, [:abort_select], access: :wo do |reg| reg.bit 0, :dapabort end end |
Instance Attribute Details
#apacc_select ⇒ Object (readonly)
Returns the value of attribute apacc_select.
5 6 7 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 5 def apacc_select @apacc_select end |
#dpacc_select ⇒ Object (readonly)
Returns the value of attribute dpacc_select.
5 6 7 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 5 def dpacc_select @dpacc_select end |
Instance Method Details
#abort ⇒ Object
73 74 75 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 73 def abort reg(:abort) end |
#is_jtag? ⇒ Boolean
77 78 79 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 77 def is_jtag? true end |
#is_swd? ⇒ Boolean Also known as: is_sw?
81 82 83 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 81 def is_swd? false end |
#select ⇒ Object
69 70 71 |
# File 'lib/origen_arm_debug/jtag_dp_v6.rb', line 69 def select reg(:select) end |