Sha256: 0e850f71c97095eab972ff8c49cb9427dd370a95b401bebedd949e227f8cff41
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
module OrigenStdLib def self.add_v93k_std_lib(i) i.add_tml :origen, class_name: 'origen_tml', functional_test: { }, dc_measurement: { class_name: 'DCMeasurement', apply_shutdown: [:integer, 1], shutdown_pattern: [:string, nil], 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], 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
origen_std_lib-0.3.0 | lib/origen_std_lib/v93k.rb |