Class: OrigenSWD::DUT

Inherits:
Object
  • Object
show all
Includes:
Origen::Callbacks, Origen::Pins, Origen::Registers, OrigenSWD
Defined in:
lib/origen_swd/dut.rb

Overview

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

It is not included when this library is imported.

Instance Method Summary collapse

Methods included from OrigenSWD

#swd

Constructor Details

#initialize(options = {}) ⇒ DUT

Initializes simple dut model with test register and required swd pins options - any miscellaneous custom arguments Returns nothing.



16
17
18
19
20
21
# File 'lib/origen_swd/dut.rb', line 16

def initialize(options = {})
  add_reg :test, 0x0, 32, data: { pos: 0, bits: 32 },
                          bit:  { pos: 0 }
  add_pin :swd_clk
  add_pin :swd_dio
end

Instance Method Details

#startup(options = {}) ⇒ Object

Add any custom startup business here. options - any miscellaneous custom arguments Returns nothing.



26
27
28
# File 'lib/origen_swd/dut.rb', line 26

def startup(options = {})
  $tester.set_timeset('swd', 40)
end