Module: OrigenLink::ConfigurationCommands
- Included in:
- VectorBased
- Defined in:
- lib/origen_link/configuration_commands.rb
Instance Method Summary collapse
-
#get_tset_number(name) ⇒ Object
get_tset_number(name) This method returns the test number associated with the passed in tset name.
-
#pinformat=(pinformat) ⇒ Object
pinformat= This method is used to setup the pin clock format on the debugger device.
-
#pinmap=(pinmap) ⇒ Object
pinmap= This method is used to setup the pin map on the debugger device.
-
#pinorder=(pinorder) ⇒ Object
pinorder= This method is used to setup the pin order on the debugger device.
-
#pintiming=(pintiming) ⇒ Object
pintiming= This method is used to setup the pin timing on the debugger device.
-
#replace_tset_name_w_number(csl) ⇒ Object
replace_tset_name_w_number(csl) This method is used by pinformat= and pintiming= This method receives a comma separated list of arguments the first of which is a timeset name.
Instance Method Details
#get_tset_number(name) ⇒ Object
get_tset_number(name)
This method returns the test number associated with the
passed in tset name. If the name is unknown a new lookup
number is returned.
76 77 78 79 80 81 82 |
# File 'lib/origen_link/configuration_commands.rb', line 76 def get_tset_number(name) unless @tsets_programmed.key?(name) @tsets_programmed[name] = @tset_count @tset_count += 1 end @tsets_programmed[name] end |
#pinformat=(pinformat) ⇒ Object
pinformat=
This method is used to setup the pin clock format on the debugger device.
The supported formats are rl and rh
example:
tester.pinformat = 'func_25mhz,tclk,rl'
38 39 40 41 42 |
# File 'lib/origen_link/configuration_commands.rb', line 38 def pinformat=(pinformat) @pinformat = replace_tset_name_w_number(pinformat.gsub(/\s+/, '')) response = send_cmd('pin_format', @pinformat) setup_cmd_response_logger('pin_format', response) end |
#pinmap=(pinmap) ⇒ Object
pinmap=
This method is used to setup the pin map on the debugger device.
The argument should be a string with <pin name>, <gpio #>, <pin name>
<gpio #>, etc
example:
tester.pinmap = 'tclk,26,tms,19,tdi,16,tdo,23'
10 11 12 13 14 |
# File 'lib/origen_link/configuration_commands.rb', line 10 def pinmap=(pinmap) @pinmap = pinmap.gsub(/\s+/, '') response = send_cmd('pin_assign', @pinmap) setup_cmd_response_logger('pin_assign', response) end |
#pinorder=(pinorder) ⇒ Object
pinorder=
This method is used to setup the pin order on the debugger device.
The pin order will indicate the order that pin data appears in vector
data.
This is a duplicate of pattern_pin_order and can be handled behind the
scenes in the future.
example:
tester.pinorder = 'tclk,tms,tdi,tdo'
26 27 28 29 30 |
# File 'lib/origen_link/configuration_commands.rb', line 26 def pinorder=(pinorder) @pinorder = pinorder.gsub(/\s+/, '') response = send_cmd('pin_patternorder', @pinorder) setup_cmd_response_logger('pin_patternorder', response) end |
#pintiming=(pintiming) ⇒ Object
pintiming=
This method is used to setup the pin timing on the debugger device.
Timing is relative to the rise and fall of a clock
timing value: 0 1 2
clock waveform: ___/***\___
example:
tester.pintiming = 'func_25mhz,tms,0,tdi,0,tdo,1'
53 54 55 56 57 |
# File 'lib/origen_link/configuration_commands.rb', line 53 def pintiming=(pintiming) @pintiming = replace_tset_name_w_number(pintiming.gsub(/\s+/, '')) response = send_cmd('pin_timing', @pintiming) setup_cmd_response_logger('pin_timing', response) end |
#replace_tset_name_w_number(csl) ⇒ Object
replace_tset_name_w_number(csl)
This method is used by pinformat= and pintiming=
This method receives a comma separated list of arguments
the first of which is a timeset name. A comma
separated list is returned with the timeset name replaced
by it's lookup number. If it is a new timset, a lookup
number is associated with the name.
66 67 68 69 70 |
# File 'lib/origen_link/configuration_commands.rb', line 66 def replace_tset_name_w_number(csl) args = csl.split(',') args[0] = get_tset_number(args[0]) args.join(',') end |