Module: OrigenStdLib

Included in:
OrigenStdLibDev::Interface
Defined in:
lib/origen_std_lib.rb,
lib/origen_std_lib/v93k.rb

Defined Under Namespace

Classes: PersistentCallbackHandlers

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.add_v93k_std_lib(i) ⇒ Object



2
3
4
5
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_std_lib/v93k.rb', line 2

def self.add_v93k_std_lib(i)
  i.add_tml :origen,
            class_name:            'origen',

            functional_test:       {
            },

            dc_measurement:        {
              class_name:       'DCMeasurement',

              apply_shutdown:   [:integer, 1],
              shutdown_pattern: [:string, nil],
              check_shutdown:   [:integer, 1],
              measure:          [:string, 'VOLT', %w(VOLT CURR v i voltage current)],
              settling_time:    [:double, 0],
              pin:              [:string, nil],
              force_value:      [:double, 0],
              i_range:          [:integer, nil],
              badc:             [:integer, 0],
              methods:          {
                finalize: lambda  do |tm|
                  # Clean up the measurement type parameter
                  if tm.measure == 'v' || tm.measure == 'voltage'
                    tm.measure = 'VOLT'
                  elsif tm.measure == 'i' || tm.measure == 'current'
                    tm.measure = 'CURR'
                  end
                  tm.measure = tm.measure.upcase # In case 'volt' entered

                  # Calculate an autorange if not supplied for current meas
                  if tm.measure == 'CURR' && !tm.i_range
                    max = [tm.limits.lo.to_f.abs, tm.limits.hi.to_f.abs].max
                    tm.i_range = max
                  end
                end
              }
            },

            frequency_measurement: {
              period_based: [:integer, 0],
              pin:          [:string, nil],
              samples:      [:integer, 2000],
              period_in_ns: [:integer, nil]
            }
end

Instance Method Details

#includes_origen_std_lib?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/origen_std_lib.rb', line 10

def includes_origen_std_lib?
  true
end