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 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 8 def initialize(owner, ) @owner = owner @pins = nil if && [: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
36 37 38 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 36 def capture_string " #{char * num_pins} " end |
#empty? ⇒ Boolean
54 55 56 57 58 59 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 54 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
50 51 52 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 50 def enabled? pins.nil? ? false : true end |
#num_pins ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 40 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
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/origen_testers/pattern_compilers/v93k/digcap.rb', line 22 def render_aiv_lines lines = [] 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 << '};' lines end |