origen 0.55.3 → 0.55.4

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
  SHA256:
3
- metadata.gz: 1012987b0791325b7cd6b4f636283f83453a086468ca1771308b436faabb14b8
4
- data.tar.gz: 7b5a00e51aa7fd4d9110479f93b1dc4753d58c01639be8f46d503ad1b1c7e7be
3
+ metadata.gz: 6cd7510b5f95a3f095e42e8cec614c0fe5dfa6dffa806e3a3b2002457a13c91a
4
+ data.tar.gz: 7b8a65cbd49762b5899223491a71c43f12a421ec2c9791ffbbcf8472d73e9446
5
5
  SHA512:
6
- metadata.gz: a0191bdaad28793964e97be82f27fcdd1ea4fd97704af92fa42df128e466c8438b0dba57e805144884b56e09045941ff65e03a4f0863c6e627e5af41d3efc830
7
- data.tar.gz: '09108ef06be15907321875c2f2aed6a5348896cc62e1590b3eac2c11081caef7877b7661c0b696cdbd882aeff99595c11ae0cf6346562fd200db68dfc28e5373'
6
+ metadata.gz: 9635a1f7bac9345cbf90eeeedf7e84f6a60f098c024aa75125e5e1c9465a3ac1e486b7f89c2d299b96f024558ef65dbbd7c24459c62d193b36cb03f83898b6b3
7
+ data.tar.gz: 0b86bd09959a6040b7738b884967b152d01c5fe8305a9361a7097f41beeaa9dc87c3b2baf3515eb721e1d60b73e72e5a19b6907dc55edbf585f03280de8956d9
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 55
4
- BUGFIX = 3
4
+ BUGFIX = 4
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -3,7 +3,7 @@ module Origen
3
3
  # A job is responsible for executing a single pattern source
4
4
  class Job # :nodoc: all
5
5
  attr_accessor :output_file_body, :pattern
6
- attr_reader :split_counter
6
+ attr_reader :split_counter, :split_names
7
7
  attr_reader :options
8
8
 
9
9
  def initialize(pattern, options)
@@ -23,9 +23,11 @@ module Origen
23
23
  @no_comments
24
24
  end
25
25
 
26
- def inc_split_counter
26
+ def inc_split_counter(name = '')
27
27
  @split_counter ||= 0
28
+ @split_names ||= ['']
28
29
  @split_counter += 1
30
+ @split_names << name
29
31
  end
30
32
 
31
33
  def requested_pattern
@@ -115,7 +117,11 @@ module Origen
115
117
 
116
118
  def split_number
117
119
  if split_counter
118
- "_part#{split_counter}"
120
+ if split_names[split_counter] != ''
121
+ "_#{split_names[split_counter]}"
122
+ else
123
+ "_part#{split_counter}"
124
+ end
119
125
  else
120
126
  ''
121
127
  end
@@ -221,8 +221,9 @@ module Origen
221
221
  # Each additional pattern section created by calling this method
222
222
  # will have '_partN' appended to the original pattern name.
223
223
  def split(options = {})
224
+ split_name = options.delete(:name) || ''
224
225
  pattern_close(options.merge(call_shutdown_callbacks: false))
225
- job.inc_split_counter
226
+ job.inc_split_counter(split_name)
226
227
  pattern_open(options.merge(call_startup_callbacks: false))
227
228
  end
228
229
 
@@ -232,6 +232,22 @@ module Origen
232
232
  end
233
233
  alias_method :children, :sub_blocks
234
234
 
235
+ # Returns a hash containing all sub block groups thus far added
236
+ # if no arguments given.
237
+ # If given a code block, will serve as alias to sub_block_group method.
238
+ # Does not handle arguments, no need at this time.
239
+ def sub_block_groups(*args, &block)
240
+ if block_given?
241
+ sub_block_group(*args, &block)
242
+ else
243
+ if args.empty?
244
+ @sub_block_groups ||= {}.with_indifferent_access
245
+ else
246
+ fail 'sub_block_groups not meant to take arguments!'
247
+ end
248
+ end
249
+ end
250
+
235
251
  # Delete all sub_blocks by emptying the Hash
236
252
  def delete_sub_blocks
237
253
  @sub_blocks = {}
@@ -309,7 +325,7 @@ module Origen
309
325
  Origen.log.warning "The sub_block defined at #{Pathname.new(callers[0]).relative_path_from(Pathname.pwd)}:#{callers[1]} is overriding an existing method called #{name}"
310
326
  end
311
327
  define_singleton_method name do
312
- get_sub_block(name)
328
+ sub_blocks[name]
313
329
  end
314
330
  if sub_blocks[name] && sub_blocks[name].is_a?(Placeholder)
315
331
  sub_blocks[name].add_attributes(options)
@@ -362,21 +378,24 @@ module Origen
362
378
  callers = Origen.split_caller_line caller[0]
363
379
  Origen.log.warning "The sub_block_group defined at #{Pathname.new(callers[0]).relative_path_from(Pathname.pwd)}:#{callers[1]} is overriding an existing method called #{id}"
364
380
  end
381
+ # Define a singleton method which will be called every time the sub_block_group is referenced
382
+ # This is not called here but later when referenced
365
383
  define_singleton_method "#{id}" do
366
- if options[:class_name]
367
- b = Object.const_get(options[:class_name]).new
368
- else
369
- b = []
370
- end
371
- my_group.each do |group_id|
372
- b << send(group_id)
373
- end
374
- b # return array inside new singleton method
384
+ sub_block_groups[id]
385
+ end
386
+ # Instantiate group
387
+ if options[:class_name]
388
+ b = Object.const_get(options[:class_name]).new
389
+ else
390
+ b = [] # Will use Array if no class defined
375
391
  end
392
+ # Add sub_blocks to group
393
+ my_group.each do |group_id|
394
+ b << send(group_id)
395
+ end
396
+ sub_block_groups[id] = b
376
397
  @current_group = nil # close group
377
398
  end
378
- alias_method :sub_block_groups, :sub_block_group
379
- alias_method :sub_blocks_groups, :sub_block_group
380
399
  alias_method :sub_blocks_group, :sub_block_group
381
400
 
382
401
  def namespace
@@ -385,10 +404,6 @@ module Origen
385
404
 
386
405
  private
387
406
 
388
- def get_sub_block(name)
389
- sub_blocks[name]
390
- end
391
-
392
407
  def instantiate_sub_block(name, klass, options)
393
408
  return sub_blocks[name] unless sub_blocks[name].is_a?(Placeholder)
394
409
  sub_blocks[name] = klass.new(options.merge(parent: self, name: name))
@@ -8,16 +8,16 @@ Gem::Specification.new do |s|
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Stephen McGinty".freeze]
11
- s.date = "2020-03-10"
11
+ s.date = "2020-03-30"
12
12
  s.email = ["stephen.f.mcginty@gmail.com".freeze]
13
13
  s.files = ["bin/boot.rb".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/new_app_tests.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/test_engineering/common.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/app".freeze, "templates/app_generators/application/app/blocks".freeze, "templates/app_generators/application/app/blocks/top_level.rb".freeze, "templates/app_generators/application/app/lib".freeze, "templates/app_generators/application/app/lib/module.rb".freeze, "templates/app_generators/application/app/templates".freeze, "templates/app_generators/application/app/templates/web".freeze, "templates/app_generators/application/app/templates/web/index.md.erb".freeze, "templates/app_generators/application/app/templates/web/layouts".freeze, "templates/app_generators/application/app/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/app/templates/web/partials".freeze, "templates/app_generators/application/app/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/app/templates/web/release_notes.md.erb".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/spec".freeze, "templates/app_generators/application/spec/spec_helper.rb".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/app".freeze, "templates/app_generators/plugin/app/templates".freeze, "templates/app_generators/plugin/app/templates/web".freeze, "templates/app_generators/plugin/app/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/environment".freeze, "templates/app_generators/test_engineering/environment/j750.rb".freeze, "templates/app_generators/test_engineering/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/.keep".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/.keep".freeze]
14
14
  s.homepage = "http://origen-sdk.org/origen_app_generators".freeze
15
15
  s.licenses = ["MIT".freeze]
16
16
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze)
17
- s.rubygems_version = "3.0.1".freeze
17
+ s.rubygems_version = "2.7.7".freeze
18
18
  s.summary = "Origen application generators".freeze
19
19
 
20
- s.installed_by_version = "3.0.1" if s.respond_to? :installed_by_version
20
+ s.installed_by_version = "2.7.7" if s.respond_to? :installed_by_version
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 4
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.55.3
4
+ version: 0.55.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-10 00:00:00.000000000 Z
11
+ date: 2020-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -749,7 +749,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
749
749
  - !ruby/object:Gem::Version
750
750
  version: 1.8.11
751
751
  requirements: []
752
- rubygems_version: 3.0.1
752
+ rubyforge_project:
753
+ rubygems_version: 2.7.7
753
754
  signing_key:
754
755
  specification_version: 4
755
756
  summary: The Semiconductor Developer's Kit