Class: OrigenTesters::PatternCompilers::V93KPatternCompiler::DigCapAPI::DigCap
- Inherits:
-
Object
- Object
- OrigenTesters::PatternCompilers::V93KPatternCompiler::DigCapAPI::DigCap
- Defined in:
- lib/origen_testers/pattern_compilers/v93k/digcap.rb
Instance Attribute Summary collapse
-
#char ⇒ Object
Returns the value of attribute char.
-
#nrf ⇒ Object
Returns the value of attribute nrf.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#pins ⇒ Object
Returns the value of attribute pins.
-
#vps ⇒ Object
Returns the value of attribute vps.
Instance Method Summary collapse
- #capture_string ⇒ Object
- #empty? ⇒ Boolean
- #enabled? ⇒ Boolean
-
#initialize(owner, options) ⇒ DigCap
constructor
A new instance of DigCap.
- #num_pins ⇒ Object
- #render_aiv_lines ⇒ Object
Constructor Details
#initialize(owner, options) ⇒ DigCap
Returns a new instance of DigCap.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 8 def initialize(owner, ) @owner = owner @pins = nil if && [:skip_setup] @skip_setup = [:skip_setup] # optional: force skip of AVI digcap setup # e.g. handled by RDI elsif && [:pins] && [:vps] @pins = [:pins] # required: pins to be captured @vps = [:vps] # required: vecotrs per sample @nrf = [:nrf] || 1 # optional: nr_frames (defaults to 1) @char = [:char] || 'C' # optional: vector character representing capture elsif fail 'Must specifiy pins and vps for digcap setup!' end end |
Instance Attribute Details
#char ⇒ Object
Returns the value of attribute char.
6 7 8 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 6 def char @char end |
#nrf ⇒ Object
Returns the value of attribute nrf.
6 7 8 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 6 def nrf @nrf end |
#owner ⇒ Object
Returns the value of attribute owner.
6 7 8 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 6 def owner @owner end |
#pins ⇒ Object
Returns the value of attribute pins.
6 7 8 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 6 def pins @pins end |
#vps ⇒ Object
Returns the value of attribute vps.
6 7 8 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 6 def vps @vps end |
Instance Method Details
#capture_string ⇒ Object
41 42 43 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 41 def capture_string " #{char * num_pins} " end |
#empty? ⇒ Boolean
59 60 61 62 63 64 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 59 def empty? vec_per_frame.each do |k, v| return false if v > 0 end true # digcap setup but no avc contain capture vectors end |
#enabled? ⇒ Boolean
55 56 57 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 55 def enabled? pins.nil? ? false : true end |
#num_pins ⇒ Object
45 46 47 48 49 50 51 52 53 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 45 def num_pins if pins.is_a? String pins.split(' ').size elsif pins.is_a? Symbol dut.pins(pins).size elsif pins.is_a? Array fail 'Digcap Pins does not support array yet' end end |
#render_aiv_lines ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 25 def render_aiv_lines lines = [] unless @skip_setup lines << '' lines << 'AI_DIGCAP_SETTINGS {' lines << render_digcap_header avc_files.each do |f| if vec_per_frame[f.to_sym] > 0 lines << render_digcap_entry(f) end end lines << '};' end lines end |