Class: OrigenNexus::DUT
- Inherits:
-
Object
- Object
- OrigenNexus::DUT
- Includes:
- Origen::Callbacks, Origen::Pins, Origen::Registers, OrigenNexus
- Defined in:
- lib/origen_nexus/dut.rb
Overview
This is a dummy DUT model that provides an example of how the Nexus module should be included
Constant Summary
- NEXUS_CONFIG =
{ tclk_format: :rh, tclk_multiple: 1 }
Instance Method Summary (collapse)
-
- (DUT) initialize(options = {})
constructor
A new instance of DUT.
- - (Object) read_register(reg, options = {})
- - (Object) startup(_options)
- - (Object) tclk_format
- - (Object) tclk_multiple
- - (Object) write_register(reg, options = {})
Methods included from OrigenNexus
Constructor Details
- (DUT) initialize(options = {})
Returns a new instance of DUT
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/origen_nexus/dut.rb', line 17 def initialize( = {}) NEXUS_CONFIG[:tclk_format] = [:tclk_format] if [:tclk_format] NEXUS_CONFIG[:tclk_multiple] = [:tclk_multiple] if [:tclk_multiple] # Any DUT that uses Nexus must declare these pins # (or an alias) # OnCE Debug Port pins add_pin :tclk add_pin :tms add_pin :tdi add_pin :tdo # Define dummy register to use to test Nexus # driver for test purposes reg :testme32, 0x007a, size: 32 do bit 31..16, :portB bit 15..8, :portA bit 0, :enable end reg :status32, 0x007b, size: 32 do bit 31..16, :fail_vals, writable: false bit 0, :error_bit, writable: false end reg :testme16, 0x007c, size: 16 do bit 15..8, :portD bit 7..0, :portC end end |
Instance Method Details
- (Object) read_register(reg, options = {})
53 54 55 56 57 |
# File 'lib/origen_nexus/dut.rb', line 53 def read_register(reg, = {}) # $tester.dont_compress = true nexus.read_register(reg, ) # $tester.dont_compress = false end |
- (Object) startup(_options)
49 50 51 |
# File 'lib/origen_nexus/dut.rb', line 49 def startup() $tester.set_timeset('tp0', 60) end |
- (Object) tclk_format
65 66 67 |
# File 'lib/origen_nexus/dut.rb', line 65 def tclk_format NEXUS_CONFIG[:tclk_format] end |
- (Object) tclk_multiple
69 70 71 |
# File 'lib/origen_nexus/dut.rb', line 69 def tclk_multiple NEXUS_CONFIG[:tclk_multiple] end |
- (Object) write_register(reg, options = {})
59 60 61 62 63 |
# File 'lib/origen_nexus/dut.rb', line 59 def write_register(reg, = {}) # $tester.dont_compress = true nexus.write_register(reg, ) # $tester.dont_compress = false end |