Class: OrigenTesters::Test::DUT2

Inherits:
Object
  • Object
show all
Includes:
Origen::TopLevel
Defined in:
lib/origen_testers/test/dut2.rb

Instance Method Summary collapse

Constructor Details

#initializeDUT2

Returns a new instance of DUT2.


6
7
8
9
10
11
12
13
14
15
16
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
# File 'lib/origen_testers/test/dut2.rb', line 6

def initialize
  add_pin :reset,   reset: :drive_hi,  name: 'nvm_reset'
  add_pin :clk,     reset: :drive_hi,  name: 'nvm_clk'
  add_pin :clk_mux, reset: :drive_hi,  name: 'nvm_clk_mux'
  add_pin :porta,   reset: :drive_lo,  size: 8
  add_pin :portb,   reset: :drive_lo,  size: 8, endian: :little
  add_pin :invoke,  reset: :drive_lo,  name: 'nvm_invoke'
  add_pin :done,    reset: :expect_hi, name: 'nvm_done'
  add_pin :fail,    reset: :expect_lo, name: 'nvm_fail'
  add_pin :alvtst,  reset: :dont_care, name: 'nvm_alvtst'
  add_pin :ahvtst,  reset: :dont_care, name: 'nvm_ahvtst'
  add_pin :dtst,    reset: :dont_care, name: 'nvm_dtst'

  add_pin :tclk, reset: :drive_lo
  add_pin :trst, reset: :drive_hi

  add_pin_alias :extal,       :clk
  add_pin_alias :extal_mux,   :clk_mux
  add_pin_alias :tms,         :done
  add_pin_alias :tdo,         :fail
  add_pin_alias :tdi,         :invoke
  add_pin_alias :resetb,      :ahvtst
  add_pin_alias :nvm_reset,   :reset
  add_pin_alias :nvm_clk,     :clk
  add_pin_alias :nvm_clk_mux, :clk_mux
  add_pin_alias :nvm_invoke,  :invoke
  add_pin_alias :nvm_done,    :done
  add_pin_alias :nvm_fail,    :fail
  add_pin_alias :nvm_alvtst,  :alvtst
  add_pin_alias :nvm_ahvtst,  :ahvtst
  add_pin_alias :nvm_dtst,    :dtst

  add_pin_alias :pa5, :porta, pin: 5
  add_pin_alias :pa_lower, :porta, pins: [3..0]
  add_pin_alias :pa_upper, :porta, pins: [7, 6, 5, 4]
  add_pin_alias :porta_alias, :porta

  pins.each do |name, pin|
    add_pin_alias(name.upcase, name) unless has_pin?(name.upcase)
  end
end

Instance Method Details

#base_address(reg, options = {}) ⇒ Object


72
73
74
75
76
77
78
# File 'lib/origen_testers/test/dut2.rb', line 72

def base_address(reg, options = {})
  if reg.owned_by?(:nvm)
    0x4000_0000
  else
    0
  end
end

#has_margin0_bug?Boolean

Returns:

  • (Boolean)

60
61
62
# File 'lib/origen_testers/test/dut2.rb', line 60

def has_margin0_bug?
  false
end

#origen_dot_rootObject


80
81
82
# File 'lib/origen_testers/test/dut2.rb', line 80

def origen_dot_root
  Origen.root
end

#origen_dot_root!Object


84
85
86
# File 'lib/origen_testers/test/dut2.rb', line 84

def origen_dot_root!
  Origen.root!
end

#read_register(reg, options = {}) ⇒ Object


68
69
70
# File 'lib/origen_testers/test/dut2.rb', line 68

def read_register(reg, options = {})
  reg
end

#startup(options) ⇒ Object


48
49
50
51
52
53
54
55
56
57
58
# File 'lib/origen_testers/test/dut2.rb', line 48

def startup(options)
  if options[:add_additional_pins]
    add_pin :late_added_pin, reset: :drive_hi
  else
    # Test that rendering some vectors from a template works...
    if $tester.is_a?(J750)
      $tester.render("#{Origen.root}/pattern/nvm/j750/_mode_entry.atp.erb", hold_cycles: 5)
    end
  end
  $tester.set_timeset('nvmbist', 40) if $tester.is_vector_based?
end

#write_register(reg, options = {}) ⇒ Object


64
65
66
# File 'lib/origen_testers/test/dut2.rb', line 64

def write_register(reg, options = {})
  reg
end