origen_testers_chroma 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/config/application.rb +15 -0
- data/config/version.rb +8 -0
- data/lib/origen_testers_chroma.rb +167 -0
- metadata +60 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 881d8432088331539ee4a7e9a078a52cfd826c97b15df9b5afd1ccc97199aba6
|
|
4
|
+
data.tar.gz: 46904bdce856254ae4fb4be7817cb8395b368cdd79e600a1736770dd1f6f094d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 6c4b9766465741281be29ea750fddf8f3b547cc6367fdc64ae786d16b5015cb6590b91dcc5c3725f4940b33647300e47e638a15df3d8005991068959e1cece9c
|
|
7
|
+
data.tar.gz: 83cdbbe87b41448c7b2bc8f0968fc7ff3e6087a5744473924f635633666500e4819be45bb1c7d59fd633844b987e9def0238f71bb499ec8a9ea3be6386ccb220
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require 'origen'
|
|
2
|
+
require_relative '../config/version'
|
|
3
|
+
|
|
4
|
+
module OrigenTestersChroma
|
|
5
|
+
# This will be called at the start of every Origen operation
|
|
6
|
+
def self.app
|
|
7
|
+
@app ||= Origen::Application.new do |app|
|
|
8
|
+
app.name = 'origen_testers_chroma'
|
|
9
|
+
app.namespace = 'OrigenTestersChroma'
|
|
10
|
+
app.version = VERSION
|
|
11
|
+
app.config.semantically_version = true
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
data/config/version.rb
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
require 'origen'
|
|
2
|
+
require 'origen_testers'
|
|
3
|
+
require_relative '../config/application.rb'
|
|
4
|
+
|
|
5
|
+
module OrigenTestersChroma
|
|
6
|
+
# Chroma tester class - fully based on IGXL
|
|
7
|
+
class Chroma < OrigenTesters::IGXLBasedTester::Base
|
|
8
|
+
# This enables the --nocom command line option to work properly
|
|
9
|
+
# Required because origen_testers-0.52.5 VectorGenerator module lacks this attr_accessor
|
|
10
|
+
attr_accessor :inhibit_comments
|
|
11
|
+
|
|
12
|
+
def initialize(options = {})
|
|
13
|
+
super(options)
|
|
14
|
+
@max_repeat_loop = 16_777_215 # 24 bits
|
|
15
|
+
@name = 'chroma' # Set tester name to 'chroma'
|
|
16
|
+
@pat_extension = 'pat' # Set pattern file extension to '.pat'
|
|
17
|
+
|
|
18
|
+
# Set capture character to 'K'
|
|
19
|
+
@capture_state = 'K'
|
|
20
|
+
@pattern_name = '' # Initialize pattern name
|
|
21
|
+
@timeset_value = '' # Initialize timeset
|
|
22
|
+
@end_module = false
|
|
23
|
+
|
|
24
|
+
if options[:no_comments]
|
|
25
|
+
@inhibit_comments = true
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def pattern_header(options = {})
|
|
30
|
+
line = ''
|
|
31
|
+
job = Origen.app.current_jobs.first
|
|
32
|
+
@pattern_name = job.requested_pattern.include?('.rb') ? job.requested_pattern.split('.rb')[0] : job.requested_pattern
|
|
33
|
+
@pattern_name = @pattern_name.include?('~') ? @pattern_name.split('~')[0] : @pattern_name
|
|
34
|
+
microcode "SET_DEC_FILE \"./pins.dec\" // Replace your pinsFileName manually."
|
|
35
|
+
microcode ' HEADER'
|
|
36
|
+
ordered_pins.each_with_index do |pin, i|
|
|
37
|
+
unless i == 0
|
|
38
|
+
line << ',%'
|
|
39
|
+
end
|
|
40
|
+
line << pin.name.to_s
|
|
41
|
+
end
|
|
42
|
+
microcode " #{line};"
|
|
43
|
+
microcode "SPM_PATTERN(#{@pattern_name.to_s[0,31]})"
|
|
44
|
+
microcode '{'
|
|
45
|
+
if ordered_pins.size > 0
|
|
46
|
+
max_pin_name_length = ordered_pins.map(&:name).max { |a, b| a.length <=> b.length }.length
|
|
47
|
+
pin_widths = ordered_pins.map { |p| p.size - 1 }
|
|
48
|
+
max_pin_name_length.times do |i|
|
|
49
|
+
cc((' ' * 31) + ordered_pins.map.with_index { |p, x| ((p.name[i] || ' ') + ' ' * pin_widths[x]).gsub('_', '-') }.join(' '))
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
microcode ''
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def format_vector(vec)
|
|
56
|
+
# Process regular vectors
|
|
57
|
+
if vec.pin_vals
|
|
58
|
+
pin_vals = "*#{vec.pin_vals}*"
|
|
59
|
+
microcode = ''
|
|
60
|
+
if vec.microcode.to_s.strip != ''
|
|
61
|
+
microcode = " MicroCode: #{vec.microcode};"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Timeset
|
|
65
|
+
timeset = vec.timeset ? vec.timeset.name : ''
|
|
66
|
+
|
|
67
|
+
# Repeat instruction
|
|
68
|
+
repeat = ''
|
|
69
|
+
if vec.repeat > 1
|
|
70
|
+
if @timeset_value == timeset.to_s
|
|
71
|
+
repeat = " RPT #{vec.repeat}"
|
|
72
|
+
else
|
|
73
|
+
repeat = ", RPT #{vec.repeat}"
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
# Comment
|
|
77
|
+
comment = ''
|
|
78
|
+
if vec.inline_comment && !vec.inline_comment.empty?
|
|
79
|
+
comment = " Comment: #{vec.inline_comment};"
|
|
80
|
+
end
|
|
81
|
+
mergeCom = ''
|
|
82
|
+
if microcode != '' || comment != ''
|
|
83
|
+
mergeCom = " // #{microcode} #{comment}"
|
|
84
|
+
end
|
|
85
|
+
# Return formatted string
|
|
86
|
+
if vec.microcode && vec.microcode.end_with?(':')
|
|
87
|
+
result = "#{(vec.microcode.to_s).ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;"
|
|
88
|
+
else
|
|
89
|
+
if vec.number == 0
|
|
90
|
+
if @timeset_value == timeset.to_s
|
|
91
|
+
result = "#{(@pattern_name.to_s[0,12] + '_st:').ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
|
|
92
|
+
else
|
|
93
|
+
result = "#{(@pattern_name.to_s[0,12] + '_st:').ljust(32)} #{pin_vals} #{timeset.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
|
|
94
|
+
end
|
|
95
|
+
else
|
|
96
|
+
if @timeset_value == timeset.to_s
|
|
97
|
+
result = "#{''.ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
|
|
98
|
+
else
|
|
99
|
+
result = "#{''.ljust(32)} #{pin_vals} #{timeset.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
@timeset_value = timeset.to_s
|
|
104
|
+
return result
|
|
105
|
+
else
|
|
106
|
+
vec.microcode || ''
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def pattern_footer(options = {})
|
|
111
|
+
job = Origen.app.current_jobs.first
|
|
112
|
+
@pattern_name = job.requested_pattern.include?('.rb') ? job.requested_pattern.split('.rb')[0] : job.requested_pattern
|
|
113
|
+
@pattern_name = @pattern_name.include?('~') ? @pattern_name.split('~')[0] : @pattern_name
|
|
114
|
+
|
|
115
|
+
$tester.align_to_last
|
|
116
|
+
if @end_module
|
|
117
|
+
$tester.cycle microcode: "#{(@pattern_name.to_s[0,12] + '_sp:')}" unless options[:subroutine_pat]
|
|
118
|
+
else
|
|
119
|
+
$tester.cycle
|
|
120
|
+
end
|
|
121
|
+
microcode '}'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def store(*pins)
|
|
125
|
+
return if @inhibit_vectors
|
|
126
|
+
options = pins.last.is_a?(Hash) ? pins.pop : {}
|
|
127
|
+
options = { offset: 0,
|
|
128
|
+
opcode: 'cap'
|
|
129
|
+
}.merge(options)
|
|
130
|
+
pins = pins.flatten.compact
|
|
131
|
+
if pins.empty?
|
|
132
|
+
fail 'For the Chroma you must supply the pins to store/capture'
|
|
133
|
+
end
|
|
134
|
+
capt_microcode = options[:opcode]
|
|
135
|
+
pins.each do |pin|
|
|
136
|
+
pin.restore_state do
|
|
137
|
+
pin.capture
|
|
138
|
+
update_vector_pin_val pin, offset: options[:offset]
|
|
139
|
+
last_vector(options[:offset]).dont_compress = true
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
update_vector microcode: capt_microcode, offset: options[:offset]
|
|
143
|
+
end
|
|
144
|
+
alias_method :to_hram, :store
|
|
145
|
+
alias_method :capture, :store
|
|
146
|
+
|
|
147
|
+
def store_next_cycle(*pins)
|
|
148
|
+
return if @inhibit_vectors
|
|
149
|
+
options = pins.last.is_a?(Hash) ? pins.pop : {}
|
|
150
|
+
options = {
|
|
151
|
+
opcode: 'cap'
|
|
152
|
+
}.merge(options)
|
|
153
|
+
pins = pins.flatten.compact
|
|
154
|
+
if pins.empty?
|
|
155
|
+
fail 'For the Chroma you must supply the pins to store/capture'
|
|
156
|
+
end
|
|
157
|
+
capt_microcode = options[:opcode]
|
|
158
|
+
pins.each { |pin| pin.save; pin.capture }
|
|
159
|
+
# Register this clean up function to be run after the next vector
|
|
160
|
+
# is generated (SMcG: cool or what! DH: Yes, very cool!)
|
|
161
|
+
preset_next_vector(microcode: capt_microcode) do
|
|
162
|
+
pins.each(&:restore)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
alias_method :store!, :store_next_cycle
|
|
166
|
+
end
|
|
167
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: origen_testers_chroma
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.7
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Sean Dong
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-11-12 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: origen_testers
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - "~>"
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.52.5
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 0.52.5
|
|
27
|
+
description: This plugin provides a Chroma tester model based origen_testers
|
|
28
|
+
email:
|
|
29
|
+
- sean.dong@nxp.com
|
|
30
|
+
executables: []
|
|
31
|
+
extensions: []
|
|
32
|
+
extra_rdoc_files: []
|
|
33
|
+
files:
|
|
34
|
+
- config/application.rb
|
|
35
|
+
- config/version.rb
|
|
36
|
+
- lib/origen_testers_chroma.rb
|
|
37
|
+
homepage: http://origen-sdk.org/gems/origen_testers_chroma
|
|
38
|
+
licenses:
|
|
39
|
+
- ''
|
|
40
|
+
metadata: {}
|
|
41
|
+
post_install_message:
|
|
42
|
+
rdoc_options: []
|
|
43
|
+
require_paths:
|
|
44
|
+
- lib
|
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
|
+
requirements:
|
|
47
|
+
- - ">="
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: '2'
|
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
requirements: []
|
|
56
|
+
rubygems_version: 3.5.3
|
|
57
|
+
signing_key:
|
|
58
|
+
specification_version: 4
|
|
59
|
+
summary: Chroma tester plugin based on OrigenTesters
|
|
60
|
+
test_files: []
|