origen 0.5.8 → 0.5.9

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: f23605859c980dd6d2640897a4245aad8906766c
4
- data.tar.gz: 2e771418b57f561353455cfff1ae6018124742c5
3
+ metadata.gz: ed45b25fc195c61acaf99010cbee3f3fe032eb32
4
+ data.tar.gz: 58dd3f0356d71f526f53c6ae8aabd7c2cfa8f3e4
5
5
  SHA512:
6
- metadata.gz: 2c4ad2bba1cfbc00dba89d9764f0276d846039286e15378c6cdb11d25c19a25f729057583a6c23c24decbfbd3f75052d8ad5ffa061e0d2d36fb3b11511d57076
7
- data.tar.gz: 87b0b8ae625116e81cd673f1e7384d23de2b6be4d5f6195ee11f99f7b3885bed74eb6996e19f09759a32dc159f6a4a832a9f1668098abccae447d5ff83c6f0e5
6
+ metadata.gz: 11a43e23e9331325d3bf54a447d1bb14f3c1f4a67d981ae11f912c0a41dc631d6981cea479aeabf458e0881ef66bda2714b8a835dedf03aa44aff28541aca4ec
7
+ data.tar.gz: 6ce6af41232ab71e1f1608f653b07ec181a02aaebff4b787a47f67c38add2972b0c95edff793295d165cad6517bcb85807976968ee98dce76e874fdb0ca3b0db
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 5
4
- BUGFIX = 8
4
+ BUGFIX = 9
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
File without changes
@@ -169,10 +169,12 @@ end
169
169
  # overloading of Origen commands by the application.
170
170
  @application_options = []
171
171
  @plugin_commands = []
172
- @application_commands = []
172
+ # Prevent plugins from being able to accidentally override app commands
173
+ # @application_commands = []
173
174
  app_id = @application_options.object_id
174
175
  plugin_id = @plugin_commands.object_id
175
- app_cmd_id = @application_commands.object_id
176
+ # Prevent plugins from being able to accidentally override app commands
177
+ # app_cmd_id = @application_commands.object_id
176
178
  app_opt_err = false
177
179
  plugin_opt_err = false
178
180
  app_cmd_err = false
@@ -191,6 +193,8 @@ if File.exist? "#{Origen.root}/config/commands.rb"
191
193
  plugin_opt_err = true
192
194
  end
193
195
  end
196
+ # Only the app can set this, so cache it locally prevent any plugins overriding it
197
+ application_commands = @application_commands || ''
194
198
 
195
199
  shared_commands = Origen.app.plugins.shared_commands
196
200
  if shared_commands && shared_commands.size != 0
@@ -327,6 +327,8 @@ module Origen
327
327
  @reference_directory = relative_to_absolute(options[:reference])
328
328
  else
329
329
  @reference_directory = Pathname.new(Origen.config.reference_directory)
330
+ # Create the reference output directory if it does not exist.
331
+ FileUtils.mkdir_p(@reference_directory) unless @reference_directory.exist?
330
332
  end
331
333
  if options[:create]
332
334
  # Delete any broken symlinks in the top level .ref
@@ -77,6 +77,11 @@ module Origen
77
77
  yield options
78
78
  wait_for_completion(options) if options[:uses_lsf]
79
79
  summarize_results(options)
80
+
81
+ # call exit code false to force process fail
82
+ unless Origen.app.stats.clean_run?
83
+ exit 1
84
+ end
80
85
  end
81
86
  end
82
87
 
@@ -225,7 +230,12 @@ module Origen
225
230
  puts "Valid values are 'latest', 'last' (production release), or a tag."
226
231
  end
227
232
  puts ''
228
- get_text(default: Origen.app.version, single: true)
233
+ v = VersionString.new(get_text(default: Origen.app.version, single: true))
234
+ if v.semantic?
235
+ v.prefixed
236
+ else
237
+ v
238
+ end
229
239
  end
230
240
 
231
241
  def version_to_tag(version)
@@ -238,7 +238,10 @@ module Origen
238
238
  else
239
239
  rem = remote
240
240
  end
241
- !git("ls-remote --heads #{rem} #{str}", verbose: false).empty?
241
+ # check if matches 40 digit hex string followed by branch name
242
+ git("ls-remote --heads #{remote} #{str}", verbose: false).any? do |line|
243
+ line =~ /^[0-9a-f]{40}\s+[a-zA-Z]/
244
+ end
242
245
  end
243
246
 
244
247
  def initialized?
data/lib/origen/specs.rb CHANGED
@@ -14,7 +14,11 @@ module Origen
14
14
 
15
15
  attr_accessor :_specs, :_notes, :_exhibits, :_doc_resources, :_overrides, :_power_supplies, :_mode_selects, :_version_history, :_creation_info
16
16
 
17
- SPEC_TYPES = [:dc, :ac, :temperature, :supply]
17
+ # Detailed description for the ip block
18
+ attr_accessor :description
19
+
20
+ # Added :impedance and :power to the spec types
21
+ SPEC_TYPES = [:dc, :ac, :temperature, :supply, :impedance, :power]
18
22
 
19
23
  NOTE_TYPES = [:spec, :doc, :mode, :feature, :sighting]
20
24
 
@@ -158,10 +162,10 @@ module Origen
158
162
  @_power_supplies[gen][act] = Power_Supply.new(gen, act)
159
163
  end
160
164
 
161
- def mode_select(blk, use, mode_ref, support, loc)
165
+ def mode_select(block_information, mode_usage, power_information)
162
166
  _mode_selects
163
- if use
164
- @_mode_selects[blk][mode_ref] = Mode_Select.new(blk, use, mode_ref, support, loc)
167
+ if block_information[:usage]
168
+ @_mode_selects[block_information[:name]][mode_usage[:mode]] = Mode_Select.new(block_information, mode_usage, power_information)
165
169
  end
166
170
  end
167
171
 
@@ -421,7 +425,7 @@ module Origen
421
425
  fail 'Hash argument is not a Hash!' unless hash.is_a? Hash
422
426
  filtered_hash = {}
423
427
  select_logic = case filter
424
- when String then 'k[Regexp.new(filter)]'
428
+ when String then 'k[Regexp.new(filter)] && k.length == filter.length'
425
429
  when (Fixnum || Integer || Float || Numeric) then "k[Regexp.new('#{filter}')]"
426
430
  when Regexp then 'k[filter]'
427
431
  when Symbol then
@@ -2,7 +2,7 @@ module Origen
2
2
  module Specs
3
3
  # Ruby Data Class that contains Creation Information for the IP Block
4
4
  class Creation_Info
5
- attr_accessor :author, :date, :revision, :source, :tool, :tool_version, :ip_version
5
+ attr_accessor :author, :date, :revision, :source, :tool, :tool_version, :ip_version, :ip_block_name
6
6
 
7
7
  # Initialize the Creation Info block to store data for latest version of the file.
8
8
  #
@@ -12,8 +12,9 @@ module Origen
12
12
  # * date # Date that the File was released to Downstream Audiences
13
13
  # ==== Source Information
14
14
  #
15
- # * :revision # Revision Information
16
- # * :source # Where the Information came from
15
+ # * :revision # Revision Information
16
+ # * :source # Where the Information came from
17
+ # * :ip_block_name # Block Name for the IP. e.g. DDR for DDRC1, DDRC2; I2C for I2C1, I2C2
17
18
  #
18
19
  # ==== Tool Info
19
20
  #
@@ -29,6 +30,7 @@ module Origen
29
30
  @ip_version = ip_version
30
31
  @revision = src_info[:revision]
31
32
  @source = src_info[:source]
33
+ @ip_block_name = src_info[:ip_block_name]
32
34
  @tool = tool_info[:tool]
33
35
  @tool_version = tool_info[:version]
34
36
  end
@@ -132,7 +132,7 @@ module Origen
132
132
  end # unless @before_table.nil? && @after_table.nil?
133
133
  end # xml.doc_resource
134
134
  end # doc_resource_ml = Nokogiri::
135
- doc_resource_ml
135
+ doc_resource_ml.doc.at_xpath('doc_resource').to_xml
136
136
  end # to_xml
137
137
  end
138
138
  end
File without changes
@@ -2,14 +2,58 @@ module Origen
2
2
  module Specs
3
3
  # This class is used to store mode select for IP
4
4
  class Mode_Select
5
- attr_accessor :block, :usage, :mode, :supported, :location
6
-
7
- def initialize(blk, use, mode_ref, support, loc)
8
- @block = blk
9
- @usage = use
10
- @mode = mode_ref
11
- @supported = support
12
- @location = loc
5
+ # Block Name at the SoC (e.g. DDRC1, DDRC2, DDRC3)
6
+ attr_accessor :block
7
+
8
+ # Data Sheet Header/Group Name
9
+ attr_accessor :ds_header
10
+
11
+ # Block Use at the SoC Level
12
+ attr_accessor :usage
13
+
14
+ # Mode Reference Name
15
+ attr_accessor :mode
16
+
17
+ # SoC Supports this mode?
18
+ attr_accessor :supported
19
+
20
+ # SoC Supply List
21
+ attr_accessor :supply
22
+
23
+ # SoC Supply Voltage Level
24
+ attr_accessor :supply_level
25
+
26
+ # Use Information from different data source
27
+ attr_accessor :diff_loc
28
+
29
+ # Location of the block to read
30
+ attr_accessor :location
31
+
32
+ # There are three sub-blocks of information in Mode Select
33
+ # * block_information:
34
+ # ** name : The name of the block as instiniated in the SoC
35
+ # ** ds_header: Data Sheet Header/Group. Allows for multiple instantation to be grouped under one header in datasheet or allows for them to broken out
36
+ # ** usage: Block is used in this SoC {Could be starting point for license plate support}
37
+ # ** location: File path to the specml location
38
+ #
39
+ # * mode_usage:
40
+ # ** mode: The mode name at the IP Level
41
+ # ** usage: Does this IP in this SoC support this mode?
42
+ #
43
+ # * power_information:
44
+ # ** supply: Name of the supply for that Interface.
45
+ # ** voltage_level: Array of the possible values for this supply e.g. [1.8, 2.5, 3.3] or [1.8]
46
+ # ** use_diff: Use information from a different location
47
+ def initialize(block_information, mode_usage, power_information)
48
+ @block = block_information[:name]
49
+ @ds_header = block_information[:ds_header]
50
+ @usage = block_information[:usage]
51
+ @location = block_information[:location]
52
+ @mode = mode_usage[:mode]
53
+ @supported = mode_usage[:supported]
54
+ @supply = power_information[:supply]
55
+ @supply_level = power_information[:voltage_level]
56
+ @diff_loc = power_information[:use_diff]
13
57
  end
14
58
  end
15
59
  end
File without changes
@@ -2,11 +2,45 @@ module Origen
2
2
  module Specs
3
3
  # This class is used to store Power Supply Information at the SoC Level
4
4
  class Power_Supply
5
- attr_accessor :generic, :actual
5
+ # Generic Power Supply Name. For example:
6
+ # * GVDD
7
+ # * DVDD
8
+ # * TVDD
9
+ # * EVDD
10
+ attr_accessor :generic
6
11
 
12
+ # The Actual Power Supply Name. For example, GVDD could be the generic name and actual names can be G1VDD and G2VDD.
13
+ # GVDD ==> {G1VDD, G2VDD, G3VDD}
14
+ # DVDD ==> {D1VDD, D2VDD}
15
+ attr_accessor :actual
16
+
17
+ # Voltages for the power supply. Needs to be supplied by a different source
18
+ # Voltages is an array for all possible values for that power supply
19
+ # DVDD ==>
20
+ # * 1.8 V
21
+ # * 3.3 V
22
+ attr_accessor :voltages
23
+
24
+ # Display Name for the Voltage. Will be in html/dita code
25
+ # G1VDD --> G1V<sub>DD</sub>
26
+ attr_accessor :display_name
27
+
28
+ # Input Display Name for the Voltage
29
+ # G1VDD --> G1V<sub>IN</sub>
30
+ attr_accessor :input_display_name
31
+
32
+ # Output Displat Name for the Voltage
33
+ # G1VDD --> G1V<sub>OUT</sub>
34
+ attr_accessor :output_display_name
35
+
36
+ # Initialize the variables
7
37
  def initialize(gen, act)
8
38
  @generic = gen
9
39
  @actual = act
40
+ @voltages = []
41
+ @display_name = ''
42
+ @input_display_name = ''
43
+ @output_display_name = ''
10
44
  end
11
45
  end
12
46
  end
@@ -9,6 +9,6 @@ module Origen
9
9
  @author = author
10
10
  @changes = changes
11
11
  end
12
- end
13
- end
14
- end
12
+ end # class Version History
13
+ end # module Specs
14
+ end # module Origen
@@ -57,7 +57,7 @@ module Origen
57
57
  def service
58
58
  @service ||= Net::LDAP.new host: HOST,
59
59
  port: PORT,
60
- encryption: :simple_tls,
60
+ encryption: { method: :simple_tls },
61
61
  auth: { method: :simple, username: SERVICE_ACCOUNT, password: SERVICE_PASS }
62
62
  end
63
63
  end
@@ -3,6 +3,12 @@ module Origen
3
3
  include Utility::TimeAndDate
4
4
  require 'date'
5
5
 
6
+ # returns version number string but strips out prefix
7
+ def initialize(version, prefix = 'v')
8
+ version.gsub!(/^#{prefix}/, '') # remove leading prefix
9
+ super(version)
10
+ end
11
+
6
12
  # Returns a new production timestamp version string
7
13
  def self.production_timestamp
8
14
  VersionString.new("Rel#{time_now(format: :universal, include_time: false)}")
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.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.9'
47
+ version: '0.13'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.9'
54
+ version: '0.13'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: httparty
57
57
  requirement: !ruby/object:Gem::Requirement