class OrigenARMDebugDev::DUT

This is a dummy DUT model which is used to instantiate and test the ARMDebug locally during development.

It is not included when this library is imported.

Public Class Methods

new(options = {}) click to toggle source

Initializes simple dut model with test register and required jtag/swd pins

@example

$dut = OrigenARMDebugDev::DUT.new
# File lib/origen_arm_debug_dev/dut.rb, line 16
def initialize(options = {})
  add_reg :test, 0

  reg :test2, 0 do |reg|
    reg.bit 31, :msb
    reg.bit 30..1, :data
    reg.bit 0, :lsb
  end
end

Public Instance Methods

read_register(reg, options = {}) click to toggle source

Read data from a register

@param [Register] reg Register name or address value @param [Hash] options Options to customize the operation

# File lib/origen_arm_debug_dev/dut.rb, line 37
def read_register(reg, options = {})
  arm_debug.mem_ap.read_register(reg, options)
end
startup(options) click to toggle source

Add any custom startup business here.

@param [Hash] options Options to customize the operation

# File lib/origen_arm_debug_dev/dut.rb, line 29
def startup(options)
  tester.set_timeset('arm_debug', 40)
end
write_register(reg, options = {}) click to toggle source

Write data to a register

@param [Register] reg Register name or address value @param [Hash] options Options to customize the operation

# File lib/origen_arm_debug_dev/dut.rb, line 45
def write_register(reg, options = {})
  arm_debug.mem_ap.write_register(reg, options)
end