Sha256: 2b23f00a44116b629bbb22753724561f2dc1aaece7c8f14100abbab1592a9f58

Contents?: true

Size: 1.6 KB

Versions: 8

Compression:

Stored size: 1.6 KB

Contents

Pattern.create name: "workout_#{dut.arm_debug.dp.name}" do

  ss "Tests of direct DP API"
  dp = dut.arm_debug.dp

  dp.idcode.partno.read!(0x12)

  dp.ctrlstat.write!(0x50000000)
  dp.ctrlstat.read!(0xF0000000)

  dp.select.apbanksel.write!(0xF)

  dp.abort.dapabort.write!(1)

  ss "Tests of direct AP API"
  ap = dut.arm_debug.mem_ap

  ap.tar.write!(0x1234_0000)

  ap.tar.read!

  ss "Tests of high-level register API"

  ss "Test write register, should write value 0xFF01"
  dut.reg(:test).write!(0x0000FF01)

  ss "Test write register with overlay, no subroutine"
  dut.reg(:test).overlay('write_overlay')
  dut.reg(:test).write!(0x0000FF01, no_subr: true)
  dut.reg(:test).overlay(nil)

  ss "Test write register with overlay, use subroutine if available"
  dut.reg(:test).overlay('write_overlay_subr')
  dut.reg(:test).write!(0x0000FF01)
  dut.reg(:test).overlay(nil)

  ss "Test read register, should read value 0x0000FF01"
  dut.reg(:test).read!
 
  ss "Test read register, with overlay, no subroutine, should read value 0x0000FF01"
  dut.reg(:test).overlay('read_overlay')
  dut.reg(:test).read!(no_subr: true)
  dut.reg(:test).overlay(nil)

  ss "Test read register, with overlay, use subroutine if available"
  dut.reg(:test).overlay('read_overlay_subr')
  dut.reg(:test).read!
  dut.reg(:test).overlay(nil)
  
  ss "Test read register with mask, should read value 0xXXXxxx1"
  dut.reg(:test).read!(mask: 0x0000_000F)

  ss "Test read register with store"
  dut.reg(:test).store!

  ss "Test bit level read, should read value 0xXXXxxx1"
  dut.reg(:test).reset
  dut.reg(:test).data = 0x0000FF01
  dut.reg(:test)[0].read!

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
origen_arm_debug-1.1.3 pattern/workout.rb
origen_arm_debug-1.1.2 pattern/workout.rb
origen_arm_debug-1.1.1 pattern/workout.rb
origen_arm_debug-1.1.0 pattern/workout.rb
origen_arm_debug-1.0.2 pattern/workout.rb
origen_arm_debug-1.0.1 pattern/workout.rb
origen_arm_debug-1.0.0 pattern/workout.rb
origen_arm_debug-1.0.0.pre1 pattern/workout.rb