origen_testers_chroma 0.1.5

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 77852c4d382ff81243be9f701715c9a156d024e06176b6faa230b2034648ff93
4
+ data.tar.gz: 66e58ba15b4ae8f994002e7a86af6a03441f8d2ac026f69e73d82fdd50b4b36b
5
+ SHA512:
6
+ metadata.gz: f4f46db29c578aaf120e79040e0698add6ddebb75486dba6cdb862ddd473b9cdd009ef0317434642c3721cd6aee87727a35fcb284981fe473511a9f2e5544bae
7
+ data.tar.gz: f83998cada1c70025f3f5daf2d8f31211075119cef037bc8c7421eeab858b02e55f93555e4d8e7ceff4328f27497917a9cf5fd4eee6fe00de36896ba79a4a78f
@@ -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,8 @@
1
+ module OrigenTestersChroma
2
+ MAJOR = 0
3
+ MINOR = 1
4
+ BUGFIX = 5
5
+ DEV = nil
6
+ VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
+ end
8
+
@@ -0,0 +1,166 @@
1
+ require 'origen'
2
+ require 'origen_testers'
3
+ require_relative '../config/application.rb'
4
+
5
+ module OrigenTestersChroma
6
+ # Chroma tester class - fully based on J750
7
+ # Inherits all J750 functionality and generates the same pattern format
8
+ class Chroma < OrigenTesters::IGXLBasedTester::J750
9
+ # Add inhibit_comments attribute support
10
+ # This enables the --nocom command line option to work properly
11
+ # Required because origen_testers-0.52.5 VectorGenerator module lacks this attr_accessor
12
+ attr_accessor :inhibit_comments
13
+
14
+ # Chroma-specific configurations or methods can be added here
15
+ # By default, it uses all J750 functionality
16
+
17
+ def initialize(options = {})
18
+ super(options)
19
+ # Override some default settings while maintaining J750 compatibility
20
+ @max_repeat_loop = 16_777_215 # 24 bits
21
+ @name = 'chroma' # Set tester name to 'chroma'
22
+ @pat_extension = 'pat' # Set pattern file extension to '.pat'
23
+
24
+ # Set capture character to 'K'
25
+ @capture_state = 'K'
26
+ @pattern_name = '' # Initialize pattern name
27
+ @timeset_value = '' # Initialize timeset
28
+
29
+ if options[:no_comments]
30
+ @inhibit_comments = true
31
+ end
32
+ end
33
+
34
+ def pattern_header(options = {})
35
+ line = ''
36
+ job = Origen.app.current_jobs.first
37
+ @pattern_name = job.requested_pattern.include?('.rb') ? job.requested_pattern.split('.rb')[0] : job.requested_pattern
38
+ @pattern_name = @pattern_name.include?('~') ? @pattern_name.split('~')[0] : @pattern_name
39
+ microcode "SET_DEC_FILE \"./pins.dec\" // Replace your pinsFileName manually."
40
+ microcode ' HEADER'
41
+ ordered_pins.each_with_index do |pin, i|
42
+ unless i == 0
43
+ line << ',%'
44
+ end
45
+ line << pin.name.to_s
46
+ end
47
+ microcode " #{line};"
48
+ microcode "SPM_PATTERN(#{@pattern_name.to_s[0,31]})"
49
+ microcode '{'
50
+ if ordered_pins.size > 0
51
+ max_pin_name_length = ordered_pins.map(&:name).max { |a, b| a.length <=> b.length }.length
52
+ pin_widths = ordered_pins.map { |p| p.size - 1 }
53
+ max_pin_name_length.times do |i|
54
+ cc((' ' * 31) + ordered_pins.map.with_index { |p, x| ((p.name[i] || ' ') + ' ' * pin_widths[x]).gsub('_', '-') }.join(' '))
55
+ end
56
+ end
57
+ microcode ''
58
+ end
59
+
60
+ def format_vector(vec)
61
+ # Process regular vectors
62
+ if vec.pin_vals
63
+ pin_vals = "*#{vec.pin_vals}*"
64
+ microcode = ''
65
+ if vec.microcode.to_s.strip != ''
66
+ microcode = " MicroCode: #{vec.microcode};"
67
+ end
68
+
69
+ # Timeset
70
+ timeset = vec.timeset ? vec.timeset.name : ''
71
+
72
+ # Repeat instruction
73
+ repeat = ''
74
+ if vec.repeat > 1
75
+ if @timeset_value == timeset.to_s
76
+ repeat = " RPT #{vec.repeat}"
77
+ else
78
+ repeat = ", RPT #{vec.repeat}"
79
+ end
80
+ end
81
+ # Comment
82
+ comment = ''
83
+ if vec.inline_comment && !vec.inline_comment.empty?
84
+ comment = " Comment: #{vec.inline_comment};"
85
+ end
86
+ mergeCom = ''
87
+ if microcode != '' && comment != ''
88
+ mergeCom = "// #{microcode} #{comment}"
89
+ end
90
+ # Return formatted string
91
+ if vec.microcode && vec.microcode.end_with?(':')
92
+ result = "#{(vec.microcode.to_s).ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;"
93
+ else
94
+ if vec.number == 0
95
+ if @timeset_value == timeset.to_s
96
+ result = "#{(@pattern_name.to_s[0,12] + '_st:').ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
97
+ else
98
+ result = "#{(@pattern_name.to_s[0,12] + '_st:').ljust(32)} #{pin_vals} #{timeset.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
99
+ end
100
+ else
101
+ if @timeset_value == timeset.to_s
102
+ result = "#{''.ljust(32)} #{pin_vals} #{''.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
103
+ else
104
+ result = "#{''.ljust(32)} #{pin_vals} #{timeset.to_s.ljust(16)} #{repeat.to_s.ljust(16)} ;#{mergeCom}"
105
+ end
106
+ end
107
+ end
108
+ @timeset_value = timeset.to_s
109
+ return result
110
+ else
111
+ vec.microcode || ''
112
+ end
113
+ end
114
+
115
+ def pattern_footer(options = {})
116
+ options = {end_module: true}.merge(options)
117
+ job = Origen.app.current_jobs.first
118
+ @pattern_name = job.requested_pattern.include?('.rb') ? job.requested_pattern.split('.rb')[0] : job.requested_pattern
119
+ @pattern_name = @pattern_name.include?('~') ? @pattern_name.split('~')[0] : @pattern_name
120
+
121
+ $tester.align_to_last
122
+ if options[:end_module]
123
+ $tester.cycle microcode: "#{(@pattern_name.to_s[0,12] + '_sp:')}" unless options[:subroutine_pat]
124
+ else
125
+ $tester.cycle
126
+ end
127
+ microcode '}'
128
+ end
129
+
130
+ def store(*pins)
131
+ options = pins.last.is_a?(Hash) ? pins.pop : {}
132
+ options = { offset: 0 }.merge(options)
133
+ pins = pins.flatten.compact
134
+ if pins.empty?
135
+ fail 'For the Chroma generation you must supply the pins to store/capture'
136
+ end
137
+ pins.each do |pin|
138
+ pin.restore_state do
139
+ pin.capture
140
+ update_vector_pin_val pin, offset: options[:offset]
141
+ last_vector(options[:offset]).dont_compress = true
142
+ last_vector(options[:offset]).contains_capture = true
143
+ end
144
+ end
145
+ end
146
+ alias_method :capture, :store
147
+
148
+ def store_next_cycle(*pins)
149
+ options = pins.last.is_a?(Hash) ? pins.pop : {}
150
+ options = {}.merge(options)
151
+ pins = pins.flatten.compact
152
+ if pins.empty?
153
+ fail 'For the Chroma generation you must supply the pins to store/capture'
154
+ end
155
+ pins.each { |pin| pin.save; pin.capture }
156
+ unless @inhibit_vectors
157
+ preset_next_vector microcode: 'cap' do |vector|
158
+ vector.contains_capture = true
159
+ pins.each(&:restore)
160
+ end
161
+ end
162
+ end
163
+ alias_method :store!, :store_next_cycle
164
+
165
+ end
166
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: origen_testers_chroma
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.5
5
+ platform: ruby
6
+ authors:
7
+ - Sean Dong
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: origen_testers
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: 0.52.5
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: 0.52.5
26
+ description: This plugin provides a Chroma tester model based on J750 from origen_testers
27
+ email:
28
+ - sean.dong@nxp.com
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - config/application.rb
34
+ - config/version.rb
35
+ - lib/origen_testers_chroma.rb
36
+ homepage: http://origen-sdk.org/gems/origen_testers_chroma
37
+ licenses:
38
+ - ''
39
+ metadata: {}
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '2'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubygems_version: 3.6.9
55
+ specification_version: 4
56
+ summary: Chroma tester plugin based on OrigenTesters J750
57
+ test_files: []