origen 0.58.0 → 0.59.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: 4e328347b1a702ec37c86bbf6dbc0d65c9bf9376479fca31e4adc5208043f749
4
- data.tar.gz: c72f5d3bbddbe4d4374450a828db82b14c3af5ea1177366e3cb62b2051037115
3
+ metadata.gz: 16b5e4aa6124b67155547b10129eab41ef8c875bdaff3699bb14e404bd92d9f5
4
+ data.tar.gz: aafc5587e6a436d9e2418ca2fee24a5a8733b7fb63e8ffe082c4dd37d8f250b8
5
5
  SHA512:
6
- metadata.gz: 441978473ed06d1df7f8ba36cd6734e5057de398846b7be6856c14e1d8a4973cc8d896958ab70dc69dccb44dea85012264006069afb50ec5406324c016841554
7
- data.tar.gz: 21a81041aa01df9774cb94303e016460b070c7c9f296a5297148018c9d314a995ade0aa3432b959232bb70c524fe4249eb7912ecdf7798f273f46cfe3f493a4f
6
+ metadata.gz: a728c16c96cd708cdd9cab9125ee83a2613105b47485b3345d036e6cb6050839563530890edf0550cbcd941812edfa2b5685514aaccd96804f248b4abc1f1683
7
+ data.tar.gz: 856a497042c8fedce4e3977fd45661b4a758331eca93642842fb2b8b47c9a336ec2c71bc30b234c8a6d6e5327da2a93d9ef081143f4e8abcec75b159146e0710
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
- MINOR = 58
4
- BUGFIX = 0
3
+ MINOR = 59
4
+ BUGFIX = 4
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -2,6 +2,18 @@ module Origen
2
2
  module Controller
3
3
  extend ActiveSupport::Concern
4
4
 
5
+ # Workaround due to reserved keywords in Ruby, Display in the case below.
6
+ def display
7
+ # If the DUT responds to a sub_block "display" return the sub_block
8
+ if model.sub_blocks.include? 'display'
9
+ Origen.log.debug "Found a sub_block \'display\', passing control to the #{model.class}..."
10
+ model.sub_blocks['display']
11
+ else
12
+ # Else, pass control to the ruby core.
13
+ super
14
+ end
15
+ end
16
+
5
17
  module ClassMethods
6
18
  def model(options = {})
7
19
  options[:controller_class] = self
@@ -22,8 +22,8 @@ module Origen
22
22
  # before falling back to a default
23
23
  PACKAGE_SCOPED_ATTRIBUTES = [:location, :dib_assignment, :dib_meta]
24
24
 
25
- # Pin Types
26
- TYPES = [:analog, :digital]
25
+ # Pin Types, 'digital' and 'analog' are legacy types kept for backwards compatibility
26
+ TYPES = [:digital, :analog, :signal, :ground, :power, :virtual]
27
27
 
28
28
  attr_accessor :order
29
29
  # Inverts pin states for drive and compare, can be useful if a timing set change requires clocks to drive low for example when all pattern logic has been set up to drive them high.
@@ -90,7 +90,7 @@ module Origen
90
90
  @open_drain = options[:open_drain]
91
91
  @ext_pullup = options[:ext_pullup]
92
92
  @ext_pulldown = options[:ext_pulldown]
93
- @type = options[:type]
93
+ @type = options[:type].nil? ? determine_type : options[:type]
94
94
  @dib_assignment = [] # Array to handle multi-site testing
95
95
  @size = 1
96
96
  @value = 0
@@ -1183,6 +1183,17 @@ module Origen
1183
1183
 
1184
1184
  private
1185
1185
 
1186
+ def determine_type
1187
+ class_type = self.class.to_s.split('::').last.downcase
1188
+ if class_type == 'pin'
1189
+ return :signal
1190
+ else
1191
+ pin_type_match = class_type.match(/^(\S+)pin$/)
1192
+ return if pin_type_match.nil?
1193
+ pin_type_match[1].to_sym
1194
+ end
1195
+ end
1196
+
1186
1197
  def primary_group=(group)
1187
1198
  @primary_group = group
1188
1199
  end
@@ -416,9 +416,10 @@ module Origen
416
416
  # Load any centralized site configs now.
417
417
  centralized_site_config = find_val('centralized_site_config')
418
418
  if centralized_site_config
419
- # We know the last two site configs will exists (they are in Origen core) and that they contain the default
420
- # values. We want the centralized config to load right after those.
421
- @configs.insert(-3, Config.new(path: centralized_site_config, parent: self))
419
+ # The first site configs found will exist in Origen core, and they contain the default values.
420
+ # We want the centralized config to load right after those.
421
+ centralized_index = -(@configs.select { |c| c.path.start_with?(Origen.top.to_s) }.size + 1)
422
+ @configs.insert(centralized_index, Config.new(path: centralized_site_config, parent: self))
422
423
  end
423
424
 
424
425
  # After all configs have been populated, see if the centralized needs refreshing
@@ -15,9 +15,14 @@ module Origen
15
15
  HOST = Origen.site_config.ldap_host
16
16
  PORT = Origen.site_config.ldap_port
17
17
  BASE_DN = Origen.site_config.ldap_base_dn
18
+ LDAP_ENCRYPTION = Origen.site_config.ldap_encryption
19
+
20
+ if LDAP_ENCRYPTION.nil?
21
+ LDAP_ENCRYPTION = 'simple_tls'
22
+ end
18
23
 
19
24
  def available?
20
- !!(SERVICE_ACCOUNT && SERVICE_PASS && HOST && PORT && BASE_DN)
25
+ !!(SERVICE_ACCOUNT && SERVICE_PASS && HOST && PORT && BASE_DN && LDAP_ENCRYPTION)
21
26
  end
22
27
 
23
28
  # Lookup the given user in the core directory and return an object representing the user's entry
@@ -57,7 +62,8 @@ module Origen
57
62
  def service
58
63
  @service ||= Net::LDAP.new host: HOST,
59
64
  port: PORT,
60
- encryption: { method: :simple_tls },
65
+ base: BASE_DN,
66
+ encryption: LDAP_ENCRYPTION,
61
67
  auth: { method: :simple, username: SERVICE_ACCOUNT, password: SERVICE_PASS }
62
68
  end
63
69
  end
@@ -8,7 +8,7 @@ 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-09-01"
11
+ s.date = "2020-11-19"
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
@@ -1,14 +1,27 @@
1
1
  require 'rspec/core/formatters/base_formatter'
2
2
 
3
3
  class OrigenFormatter < RSpec::Core::Formatters::BaseFormatter
4
-
5
- def dump_summary(duration, example_count, failure_count, pending_count)
6
- if failure_count > 0
7
- Origen.app.stats.report_fail
8
- else
9
- Origen.app.stats.report_pass
4
+ rspec_version = RSpec.constants.include?(:Version) ? RSpec::Version::STRING : RSpec::Core::Version::STRING
5
+ if Gem::Version.new(rspec_version) < Gem::Version.new('3.0.0')
6
+ # legacy formatter
7
+ def dump_summary(duration, example_count, failure_count, pending_count)
8
+ if failure_count > 0
9
+ Origen.app.stats.report_fail
10
+ else
11
+ Origen.app.stats.report_pass
12
+ end
13
+ super(duration, example_count, failure_count, pending_count)
14
+ end
15
+ else
16
+ # RSpec 3 API
17
+ RSpec::Core::Formatters.register self, :dump_summary
18
+ def dump_summary(summary)
19
+ puts
20
+ if summary.failed_examples.size > 0
21
+ Origen.app.stats.report_fail
22
+ else
23
+ Origen.app.stats.report_pass
24
+ end
10
25
  end
11
- super(duration, example_count, failure_count, pending_count)
12
26
  end
13
-
14
27
  end
@@ -15,7 +15,15 @@ class <%= @namespaces.map { |n| camelcase(n[1]) }.join('::') %>::<%= camelcase(@
15
15
  include Origen::Model
16
16
  <% end -%>
17
17
 
18
- <% end -%>
19
18
  def initialize(options = {})
20
19
  end
20
+ <% else -%>
21
+ # super means that the initialize request will get passed onto the parent class's initialize method.
22
+ # i.e. the one defined in <%= @parent_class %>
23
+ # If you want to override that and add a specific implementation for this DUT type,
24
+ # then simply delete the super below and add the code you wish to handle the request.
25
+ def initialize(options = {})
26
+ super
27
+ end
28
+ <% end -%>
21
29
  end
@@ -5,69 +5,69 @@ module Origen
5
5
  def self.extended(model)
6
6
  model.add_package :bga
7
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
8
+ model.add_pin :pinx, type: :signal
9
+ model.add_pin :piny, reset: :drive_hi, direction: :output, type: :signal, meta: { a: '1', b: 2 }
10
+ model.add_pin :tdo, type: :signal, packages: { bga: { location: "BF32", dib_assignment: [10104] }, pcs: { location: "BF30", dib_assignment: [31808] } }
11
+ model.add_pin :porta31, type: :signal
12
+ model.add_pin :porta30, type: :signal
13
+ model.add_pin :porta29, type: :signal
14
+ model.add_pin :porta28, type: :signal
15
+ model.add_pin :porta27, type: :signal
16
+ model.add_pin :porta26, type: :signal
17
+ model.add_pin :porta25, type: :signal
18
+ model.add_pin :porta24, type: :signal
19
+ model.add_pin :porta23, type: :signal
20
+ model.add_pin :porta22, type: :signal
21
+ model.add_pin :porta21, type: :signal
22
+ model.add_pin :porta20, type: :signal
23
+ model.add_pin :porta19, type: :signal
24
+ model.add_pin :porta18, type: :signal
25
+ model.add_pin :porta17, type: :signal
26
+ model.add_pin :porta16, type: :signal
27
+ model.add_pin :porta15, type: :signal
28
+ model.add_pin :porta14, type: :signal
29
+ model.add_pin :porta13, type: :signal
30
+ model.add_pin :porta12, type: :signal
31
+ model.add_pin :porta11, type: :signal
32
+ model.add_pin :porta10, type: :signal
33
+ model.add_pin :porta9, type: :signal
34
+ model.add_pin :porta8, type: :signal
35
+ model.add_pin :porta7, type: :signal
36
+ model.add_pin :porta6, type: :signal
37
+ model.add_pin :porta5, type: :signal
38
+ model.add_pin :porta4, type: :signal
39
+ model.add_pin :porta3, type: :signal
40
+ model.add_pin :porta2, type: :signal
41
+ model.add_pin :porta1, type: :signal
42
+ model.add_pin :porta0, type: :signal
43
+ model.add_pin :portb0, type: :signal
44
+ model.add_pin :portb1, type: :signal
45
+ model.add_pin :portb2, type: :signal
46
+ model.add_pin :portb3, type: :signal
47
+ model.add_pin :portb4, type: :signal
48
+ model.add_pin :portb5, type: :signal
49
+ model.add_pin :portb6, type: :signal
50
+ model.add_pin :portb7, type: :signal
51
+ model.add_pin :portb8, type: :signal
52
+ model.add_pin :portb9, type: :signal
53
+ model.add_pin :portb10, type: :signal
54
+ model.add_pin :portb11, type: :signal
55
+ model.add_pin :portb12, type: :signal
56
+ model.add_pin :portb13, type: :signal
57
+ model.add_pin :portb14, type: :signal
58
+ model.add_pin :portb15, type: :signal
59
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
60
  model.add_pin_group :portb, :portb15, :portb14, :portb13, :portb12, :portb11, :portb10, :portb9, :portb8, :portb7, :portb6, :portb5, :portb4, :portb3, :portb2, :portb1, :portb0
61
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
62
+ model.add_power_pin :vdd1, type: :power, voltage: 3, current_limit: 0.05, meta: { min_voltage: 1.5 }
63
+ model.add_power_pin :vdd2, type: :power
64
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
65
+ model.add_ground_pin :gnd1, type: :ground
66
+ model.add_ground_pin :gnd2, type: :ground
67
+ model.add_ground_pin :gnd3, type: :ground
68
68
  model.add_ground_pin_group :gnd, :gnd1, :gnd2, :gnd3
69
- model.add_virtual_pin :relay1
70
- model.add_virtual_pin :relay2, packages: { bga: {} }
69
+ model.add_virtual_pin :relay1, type: :virtual
70
+ model.add_virtual_pin :relay2, type: :virtual, packages: { bga: {} }
71
71
 
72
72
  model.sub_block :block1, file: 'origen/export1/block1.rb', dir: "#{Origen.root!}/vendor/lib/models", lazy: true
73
73
 
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.58.0
4
+ version: 0.59.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-09-06 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport