origen 0.34.3 → 0.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb9589bd8d0179a20919b1adf594cd400fa7f882
4
- data.tar.gz: e898d8031d277cc479d1c84ebc36c775f15b419e
3
+ metadata.gz: a2952f9e16ab5a67591228b85f5a29c8f7ed78b8
4
+ data.tar.gz: cd860b639b95180e82d8696575cc236032404ddc
5
5
  SHA512:
6
- metadata.gz: 54571cf52125b281cd1613800dde84b6c8ddb639076b7dd89328ebaed4c32e6d3e45c27723b4fb7b179c72ca59d278f986ff7b8b3da721542e27d06483fb7fa8
7
- data.tar.gz: fefb815678df5803d5f9f6b76de81ce52254455c3b7fd2a1e7d47e475bf99c98ac41611abbcd8a48fc1bffc765b76c8fdd7d4d4a63015a55dffcb9254631ac7a
6
+ metadata.gz: 1d5ab28b916cfeffe7dbdff873940b06e768ebd2a8fd617d78ee746f3b8a244220c0d429d8a89d1b51d8b4e849698702f6f30223720899afff3a636121821dd4
7
+ data.tar.gz: 4323ad68a74301cc311a808cb749d402fd5ce821601fa8570bd525bee903816d168afbdb00f361b69c291c59a7916631d34f2298ee324263e7e815a78a654106
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
- MINOR = 34
4
- BUGFIX = 3
3
+ MINOR = 35
4
+ BUGFIX = 0
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -660,6 +660,10 @@ unless defined? RGen::ORIGENTRANSITION
660
660
  @running_remotely = val
661
661
  end
662
662
 
663
+ def running_simulation?
664
+ !!(defined?(OrigenSim) && Origen.tester && Origen.tester.sim?)
665
+ end
666
+
663
667
  # Returns true if Origen is running interactively. That is, the command was 'origen i'
664
668
  def running_interactively?
665
669
  !!@running_interactively
@@ -32,7 +32,7 @@ Origen.send :current_command=, @command
32
32
  # Don't log to file during the save command since we need to preserve the last log,
33
33
  # this is done as early in the process as possible so any deprecation warnings during
34
34
  # load don't trigger a new log
35
- Origen::Log.console_only = (%w(save target environment version).include?(@command) || ARGV.include?('--exec_remote'))
35
+ Origen::Log.console_only = %w(save target environment version).include?(@command)
36
36
 
37
37
  if ARGV.delete('--coverage') ||
38
38
  ((@command == 'specs' || @command == 'examples' || @command == 'test') && (ARGV.delete('-c') || ARGV.delete('--coverage')))
@@ -187,4 +187,24 @@ class Numeric
187
187
  self / 1_000_000_000_000.0
188
188
  end
189
189
  end
190
+
191
+ # Shorthand for tester.wait(time_in_ns: 100), e.g. 100.ns!
192
+ def ns!
193
+ Origen.app.tester.wait time_in_ns: self
194
+ end
195
+
196
+ # Shorthand for tester.wait(time_in_us: 100), e.g. 100.us!
197
+ def us!
198
+ Origen.app.tester.wait time_in_us: self
199
+ end
200
+
201
+ # Shorthand for tester.wait(time_in_ms: 100), e.g. 100.ms!
202
+ def ms!
203
+ Origen.app.tester.wait time_in_ms: self
204
+ end
205
+
206
+ # Shorthand for tester.wait(time_in_s: 100), e.g. 100.s!
207
+ def s!
208
+ Origen.app.tester.wait time_in_s: self
209
+ end
190
210
  end
@@ -121,18 +121,34 @@ module Origen
121
121
  end
122
122
  end
123
123
 
124
+ def strip_dir_and_ext(name)
125
+ Pathname.new(name).basename('.*').basename('.*').to_s
126
+ end
127
+
124
128
  def run
125
129
  Origen.app.current_jobs << self
126
130
  begin
127
131
  if @options[:compile]
132
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :compiler)
128
133
  Origen.generator.compiler.compile(@requested_pattern, @options)
129
134
  elsif @options[:job_type] == :merge
135
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :merger)
130
136
  Origen.generator.compiler.merge(@requested_pattern)
131
137
  elsif @options[:action] == :program
138
+ if Origen.running_simulation?
139
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :simulator)
140
+ else
141
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :program_generator)
142
+ end
132
143
  Origen.flow.reset
133
144
  Origen.resources.reset
134
145
  OrigenTesters::Generator.execute_source(@pattern)
135
146
  else
147
+ if Origen.running_simulation?
148
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :simulator)
149
+ else
150
+ Origen.log.start_job(strip_dir_and_ext(@requested_pattern), :pattern_generator)
151
+ end
136
152
  Origen.generator.pattern.reset # Resets the pattern controller ready for a new pattern
137
153
  # Give the app a chance to handle pattern dispatch
138
154
  skip = false
@@ -164,6 +180,7 @@ module Origen
164
180
  raise
165
181
  end
166
182
  end
183
+ Origen.log.stop_job
167
184
  Origen.app.current_jobs.pop
168
185
  end
169
186
  end
@@ -9,33 +9,23 @@ module Origen
9
9
  # log.deprecate "Blah" # Deprecate message, always shown
10
10
  class Log
11
11
  require 'colored'
12
- require 'log4r'
13
- require 'log4r/outputter/fileoutputter'
14
-
15
- attr_accessor :msg_hash
16
- alias_method :messages, :msg_hash
12
+ require 'logger'
17
13
 
18
14
  LEVELS = [:normal, :verbose, :silent]
19
15
 
20
16
  def initialize
21
17
  @log_time_0 = @t0 = Time.new
22
18
  self.level = :normal
23
- @msg_hash = init_msg_hash
19
+ @custom_logs = {}
24
20
  end
25
21
 
26
- def init_msg_hash
27
- msg_types = [:info, :warn, :error, :deprecate, :debug, :success]
28
- msg_hash = {}
29
- msg_types.each do |m|
30
- msg_hash[m] = Hash.new do |h, k|
31
- h[k] = []
32
- end
22
+ def console_only?(options = {})
23
+ if options.key?(:console_only)
24
+ option = options[:console_only]
25
+ else
26
+ option = self.class.console_only?
33
27
  end
34
- msg_hash
35
- end
36
-
37
- def console_only?
38
- self.class.console_only? || !Origen.app || Origen.running_globally?
28
+ option || !Origen.app || Origen.running_globally?
39
29
  end
40
30
 
41
31
  # Anything executed within the given block will log to the console only
@@ -69,16 +59,16 @@ module Origen
69
59
  case val
70
60
  when :normal
71
61
  # Output everything except debug statements
72
- console.level = Log4r::INFO
62
+ console.level = Logger::INFO
73
63
  # Output everything
74
- log_files.level = Log4r::DEBUG unless console_only?
64
+ log_files(:level=, Logger::DEBUG) unless console_only?
75
65
  when :verbose
76
- console.level = Log4r::DEBUG
77
- log_files.level = Log4r::DEBUG unless console_only?
66
+ console.level = Logger::DEBUG
67
+ log_files(:level=, Logger::DEBUG) unless console_only?
78
68
  when :silent
79
69
  # We don't use any fatal messages, so this is effectively OFF
80
- console.level = Log4r::FATAL
81
- log_files.level = Log4r::DEBUG unless console_only?
70
+ console.level = Logger::FATAL
71
+ log_files(:level=, Logger::DEBUG) unless console_only?
82
72
  end
83
73
 
84
74
  @level = val
@@ -89,26 +79,19 @@ module Origen
89
79
  @level
90
80
  end
91
81
 
92
- def validate_args(string, msg_type)
93
- return string, msg_type unless string.is_a? Symbol
94
- ['', string]
95
- end
96
-
97
- def debug(string = '', msg_type = nil)
98
- string, msg_type = validate_args(string, msg_type)
82
+ def debug(string = '', options = {})
83
+ string, options = sanitize_args(string, options)
99
84
  msg = format_msg('DEBUG', string)
100
- log_files.debug msg unless console_only?
85
+ log_files(:debug, msg) unless console_only?(options)
101
86
  console.debug msg
102
- @msg_hash[:debug][msg_type] << msg
103
87
  nil
104
88
  end
105
89
 
106
90
  def info(string = '', msg_type = nil)
107
- string, msg_type = validate_args(string, msg_type)
91
+ string, options = sanitize_args(string, options)
108
92
  msg = format_msg('INFO', string)
109
- log_files.info msg unless console_only?
93
+ log_files(:info, msg) unless console_only?(options)
110
94
  console.info msg
111
- @msg_hash[:info][msg_type] << msg
112
95
  nil
113
96
  end
114
97
  # Legacy methods
@@ -116,51 +99,43 @@ module Origen
116
99
  alias_method :lprint, :info
117
100
 
118
101
  def success(string = '', msg_type = nil)
119
- string, msg_type = validate_args(string, msg_type)
102
+ string, options = sanitize_args(string, options)
120
103
  msg = format_msg('SUCCESS', string)
121
- log_files.info msg unless console_only?
122
- console.info msg.green
123
- @msg_hash[:success][msg_type] << msg
104
+ log_files(:info, msg) unless console_only?(options)
105
+ console.info color_unless_remote(msg, :green)
124
106
  nil
125
107
  end
126
108
 
127
109
  def deprecate(string = '', msg_type = nil)
128
- string, msg_type = validate_args(string, msg_type)
110
+ string, options = sanitize_args(string, options)
129
111
  msg = format_msg('DEPRECATED', string)
130
- log_files.warn msg unless console_only?
131
- console.warn msg.yellow
132
- @msg_hash[:deprecate][msg_type] << msg
112
+ log_files(:warn, msg) unless console_only?(options)
113
+ console.warn color_unless_remote(msg, :yellow)
133
114
  nil
134
115
  end
135
116
  alias_method :deprecated, :deprecate
136
117
 
137
118
  def warn(string = '', msg_type = nil)
138
- string, msg_type = validate_args(string, msg_type)
119
+ string, options = sanitize_args(string, options)
139
120
  msg = format_msg('WARNING', string)
140
- log_files.warn msg unless console_only?
141
- console.warn msg.yellow
142
- @msg_hash[:warn][msg_type] << msg
121
+ log_files(:warn, msg) unless console_only?(options)
122
+ console.warn color_unless_remote(msg, :yellow)
143
123
  nil
144
124
  end
145
125
  alias_method :warning, :warn
146
126
 
147
127
  def error(string = '', msg_type = nil)
148
- string, msg_type = validate_args(string, msg_type)
128
+ string, options = sanitize_args(string, options)
149
129
  msg = format_msg('ERROR', string)
150
- log_files.error msg unless console_only?
151
- console.error msg.red
152
- @msg_hash[:error][msg_type] << msg
130
+ log_files(:error, msg) unless console_only?(options)
131
+ console.error color_unless_remote(msg, :red)
153
132
  nil
154
133
  end
155
134
 
156
135
  # Made these all class methods so that they can be read without
157
136
  # instantiating a new logger (mainly for use by the origen save command)
158
137
  def self.log_file
159
- "#{log_file_directory}/last.txt"
160
- end
161
-
162
- def self.rolling_log_file
163
- "#{log_file_directory}/rolling.txt"
138
+ File.join(log_file_directory, 'last.txt')
164
139
  end
165
140
 
166
141
  def self.log_file_directory
@@ -179,43 +154,123 @@ module Origen
179
154
  level == :verbose
180
155
  end
181
156
 
182
- # Force logger to write any buffered output
157
+ # Used to force logger to write any buffered output under an earlier implementation, now does nothing
183
158
  def flush
184
- if Origen.app
185
- log_files.outputters.each(&:flush)
159
+ # No such API provided by the underlying logger, method kept around for compatibility with application
160
+ # code which was built for a previous version of this logger where flushing was required
161
+ end
162
+
163
+ # Mainly intended for testing the logger, this will return the log level to the default (:normal)
164
+ # and close all log files, such that any further logging will be done to a new file(s)
165
+ def reset
166
+ self.level = :normal
167
+ @last_file.close if @last_file
168
+ @last_file = nil
169
+ @job_file.close if @job_file
170
+ @job_file = nil
171
+ @custom_logs.each do |name, log|
172
+ log.close
186
173
  end
187
- console.outputters.each(&:flush)
174
+ @custom_logs = {}
188
175
  end
189
176
 
190
- private
177
+ # @api private
178
+ def start_job(name, type)
179
+ dir = File.join(Origen.config.log_directory, type.to_s)
180
+ if target = Origen.try(:target).try(:name)
181
+ dir = File.join(dir, target)
182
+ end
183
+ if env = Origen.try(:environment).try(:name)
184
+ dir = File.join(dir, env)
185
+ end
186
+ FileUtils.mkdir_p dir unless File.exist?(dir)
187
+ @job_file_path = File.join(dir, "#{name}.txt")
188
+ FileUtils.rm_f(@job_file_path) if File.exist?(@job_file_path)
189
+ @job_file = open_log(@job_file_path)
190
+ end
191
191
 
192
- # Returns a Log4r instance that will send to the console
193
- def console
194
- @console ||= begin
195
- console = Log4r::Logger.new 'console'
196
- # console.level = QUIET
197
- out = Log4r::Outputter.stdout
198
- out.formatter = format
199
- console.outputters << out
200
- console
192
+ # @api private
193
+ def stop_job
194
+ if @job_file
195
+ Origen.log.info "Log file written to: #{@job_file_path}"
196
+ @job_file.close
197
+ @job_file = nil
201
198
  end
202
199
  end
203
200
 
204
- # Returns a Log4r instance that will send to the log files
205
- def log_files
206
- @log_files ||= begin
207
- log_files = Log4r::Logger.new 'log_files'
208
- # log_files.level = QUIET
209
- file = Log4r::FileOutputter.new('fileOutputter', filename: self.class.log_file, trunc: true)
210
- file.formatter = format
211
- log_files.outputters << file
201
+ def method_missing(method, *args, &block)
202
+ @custom_logs[method.to_sym] ||= begin
203
+ log_file = File.join(Log.log_file_directory, "#{method}.txt")
212
204
  unless Origen.running_remotely?
213
- rolling_file = Log4r::RollingFileOutputter.new('rollingfileOutputter', filename: self.class.rolling_log_file, trunc: false, maxsize: 5_242_880, max_backups: 10)
214
- rolling_file.formatter = format
215
- log_files.outputters << rolling_file
205
+ FileUtils.mv log_file, "#{log_file}.old" if File.exist?(log_file)
206
+ end
207
+ open_log(log_file)
208
+ end
209
+ msg = args.shift
210
+ options = args.shift || {}
211
+ if options.key?(:format) && !options[:format]
212
+ msg = "#{msg}\n"
213
+ else
214
+ msg = format_msg(method.to_s.upcase, msg)
215
+ end
216
+ @custom_logs[method.to_sym].info(msg)
217
+ end
218
+
219
+ private
220
+
221
+ def sanitize_args(*args)
222
+ message = ''
223
+ options = {}
224
+ args.each do |arg|
225
+ if arg.is_a?(String)
226
+ message = arg
227
+ elsif arg.is_a?(Hash)
228
+ options = arg
216
229
  end
217
- log_files
218
230
  end
231
+ [message, options]
232
+ end
233
+
234
+ # When running on an LSF client, the console log output is captured to a file. Color codings in files just
235
+ # add noise, so inhibit them in this case since it is not providing any visual benefit to the user
236
+ def color_unless_remote(msg, color)
237
+ if Origen.running_remotely?
238
+ msg
239
+ else
240
+ msg.send(color)
241
+ end
242
+ end
243
+
244
+ # Returns a logger instance that will send to the console
245
+ def console
246
+ @console ||= open_log(STDOUT)
247
+ end
248
+
249
+ # Returns a logger instance that will send to the log/last.txt file
250
+ def last_file
251
+ @last_file ||= begin
252
+ # Preserve one prior version of the log file
253
+ FileUtils.mv Log.log_file, "#{Log.log_file}.old" if File.exist?(Log.log_file)
254
+ open_log(Log.log_file)
255
+ end
256
+ end
257
+
258
+ # Sends the given method and arguments to all file logger instances
259
+ def log_files(method, *args)
260
+ # When running remotely on an LSF client, the LSF manager will capture STDOUT (i.e. the console log output)
261
+ # and save it to a log file.
262
+ # Don't write to the last log file in that case because we would have multiple processes all vying to
263
+ # write to it at the same time.
264
+ last_file.send(method, *args) unless Origen.running_remotely?
265
+ @job_file.send(method, *args) if @job_file
266
+ end
267
+
268
+ def open_log(file)
269
+ l = Logger.new(file)
270
+ l.formatter = proc do |severity, dateime, progname, msg|
271
+ msg
272
+ end
273
+ l
219
274
  end
220
275
 
221
276
  def relog(msg)
@@ -237,13 +292,9 @@ module Origen
237
292
  delta_t = '%0.3f' % delta_t
238
293
  delta_t0 = (log_time_1.to_f - @t0.to_f).round(6)
239
294
  delta_t0 = '%0.3f' % delta_t0
240
- msg = "[#{type}]".ljust(13) + "#{delta_t0}[#{delta_t}]".ljust(16) + "|| #{msg}"
295
+ msg = "[#{type}]".ljust(13) + "#{delta_t0}[#{delta_t}]".ljust(16) + "|| #{msg}\n"
241
296
  @log_time_0 = log_time_1
242
297
  msg
243
298
  end
244
-
245
- def format
246
- Log4r::PatternFormatter.new(pattern: '%m')
247
- end
248
299
  end
249
300
  end
@@ -140,6 +140,11 @@ module Origen
140
140
  @name = name
141
141
  @attributes = attributes
142
142
  @feature = attributes[:_feature] if attributes.key?(:_feature)
143
+
144
+ # Give reg.new a way to tell if coming from Placeholder
145
+ if attributes[:bit_info].is_a? Hash
146
+ attributes[:bit_info][:from_placeholder] = true
147
+ end
143
148
  end
144
149
 
145
150
  # Make this appear like a reg to any application code
@@ -68,13 +68,14 @@ module Origen
68
68
  @name = name
69
69
  @init_as_writable = options.delete(:init_as_writable)
70
70
  @define_file = options.delete(:define_file)
71
+ @from_placeholder = options.delete(:from_placeholder) || false
71
72
  REG_LEVEL_ATTRIBUTES.each do |attribute, _meta|
72
- if options[attribute[1..-1].to_sym]
73
+ if @from_placeholder
74
+ instance_variable_set("@#{attribute[1..-1]}", options.delete(attribute))
75
+ else
73
76
  # If register creation is coming directly from Reg.new, instead of Placeholder,
74
77
  # it may not have attributes with '_' prefix
75
78
  instance_variable_set("@#{attribute[1..-1]}", options.delete(attribute[1..-1].to_sym))
76
- else
77
- instance_variable_set("@#{attribute[1..-1]}", options.delete(attribute))
78
79
  end
79
80
  end
80
81
  @description_from_api = {}
@@ -330,7 +330,7 @@ module Origen
330
330
  Origen.log.debug "Initializing Git workspace at #{local}"
331
331
  git 'init'
332
332
  git 'remote remove origin', verbose: false, check_errors: false
333
- git "remote add origin #{remote}"
333
+ git "remote add origin #{remote}", check_errors: false
334
334
  end
335
335
  end
336
336
 
@@ -32,7 +32,12 @@ module Origen
32
32
  alias_method :orig_equal?, :==
33
33
 
34
34
  def equal?(version)
35
- condition_met?("== #{version}")
35
+ # If not a valid version string, compare using regular string comparison
36
+ if valid?
37
+ condition_met?("== #{version}")
38
+ else
39
+ orig_equal?(version)
40
+ end
36
41
  end
37
42
  alias_method :eq?, :equal?
38
43
  alias_method :==, :equal?
@@ -0,0 +1,77 @@
1
+ # This file was generated by Origen, any hand edits will likely get overwritten
2
+ # rubocop:disable all
3
+ module Origen
4
+ module Export1
5
+ def self.extended(model)
6
+ model.add_package :bga
7
+ model.add_package :pcs
8
+ model.add_pin :pinx
9
+ model.add_pin :piny, reset: :drive_hi, direction: :output, meta: { a: '1', b: 2 }
10
+ model.add_pin :tdo, packages: { bga: { location: 'BF32', dib_assignment: [10104] }, pcs: { location: 'BF30', dib_assignment: [31808] } }
11
+ model.add_pin :porta31
12
+ model.add_pin :porta30
13
+ model.add_pin :porta29
14
+ model.add_pin :porta28
15
+ model.add_pin :porta27
16
+ model.add_pin :porta26
17
+ model.add_pin :porta25
18
+ model.add_pin :porta24
19
+ model.add_pin :porta23
20
+ model.add_pin :porta22
21
+ model.add_pin :porta21
22
+ model.add_pin :porta20
23
+ model.add_pin :porta19
24
+ model.add_pin :porta18
25
+ model.add_pin :porta17
26
+ model.add_pin :porta16
27
+ model.add_pin :porta15
28
+ model.add_pin :porta14
29
+ model.add_pin :porta13
30
+ model.add_pin :porta12
31
+ model.add_pin :porta11
32
+ model.add_pin :porta10
33
+ model.add_pin :porta9
34
+ model.add_pin :porta8
35
+ model.add_pin :porta7
36
+ model.add_pin :porta6
37
+ model.add_pin :porta5
38
+ model.add_pin :porta4
39
+ model.add_pin :porta3
40
+ model.add_pin :porta2
41
+ model.add_pin :porta1
42
+ model.add_pin :porta0
43
+ model.add_pin :portb0
44
+ model.add_pin :portb1
45
+ model.add_pin :portb2
46
+ model.add_pin :portb3
47
+ model.add_pin :portb4
48
+ model.add_pin :portb5
49
+ model.add_pin :portb6
50
+ model.add_pin :portb7
51
+ model.add_pin :portb8
52
+ model.add_pin :portb9
53
+ model.add_pin :portb10
54
+ model.add_pin :portb11
55
+ model.add_pin :portb12
56
+ model.add_pin :portb13
57
+ model.add_pin :portb14
58
+ model.add_pin :portb15
59
+ model.add_pin_group :porta, :porta31, :porta30, :porta29, :porta28, :porta27, :porta26, :porta25, :porta24, :porta23, :porta22, :porta21, :porta20, :porta19, :porta18, :porta17, :porta16, :porta15, :porta14, :porta13, :porta12, :porta11, :porta10, :porta9, :porta8, :porta7, :porta6, :porta5, :porta4, :porta3, :porta2, :porta1, :porta0
60
+ model.add_pin_group :portb, :portb15, :portb14, :portb13, :portb12, :portb11, :portb10, :portb9, :portb8, :portb7, :portb6, :portb5, :portb4, :portb3, :portb2, :portb1, :portb0
61
+ model.pins(:portb).endian = :little
62
+ model.add_power_pin :vdd1, voltage: 3, current_limit: 0.05, meta: { min_voltage: 1.5 }
63
+ model.add_power_pin :vdd2
64
+ model.add_power_pin_group :vdd, :vdd1, :vdd2
65
+ model.add_ground_pin :gnd1
66
+ model.add_ground_pin :gnd2
67
+ model.add_ground_pin :gnd3
68
+ model.add_ground_pin_group :gnd, :gnd1, :gnd2, :gnd3
69
+ model.add_virtual_pin :relay1
70
+ model.add_virtual_pin :relay2, packages: { bga: {} }
71
+
72
+ model.sub_block :block1, file: 'origen/export1/block1.rb', dir: '/home/stephen/Code/github/origen/vendor/lib/models', lazy: true
73
+
74
+ end
75
+ end
76
+ end
77
+ # rubocop:enable all
@@ -0,0 +1,13 @@
1
+ # This file was generated by Origen, any hand edits will likely get overwritten
2
+ # rubocop:disable all
3
+ module Origen
4
+ module Export1
5
+ module Block1
6
+ def self.extended(model)
7
+ model.sub_block :x, file: 'origen/export1/block1/x.rb', dir: '/home/stephen/Code/github/origen/vendor/lib/models', lazy: true, base_address: 0x40000000
8
+
9
+ end
10
+ end
11
+ end
12
+ end
13
+ # rubocop:enable all
@@ -0,0 +1,27 @@
1
+ # This file was generated by Origen, any hand edits will likely get overwritten
2
+ # rubocop:disable all
3
+ module Origen
4
+ module Export1
5
+ module Block1
6
+ module X
7
+ def self.extended(model)
8
+ # ** Some Control Register **
9
+ # Blah, blah,
10
+ # and some more blah
11
+ model.add_reg :ctrl, 0x24, size: 16 do |reg|
12
+ reg.bit 7, :coco, access: :ro
13
+ reg.bit 6, :aien
14
+ # **Some Diff Bit** - This is a...
15
+ # blah, blah
16
+ #
17
+ # 0 | It's off
18
+ # 1 | It's on
19
+ reg.bit 5, :diff
20
+ reg.bit 4..0, :adch, reset: 0x1F
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ # rubocop:enable all
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.3
4
+ version: 0.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-17 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -234,26 +234,6 @@ dependencies:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
236
  version: '0.9'
237
- - !ruby/object:Gem::Dependency
238
- name: log4r
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - "~>"
242
- - !ruby/object:Gem::Version
243
- version: '1.1'
244
- - - "~>"
245
- - !ruby/object:Gem::Version
246
- version: 1.1.10
247
- type: :runtime
248
- prerelease: false
249
- version_requirements: !ruby/object:Gem::Requirement
250
- requirements:
251
- - - "~>"
252
- - !ruby/object:Gem::Version
253
- version: '1.1'
254
- - - "~>"
255
- - !ruby/object:Gem::Version
256
- version: 1.1.10
257
237
  - !ruby/object:Gem::Dependency
258
238
  name: scrub_rb
259
239
  requirement: !ruby/object:Gem::Requirement
@@ -635,6 +615,9 @@ files:
635
615
  - templates/shared/web/_logo.html
636
616
  - templates/time/filter.rb.erb
637
617
  - templates/time/rules.rb.erb
618
+ - vendor/lib/models/origen/export1.rb
619
+ - vendor/lib/models/origen/export1/block1.rb
620
+ - vendor/lib/models/origen/export1/block1/x.rb
638
621
  homepage: http://origen-sdk.org
639
622
  licenses:
640
623
  - MIT
@@ -655,7 +638,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
655
638
  version: 1.8.11
656
639
  requirements: []
657
640
  rubyforge_project:
658
- rubygems_version: 2.6.13
641
+ rubygems_version: 2.6.14.1
659
642
  signing_key:
660
643
  specification_version: 4
661
644
  summary: The Semiconductor Developer's Kit