Class: OrigenDebuggers::Test::DUT
- Inherits:
-
Object
- Object
- OrigenDebuggers::Test::DUT
- Includes:
- Origen::Pins, Origen::Registers, OrigenJTAG
- Defined in:
- lib/origen_debuggers/test/dut.rb
Overview
A simple DUT model used to test the debuggers
Instance Method Summary collapse
-
#initialize ⇒ DUT
constructor
A new instance of DUT.
-
#read_register(reg, options = {}) ⇒ Object
Hook the Nexus into the register API, any register read requests will use the Nexus by default.
-
#write_register(reg, options = {}) ⇒ Object
As above for write requests.
Constructor Details
#initialize ⇒ DUT
Returns a new instance of DUT.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/origen_debuggers/test/dut.rb', line 9 def initialize add_pin :tclk add_pin :tdi add_pin :tdo add_pin :tms reg :reg32, 0x20 do bits 31..0, :data end end |
Instance Method Details
#read_register(reg, options = {}) ⇒ Object
Hook the Nexus into the register API, any register read requests will use the Nexus by default
22 23 24 25 |
# File 'lib/origen_debuggers/test/dut.rb', line 22 def read_register(reg, = {}) # nexus.read_register(reg, options) cc 'Needs to be enabled when a register protocol is available' end |
#write_register(reg, options = {}) ⇒ Object
As above for write requests
28 29 30 31 |
# File 'lib/origen_debuggers/test/dut.rb', line 28 def write_register(reg, = {}) # nexus.write_register(reg, options) cc 'Needs to be enabled when a register protocol is available' end |