Class: OrigenARMDebugDev::DUT
- Inherits:
-
Object
- Object
- OrigenARMDebugDev::DUT
- Includes:
- Origen::TopLevel, OrigenARMDebug
- Defined in:
- lib/origen_arm_debug_dev/dut.rb
Overview
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.
Direct Known Subclasses
Constant Summary
Constants included from OrigenARMDebug
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ DUT
constructor
Initializes simple dut model with test register and required jtag/swd pins.
-
#read_register(reg, options = {}) ⇒ Object
Read data from a register.
-
#startup(options) ⇒ Object
Add any custom startup business here.
-
#write_register(reg, options = {}) ⇒ Object
Write data to a register.
Constructor Details
#initialize(options = {}) ⇒ DUT
Initializes simple dut model with test register and required jtag/swd pins
16 17 18 19 20 21 22 23 24 |
# File 'lib/origen_arm_debug_dev/dut.rb', line 16 def initialize( = {}) add_reg :test, 0 reg :test2, 0 do |reg| reg.bit 31, :msb reg.bit 30..1, :data reg.bit 0, :lsb end end |
Instance Method Details
#read_register(reg, options = {}) ⇒ Object
Read data from a register
37 38 39 |
# File 'lib/origen_arm_debug_dev/dut.rb', line 37 def read_register(reg, = {}) arm_debug.mem_ap.read_register(reg, ) end |
#startup(options) ⇒ Object
Add any custom startup business here.
29 30 31 |
# File 'lib/origen_arm_debug_dev/dut.rb', line 29 def startup() tester.set_timeset('arm_debug', 40) end |
#write_register(reg, options = {}) ⇒ Object
Write data to a register
45 46 47 |
# File 'lib/origen_arm_debug_dev/dut.rb', line 45 def write_register(reg, = {}) arm_debug.mem_ap.write_register(reg, ) end |