origen 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ctags +0 -0
- data/bin/origen +165 -1
- data/bin/rgen +2 -0
- data/config/application.rb +141 -0
- data/config/commands.rb +72 -0
- data/config/development.rb +7 -0
- data/config/environment.rb +0 -0
- data/config/rgen.policy +7 -0
- data/config/rubocop/easy.yml +620 -0
- data/config/rubocop/easy_disabled.yml +271 -0
- data/config/rubocop/easy_enabled.yml +731 -0
- data/config/rubocop/strict.yml +620 -0
- data/config/rubocop/strict_disabled.yml +247 -0
- data/config/rubocop/strict_enabled.yml +755 -0
- data/config/users.rb +20 -0
- data/config/version.rb +1 -1
- data/helpers/url.rb +68 -0
- data/lib/c99/doc_interface.rb +56 -0
- data/lib/c99/j750_interface.rb +85 -0
- data/lib/c99/nvm.rb +89 -0
- data/lib/c99/target/mock2.rb +1 -0
- data/lib/c99/target/subdir/mock3.rb +1 -0
- data/lib/option_parser/optparse.rb +12 -0
- data/lib/origen/acronyms.rb +60 -0
- data/lib/origen/application/command_dispatcher.rb +12 -0
- data/lib/origen/application/configuration.rb +206 -0
- data/lib/origen/application/configuration_manager.rb +78 -0
- data/lib/origen/application/deployer.rb +367 -0
- data/lib/origen/application/environment.rb +186 -0
- data/lib/origen/application/lsf.rb +145 -0
- data/lib/origen/application/lsf_manager.rb +657 -0
- data/lib/origen/application/plugins_manager.rb +280 -0
- data/lib/origen/application/release.rb +359 -0
- data/lib/origen/application/runner.rb +246 -0
- data/lib/origen/application/statistics.rb +191 -0
- data/lib/origen/application/target.rb +374 -0
- data/lib/origen/application/version_tracker.rb +59 -0
- data/lib/origen/application/workspace_manager.rb +151 -0
- data/lib/origen/application.rb +746 -0
- data/lib/origen/bugs/bug.rb +36 -0
- data/lib/origen/bugs.rb +45 -0
- data/lib/origen/callbacks.rb +35 -0
- data/lib/origen/chip_mode.rb +118 -0
- data/lib/origen/chip_package.rb +461 -0
- data/lib/origen/client.rb +87 -0
- data/lib/origen/code_generators/actions.rb +258 -0
- data/lib/origen/code_generators/base.rb +57 -0
- data/lib/origen/code_generators/bundler.rb +17 -0
- data/lib/origen/code_generators/gem_setup.rb +49 -0
- data/lib/origen/code_generators/rake.rb +13 -0
- data/lib/origen/code_generators/rspec.rb +12 -0
- data/lib/origen/code_generators/semver.rb +39 -0
- data/lib/origen/code_generators/timever.rb +37 -0
- data/lib/origen/code_generators.rb +111 -0
- data/lib/origen/commands/add.rb +12 -0
- data/lib/origen/commands/compile.rb +62 -0
- data/lib/origen/commands/ctags.rb +9 -0
- data/lib/origen/commands/dispatch.rb +22 -0
- data/lib/origen/commands/environment.rb +11 -0
- data/lib/origen/commands/fetch.rb +63 -0
- data/lib/origen/commands/generate.rb +130 -0
- data/lib/origen/commands/interactive.rb +73 -0
- data/lib/origen/commands/lint.rb +82 -0
- data/lib/origen/commands/lsf.rb +93 -0
- data/lib/origen/commands/merge.rb +55 -0
- data/lib/origen/commands/modifications.rb +12 -0
- data/lib/origen/commands/new.rb +113 -0
- data/lib/origen/commands/plugin.rb +105 -0
- data/lib/origen/commands/program.rb +70 -0
- data/lib/origen/commands/rc.rb +442 -0
- data/lib/origen/commands/save.rb +56 -0
- data/lib/origen/commands/target.rb +27 -0
- data/lib/origen/commands/time.rb +127 -0
- data/lib/origen/commands/version.rb +17 -0
- data/lib/origen/commands/web.rb +221 -0
- data/lib/origen/commands.rb +272 -0
- data/lib/origen/commands_global.rb +76 -0
- data/lib/origen/controller.rb +94 -0
- data/lib/origen/core_ext/array.rb +23 -0
- data/lib/origen/core_ext/bignum.rb +36 -0
- data/lib/origen/core_ext/enumerable.rb +76 -0
- data/lib/origen/core_ext/fixnum.rb +46 -0
- data/lib/origen/core_ext/hash.rb +52 -0
- data/lib/origen/core_ext/module.rb +14 -0
- data/lib/origen/core_ext/numeric.rb +126 -0
- data/lib/origen/core_ext/object.rb +13 -0
- data/lib/origen/core_ext/range.rb +7 -0
- data/lib/origen/core_ext/string.rb +124 -0
- data/lib/origen/core_ext.rb +10 -0
- data/lib/origen/database/key_value_store.rb +111 -0
- data/lib/origen/database/key_value_stores.rb +108 -0
- data/lib/origen/database.rb +6 -0
- data/lib/origen/encodings.rb +102 -0
- data/lib/origen/features/feature.rb +22 -0
- data/lib/origen/features.rb +104 -0
- data/lib/origen/file_handler.rb +429 -0
- data/lib/origen/generator/comparator.rb +56 -0
- data/lib/origen/generator/compiler.rb +277 -0
- data/lib/origen/generator/flow.rb +49 -0
- data/lib/origen/generator/job.rb +131 -0
- data/lib/origen/generator/pattern.rb +356 -0
- data/lib/origen/generator/pattern_finder.rb +155 -0
- data/lib/origen/generator/pattern_iterator.rb +55 -0
- data/lib/origen/generator/renderer.rb +113 -0
- data/lib/origen/generator/resources.rb +40 -0
- data/lib/origen/generator/stage.rb +89 -0
- data/lib/origen/generator.rb +85 -0
- data/lib/origen/global_methods.rb +205 -0
- data/lib/origen/import_manager.rb +596 -0
- data/lib/origen/location/base.rb +116 -0
- data/lib/origen/location/map.rb +83 -0
- data/lib/origen/location.rb +6 -0
- data/lib/origen/log.rb +217 -0
- data/lib/origen/logger_methods.rb +56 -0
- data/lib/origen/mode.rb +61 -0
- data/lib/origen/model.rb +267 -0
- data/lib/origen/model_initializer.rb +45 -0
- data/lib/origen/nvm/block_array.rb +72 -0
- data/lib/origen/nvm.rb +6 -0
- data/lib/origen/parameters/live.rb +22 -0
- data/lib/origen/parameters/missing.rb +28 -0
- data/lib/origen/parameters/set.rb +144 -0
- data/lib/origen/parameters.rb +107 -0
- data/lib/origen/pdm.rb +218 -0
- data/lib/origen/pins/function_proxy.rb +36 -0
- data/lib/origen/pins/ground_pin.rb +6 -0
- data/lib/origen/pins/pin.rb +860 -0
- data/lib/origen/pins/pin_bank.rb +349 -0
- data/lib/origen/pins/pin_clock.rb +124 -0
- data/lib/origen/pins/pin_collection.rb +492 -0
- data/lib/origen/pins/pin_common.rb +206 -0
- data/lib/origen/pins/port.rb +268 -0
- data/lib/origen/pins/power_pin.rb +30 -0
- data/lib/origen/pins.rb +696 -0
- data/lib/origen/registers/bit.rb +562 -0
- data/lib/origen/registers/bit_collection.rb +787 -0
- data/lib/origen/registers/container.rb +288 -0
- data/lib/origen/registers/domain.rb +16 -0
- data/lib/origen/registers/reg.rb +1406 -0
- data/lib/origen/registers/reg_collection.rb +24 -0
- data/lib/origen/registers.rb +652 -0
- data/lib/origen/regression_manager.rb +251 -0
- data/lib/origen/remote_manager.rb +340 -0
- data/lib/origen/revision_control/base.rb +257 -0
- data/lib/origen/revision_control/design_sync.rb +276 -0
- data/lib/origen/revision_control/git.rb +243 -0
- data/lib/origen/revision_control/subversion.rb +6 -0
- data/lib/origen/revision_control.rb +44 -0
- data/lib/origen/ruby_version_check.rb +131 -0
- data/lib/origen/site_config.rb +61 -0
- data/lib/origen/specs/checkers.rb +103 -0
- data/lib/origen/specs/creation_info.rb +17 -0
- data/lib/origen/specs/doc_resource.rb +91 -0
- data/lib/origen/specs/exhibit.rb +17 -0
- data/lib/origen/specs/mode_select.rb +16 -0
- data/lib/origen/specs/note.rb +17 -0
- data/lib/origen/specs/override.rb +21 -0
- data/lib/origen/specs/power_supply.rb +13 -0
- data/lib/origen/specs/spec.rb +226 -0
- data/lib/origen/specs/version_history.rb +14 -0
- data/lib/origen/specs.rb +552 -0
- data/lib/origen/sub_blocks.rb +298 -0
- data/lib/origen/tester/api.rb +277 -0
- data/lib/origen/tester/bdm/bdm.rb +25 -0
- data/lib/origen/tester/command_based_tester.rb +46 -0
- data/lib/origen/tester/doc/doc.rb +226 -0
- data/lib/origen/tester/doc/generator/flow.rb +71 -0
- data/lib/origen/tester/doc/generator/flow_line.rb +203 -0
- data/lib/origen/tester/doc/generator/test.rb +68 -0
- data/lib/origen/tester/doc/generator/test_group.rb +66 -0
- data/lib/origen/tester/doc/generator/tests.rb +47 -0
- data/lib/origen/tester/doc/generator.rb +126 -0
- data/lib/origen/tester/doc/model.rb +162 -0
- data/lib/origen/tester/generator/flow_control_api.rb +606 -0
- data/lib/origen/tester/generator/identity_map.rb +25 -0
- data/lib/origen/tester/generator/placeholder.rb +13 -0
- data/lib/origen/tester/generator/test_numberer.rb +25 -0
- data/lib/origen/tester/generator.rb +271 -0
- data/lib/origen/tester/interface.rb +154 -0
- data/lib/origen/tester/j750/files.rb +45 -0
- data/lib/origen/tester/j750/generator/flow.rb +123 -0
- data/lib/origen/tester/j750/generator/flow_line.rb +288 -0
- data/lib/origen/tester/j750/generator/patgroup.rb +111 -0
- data/lib/origen/tester/j750/generator/patgroups.rb +41 -0
- data/lib/origen/tester/j750/generator/patset.rb +111 -0
- data/lib/origen/tester/j750/generator/patsets.rb +41 -0
- data/lib/origen/tester/j750/generator/templates/flow.txt.erb +9 -0
- data/lib/origen/tester/j750/generator/templates/instances.txt.erb +16 -0
- data/lib/origen/tester/j750/generator/templates/patgroups.txt.erb +8 -0
- data/lib/origen/tester/j750/generator/templates/patsets.txt.erb +10 -0
- data/lib/origen/tester/j750/generator/test_instance.rb +846 -0
- data/lib/origen/tester/j750/generator/test_instance_group.rb +60 -0
- data/lib/origen/tester/j750/generator/test_instances.rb +182 -0
- data/lib/origen/tester/j750/generator.rb +203 -0
- data/lib/origen/tester/j750/j750.rb +845 -0
- data/lib/origen/tester/j750/j750_hpt.rb +35 -0
- data/lib/origen/tester/j750/parser/ac_spec.rb +11 -0
- data/lib/origen/tester/j750/parser/ac_specs.rb +0 -0
- data/lib/origen/tester/j750/parser/dc_spec.rb +36 -0
- data/lib/origen/tester/j750/parser/dc_specs.rb +50 -0
- data/lib/origen/tester/j750/parser/descriptions.rb +340 -0
- data/lib/origen/tester/j750/parser/flow.rb +111 -0
- data/lib/origen/tester/j750/parser/flow_line.rb +207 -0
- data/lib/origen/tester/j750/parser/flows.rb +23 -0
- data/lib/origen/tester/j750/parser/pattern_set.rb +94 -0
- data/lib/origen/tester/j750/parser/pattern_sets.rb +33 -0
- data/lib/origen/tester/j750/parser/test_instance.rb +322 -0
- data/lib/origen/tester/j750/parser/test_instances.rb +26 -0
- data/lib/origen/tester/j750/parser/timeset.rb +15 -0
- data/lib/origen/tester/j750/parser/timesets.rb +0 -0
- data/lib/origen/tester/j750/parser.rb +104 -0
- data/lib/origen/tester/jlink/jlink.rb +33 -0
- data/lib/origen/tester/parser/description_lookup.rb +64 -0
- data/lib/origen/tester/parser/searchable_array.rb +32 -0
- data/lib/origen/tester/parser/searchable_hash.rb +32 -0
- data/lib/origen/tester/parser.rb +24 -0
- data/lib/origen/tester/time.rb +338 -0
- data/lib/origen/tester/timing.rb +253 -0
- data/lib/origen/tester/ultraflex/files.rb +45 -0
- data/lib/origen/tester/ultraflex/generator/flow.rb +119 -0
- data/lib/origen/tester/ultraflex/generator/flow_line.rb +269 -0
- data/lib/origen/tester/ultraflex/generator/patgroup.rb +111 -0
- data/lib/origen/tester/ultraflex/generator/patgroups.rb +41 -0
- data/lib/origen/tester/ultraflex/generator/patset.rb +111 -0
- data/lib/origen/tester/ultraflex/generator/patsets.rb +41 -0
- data/lib/origen/tester/ultraflex/generator/templates/flow.txt.erb +9 -0
- data/lib/origen/tester/ultraflex/generator/templates/instances.txt.erb +16 -0
- data/lib/origen/tester/ultraflex/generator/templates/patgroups.txt.erb +8 -0
- data/lib/origen/tester/ultraflex/generator/templates/patsets.txt.erb +10 -0
- data/lib/origen/tester/ultraflex/generator/test_instance.rb +622 -0
- data/lib/origen/tester/ultraflex/generator/test_instance_group.rb +60 -0
- data/lib/origen/tester/ultraflex/generator/test_instances.rb +174 -0
- data/lib/origen/tester/ultraflex/generator.rb +200 -0
- data/lib/origen/tester/ultraflex/parser/ac_spec.rb +11 -0
- data/lib/origen/tester/ultraflex/parser/ac_specs.rb +0 -0
- data/lib/origen/tester/ultraflex/parser/dc_spec.rb +36 -0
- data/lib/origen/tester/ultraflex/parser/dc_specs.rb +50 -0
- data/lib/origen/tester/ultraflex/parser/descriptions.rb +342 -0
- data/lib/origen/tester/ultraflex/parser/flow.rb +111 -0
- data/lib/origen/tester/ultraflex/parser/flow_line.rb +207 -0
- data/lib/origen/tester/ultraflex/parser/flows.rb +23 -0
- data/lib/origen/tester/ultraflex/parser/pattern_set.rb +94 -0
- data/lib/origen/tester/ultraflex/parser/pattern_sets.rb +33 -0
- data/lib/origen/tester/ultraflex/parser/test_instance.rb +262 -0
- data/lib/origen/tester/ultraflex/parser/test_instances.rb +26 -0
- data/lib/origen/tester/ultraflex/parser/timeset.rb +15 -0
- data/lib/origen/tester/ultraflex/parser/timesets.rb +0 -0
- data/lib/origen/tester/ultraflex/parser.rb +104 -0
- data/lib/origen/tester/ultraflex/ultraflex.rb +759 -0
- data/lib/origen/tester/v93k/generator/flow.rb +63 -0
- data/lib/origen/tester/v93k/generator/flow_node/print.rb +10 -0
- data/lib/origen/tester/v93k/generator/flow_node.rb +17 -0
- data/lib/origen/tester/v93k/generator/pattern.rb +16 -0
- data/lib/origen/tester/v93k/generator/pattern_master.rb +54 -0
- data/lib/origen/tester/v93k/generator/templates/_test_method.txt.erb +6 -0
- data/lib/origen/tester/v93k/generator/templates/_test_suite.txt.erb +11 -0
- data/lib/origen/tester/v93k/generator/templates/template.flow.erb +121 -0
- data/lib/origen/tester/v93k/generator/templates/template.pmfl.erb +9 -0
- data/lib/origen/tester/v93k/generator/test_function.rb +103 -0
- data/lib/origen/tester/v93k/generator/test_functions.rb +79 -0
- data/lib/origen/tester/v93k/generator/test_method.rb +46 -0
- data/lib/origen/tester/v93k/generator/test_methods.rb +75 -0
- data/lib/origen/tester/v93k/generator/test_suite.rb +54 -0
- data/lib/origen/tester/v93k/generator/test_suites.rb +65 -0
- data/lib/origen/tester/v93k/generator.rb +80 -0
- data/lib/origen/tester/v93k/v93k.rb +420 -0
- data/lib/origen/tester/vector.rb +86 -0
- data/lib/origen/tester/vector_generator.rb +633 -0
- data/lib/origen/tester/vector_pipeline.rb +150 -0
- data/lib/origen/tester.rb +56 -0
- data/lib/origen/top_level.rb +134 -0
- data/lib/origen/users/ldap.rb +65 -0
- data/lib/origen/users/user.rb +149 -0
- data/lib/origen/users.rb +30 -0
- data/lib/origen/utility/block_args.rb +93 -0
- data/lib/origen/utility/csv_data.rb +110 -0
- data/lib/origen/utility/design_sync.rb +494 -0
- data/lib/origen/utility/diff.rb +158 -0
- data/lib/origen/utility/input_capture.rb +121 -0
- data/lib/origen/utility/mailer.rb +143 -0
- data/lib/origen/utility/s_record.rb +205 -0
- data/lib/origen/utility/time_and_date.rb +30 -0
- data/lib/origen/utility.rb +12 -0
- data/lib/origen/version_checker.rb +117 -0
- data/lib/origen/version_string.rb +356 -0
- data/lib/origen.rb +648 -0
- data/lib/tasks/gem.rake +27 -22
- data/origen_site_config.yml +36 -0
- data/source_setup +17 -0
- data/spec/format/rgen_formatter.rb +14 -0
- data/templates/api_doc/README.txt.erb +24 -0
- data/templates/code_generators/gemfile_app.rb +4 -0
- data/templates/code_generators/gemfile_plugin.rb +6 -0
- data/templates/code_generators/gemspec.rb +33 -0
- data/templates/code_generators/rakefile.rb +10 -0
- data/templates/code_generators/spec_helper.rb +49 -0
- data/templates/code_generators/version.rb +8 -0
- data/templates/code_generators/version_time.rb +3 -0
- data/templates/git/gitignore.erb +33 -0
- data/templates/j750/_vt_flow.txt.erb +8 -0
- data/templates/j750/_vt_instances.txt.erb +4 -0
- data/templates/j750/program_sheet.txt.erb +9 -0
- data/templates/nanoc/Rules +74 -0
- data/templates/nanoc/config.yaml +77 -0
- data/templates/nanoc/content/favicon.ico +0 -0
- data/templates/nanoc/layouts/bootstrap.html.erb +63 -0
- data/templates/nanoc/layouts/bootstrap3.html.erb +71 -0
- data/templates/nanoc/layouts/freescale.html.erb +79 -0
- data/templates/nanoc/lib/bootstrap_filter.rb +49 -0
- data/templates/nanoc/lib/codeblocks_filter.rb +41 -0
- data/templates/nanoc/lib/default.rb +2 -0
- data/templates/nanoc/lib/gzip_filter.rb +16 -0
- data/templates/nanoc/lib/haml_code_filter.rb +41 -0
- data/templates/nanoc/lib/helpers.rb +1 -0
- data/templates/nanoc/lib/search_filter.rb +62 -0
- data/templates/nanoc_dynamic/content/search.js.erb +92 -0
- data/templates/shared/web/_logo.html +10 -0
- data/templates/test/_inline_sub.txt.erb +2 -0
- data/templates/test/environment.txt.erb +1 -0
- data/templates/test/inline.txt.erb +11 -0
- data/templates/test/inspections.txt.erb +19 -0
- data/templates/test/set1/_sub1.txt.erb +12 -0
- data/templates/test/set1/_sub4.txt.erb +1 -0
- data/templates/test/set1/_sub5.txt.erb +1 -0
- data/templates/test/set1/main.txt.erb +53 -0
- data/templates/test/set1/sub_dir/_sub2.txt.erb +20 -0
- data/templates/test/set1/sub_dir/_sub3.txt.erb +12 -0
- data/templates/test/set1/sub_dir/main2.txt.erb +4 -0
- data/templates/test/set2/template_with_no_erb_1.txt +9 -0
- data/templates/test/set2/template_with_no_erb_2.txt +9 -0
- data/templates/test/set3/_layout.html.erb +4 -0
- data/templates/test/set3/content.html.erb +6 -0
- data/templates/time/filter.rb.erb +15 -0
- data/templates/time/rules.rb.erb +45 -0
- metadata +639 -5
@@ -0,0 +1,91 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store text information to help with documentation processes
|
4
|
+
class Doc_Resource
|
5
|
+
attr_accessor :mode, :type, :sub_type, :audience, :table_title
|
6
|
+
attr_accessor :note_refs, :exhibit_refs, :before_table, :after_table, :doc_options
|
7
|
+
|
8
|
+
def initialize(selector = {}, table_title = {}, text = {}, options = {})
|
9
|
+
@mode = selector[:mode]
|
10
|
+
@type = selector[:type]
|
11
|
+
@sub_type = selector[:sub_type]
|
12
|
+
@audience = selector[:audience]
|
13
|
+
@table_title = table_title[:title]
|
14
|
+
@note_refs = table_title[:note_refs]
|
15
|
+
@exhibit_refs = table_title[:exhibit_refs]
|
16
|
+
@before_table = text[:before]
|
17
|
+
@after_table = text[:after]
|
18
|
+
@doc_options = options
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_xml
|
22
|
+
tmp = {}
|
23
|
+
tmp['mode'] = @mode unless @mode.nil?
|
24
|
+
tmp['type'] = @type unless @type.nil?
|
25
|
+
tmp['sub_type'] = @sub_type unless @sub_type.nil?
|
26
|
+
tmp['audience'] = @audience unless @audience.nil?
|
27
|
+
doc_resource_ml = Nokogiri::XML::Builder.new do |xml|
|
28
|
+
xml.doc_resource(tmp.each do |t, d|
|
29
|
+
"#{t}=\"#{d}\""
|
30
|
+
end
|
31
|
+
) do
|
32
|
+
unless @table_title.nil? && @note_refs.size == 0 && @exhibit_refs.size == 0
|
33
|
+
unless @note_refs.first.to_s.size == 0
|
34
|
+
unless @exhibit_refs.first.to_s.size == 0
|
35
|
+
xml.title do
|
36
|
+
unless @table_title.nil?
|
37
|
+
xml.Text @table_title.to_s
|
38
|
+
end
|
39
|
+
unless @note_refs.size == 0
|
40
|
+
unless @note_refs.first.to_s.size == 0
|
41
|
+
xml.noteRefs do
|
42
|
+
@note_refs = [@note_refs] unless @note_refs.is_a? Array
|
43
|
+
@note_refs.each do |note_ref|
|
44
|
+
unless note_ref.to_s.size == 0
|
45
|
+
xml.noteRef(href: note_ref.to_s)
|
46
|
+
end # unless note_ref.to_s.size == 0
|
47
|
+
end # @note_refs.each do |note_ref|
|
48
|
+
end # xml.noteRefs do
|
49
|
+
end # unless @note_refs.first.to_s.size == 0
|
50
|
+
end # unless @note_refs.size == 0
|
51
|
+
unless @exhibit_refs.size == 0
|
52
|
+
unless @exhibit_refs.first.to_s.size == 0
|
53
|
+
xml.exhibitRefs do
|
54
|
+
@exhibit_refs = [@exhibit_refs] unless @exhibit_refs.is_a? Array
|
55
|
+
@exhibit_refs.each do |exhibit_ref|
|
56
|
+
unless exhibit_ref.to_s.size == 0
|
57
|
+
xml.exhibitRef(href: exhibit_ref.to_s)
|
58
|
+
end # unless exhibit_ref.to_s.size == 0
|
59
|
+
end # @exhibit_refs.each do |exhibit_ref|
|
60
|
+
end # xml.exhibitRefs do
|
61
|
+
end # unless @exhibit_refs.first.to_s.size == 0
|
62
|
+
end # unless @exhibit_refs.size == 0
|
63
|
+
end # xml.title.done
|
64
|
+
end # unless @exhibit_refs.to_s.size == 0
|
65
|
+
end # unless @note_refs.to_s.size == 0
|
66
|
+
end # unless @table_title.nil? && @note_refs.size == 0 && @exhibit_refs.size == 0
|
67
|
+
unless @before_table.nil? && @after_table.nil?
|
68
|
+
xml.paragraphs do
|
69
|
+
unless @before_table.nil?
|
70
|
+
if @before_table.is_a? Nokogiri::XML::Node
|
71
|
+
xml.before_table @before_table.inner_html
|
72
|
+
else
|
73
|
+
xml.before_table @before_table
|
74
|
+
end
|
75
|
+
end
|
76
|
+
unless @after_table.nil?
|
77
|
+
if @after_table.is_a? Nokogiri::XML::Node
|
78
|
+
xml.after_table after_table.inner_html
|
79
|
+
else
|
80
|
+
xml.after_table @after_table
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end # xml.paragraphs do
|
84
|
+
end # unless @before_table.nil? && @after_table.nil?
|
85
|
+
end # xml.doc_resource
|
86
|
+
end # doc_resource_ml = Nokogiri::
|
87
|
+
doc_resource_ml
|
88
|
+
end # to_xml
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store spec exhibit information used to document IP
|
4
|
+
class Exhibit
|
5
|
+
attr_accessor :id, :type, :title, :description, :reference, :markup
|
6
|
+
|
7
|
+
def initialize(id, type, options = {})
|
8
|
+
@id = id
|
9
|
+
@type = type
|
10
|
+
@title = options[:title]
|
11
|
+
@description = options[:description]
|
12
|
+
@reference = options[:reference]
|
13
|
+
@markup = options[:markup]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store mode select for IP
|
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
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store spec note information used to document IP
|
4
|
+
class Note
|
5
|
+
attr_accessor :id, :type, :mode, :audience, :text, :markup
|
6
|
+
|
7
|
+
def initialize(id, type, options = {})
|
8
|
+
@id = id
|
9
|
+
@type = type
|
10
|
+
@mode = options[:mode]
|
11
|
+
@audience = options[:audience]
|
12
|
+
@text = options[:text]
|
13
|
+
@markup = options[:markup]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store override information for specified specs on instantiated IP
|
4
|
+
class Override
|
5
|
+
attr_accessor :block, :usage, :spec_ref, :mode_ref, :sub_type, :audience, :minimum, :maximum, :typical, :disable
|
6
|
+
|
7
|
+
def initialize(block_options = {}, find_spec = {}, values = {}, options = {})
|
8
|
+
@block = block_options[:block]
|
9
|
+
@usage = block_options[:usage]
|
10
|
+
@spec_ref = find_spec[:spec_id]
|
11
|
+
@mode_ref = find_spec[:mode_ref]
|
12
|
+
@sub_type = find_spec[:sub_type]
|
13
|
+
@audience = find_spec[:audience]
|
14
|
+
@minimum = values[:min]
|
15
|
+
@maximum = values[:max]
|
16
|
+
@typical = values[:typ]
|
17
|
+
@disable = options[:disable]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,226 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
class Spec
|
4
|
+
autoload :Note, 'origen/specs/note'
|
5
|
+
autoload :Exhibit, 'origen/specs/exhibit'
|
6
|
+
require_relative 'checkers'
|
7
|
+
|
8
|
+
SpecAttribute = Struct.new(:name, :type, :required, :author, :description)
|
9
|
+
|
10
|
+
Limit = Struct.new(:exp) do
|
11
|
+
def value
|
12
|
+
Origen::Specs::Spec.send(:evaluate_limit, exp)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
TYPES = Origen::Specs::SPEC_TYPES
|
17
|
+
|
18
|
+
ATTRS = {
|
19
|
+
ip_name: SpecAttribute.new(:ip_name, Symbol, true, :design, 'The parent IP object of the specification'),
|
20
|
+
name: SpecAttribute.new(:name, Symbol, true, :design, 'Specification Name'),
|
21
|
+
type: SpecAttribute.new(:type, Symbol, true, :design, "Specification Type, acceptable values: #{TYPES}"),
|
22
|
+
sub_type: SpecAttribute.new(:sub_type, Symbol, true, :design, 'Specification sub-type (e.g. :max_operating_condition)'),
|
23
|
+
mode: SpecAttribute.new(:mode, Symbol, true, :design, 'Specification mode, inherited from the owning parent object'),
|
24
|
+
symbol: SpecAttribute.new(:symbol, String, false, :design, 'Specification symbol, can contain HTML'),
|
25
|
+
description: SpecAttribute.new(:description, String, false, :design, 'Specification description'),
|
26
|
+
audience: SpecAttribute.new(:audience, Symbol, false, :design, 'Specification audience, acceptable values are :internal and :external'),
|
27
|
+
min: SpecAttribute.new(:min, Limit, false, :design, 'Specification minimum limit. The limit expression is displayed, not a resolved value'),
|
28
|
+
min_ovr: SpecAttribute.new(:min_ovr, Limit, false, :design, 'Specification minimum limit at SoC level. The limit expression is displaye,d not a resolved value'),
|
29
|
+
max: SpecAttribute.new(:max, Limit, false, :design, 'Specification maximum limit. The limit expression is displayed, not a resolved value'),
|
30
|
+
max_ovr: SpecAttribute.new(:max_ovr, Limit, false, :design, 'Specification maximum limit at SoC level. The limit expression is displaye,d not a resolved value'),
|
31
|
+
typ: SpecAttribute.new(:typ, Limit, false, :design, 'Specification typical limit. The limit expression is displayed, not a resolved value'),
|
32
|
+
typ_ovr: SpecAttribute.new(:typ_ovr, Limit, false, :design, 'Specification typical limit at SoC level. The limit expression is displaye,d not a resolved value'),
|
33
|
+
unit: SpecAttribute.new(:unit, String, false, :design, 'Specification unit of measure'),
|
34
|
+
constraints: SpecAttribute.new(:constraints, String, false, :design, "Single logical expression or a CSV list of logical expressions required for the spec to be valid (e.g. 'GVDD == 1.2V'"),
|
35
|
+
limit_type: SpecAttribute.new(:limit_type, Symbol, false, :design, 'Auto-generated attribute based on analysis of the spec limits. Acceptable values are :single_sided and :double_sided'),
|
36
|
+
notes: SpecAttribute.new(:notes, Hash, false, :design, 'Specification notes'),
|
37
|
+
disposition_required: SpecAttribute.new(:disposition_required, TrueClass, false, :pde, 'Boolean representation of whether a specification needs a disposition based on silicon results or customer input'),
|
38
|
+
priority: SpecAttribute.new(:priority, TrueClass, false, :pde, 'Integer value (1-4) to indicate which priority the cz for this spec will be: 1. Highest priority, for critical or historically risky specs 2. Medium priority, relatively low risk. Not required until all priority 1 specs have been handled 3. Lowest priority, very low risk, low performance specs 4. No plans to characterize'),
|
39
|
+
target: SpecAttribute.new(:target, String, false, :pde, 'Specification target limit. Not used for pass/fail results but for data analysis'),
|
40
|
+
guardband: SpecAttribute.new(:guardband, Limit, false, :pde, 'Specification guardband limit'),
|
41
|
+
testable: SpecAttribute.new(:testable, TrueClass, false, :pde, 'Boolean representation of whether a specification is testable'),
|
42
|
+
tested_at_probe: SpecAttribute.new(:tested_at_probe, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at probe'),
|
43
|
+
tested_at_ft_hot: SpecAttribute.new(:tested_at_ft_hot, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at final test hot temperature'),
|
44
|
+
tested_at_ft_ext_hot: SpecAttribute.new(:tested_at_ft_ext_hot, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at final test extended hot temperature'),
|
45
|
+
tested_at_ft_cold: SpecAttribute.new(:tested_at_ft_cold, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at final test cold temperature'),
|
46
|
+
tested_at_ft_ext_cold: SpecAttribute.new(:tested_at_ft_ext_cold, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at final test extended cold temperature'),
|
47
|
+
tested_at_ft_room: SpecAttribute.new(:tested_at_ft_room, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested at final test room temperature'),
|
48
|
+
guaranteed_by_prod_test: SpecAttribute.new(:guaranteed_by_prod_test, TrueClass, false, :pde, 'Boolean representation of whether a specification is guaranteed by production test'),
|
49
|
+
guaranteed_by_proxy_test: SpecAttribute.new(:guaranteed_by_proxy_test, TrueClass, false, :pde, 'Boolean representation of whether a specification is guaranteed by production test via a proxy test such as BIST'),
|
50
|
+
guaranteed_by_construction: SpecAttribute.new(:guaranteed_by_construction, TrueClass, false, :pde, 'Boolean representation of whether a specification is guaranteed by physical construction, design documentation required'),
|
51
|
+
guaranteed_by_simulation: SpecAttribute.new(:guaranteed_by_simulation, TrueClass, false, :pde, 'Boolean representation of whether a specification is tested guaranteed by simulation, design documentation required'),
|
52
|
+
cz_on_ate: SpecAttribute.new(:cz_on_ate, TrueClass, false, :pde, 'Boolean representation of whether a specification is characterized on ATE'),
|
53
|
+
cz_ate_sample_size: SpecAttribute.new(:cz_ate_sample_size, Integer, false, :pde, 'Integer number representing the sample size of the split used for customer Cpk calculation as tested on ATE'),
|
54
|
+
cz_ate_cpk: SpecAttribute.new(:cz_ate_cpk, Float, false, :pde, 'Float number representing the customer or representative Cpk of the specification as tested on ATE'),
|
55
|
+
cz_on_bench: SpecAttribute.new(:cz_on_bench, TrueClass, false, :pde, 'Boolean representation of whether a specification is characterized on a bench setup'),
|
56
|
+
cz_bench_sample_size: SpecAttribute.new(:cz_bench_sample_size, Integer, false, :pde, 'Integer number representing the sample size of the split used for customer Cpk calculation on a bench setup'),
|
57
|
+
cz_bench_cpk: SpecAttribute.new(:cz_bench_cpk, Float, false, :pde, 'Float number representing the customer or representative Cpk of the specification as tested on a bench setup'),
|
58
|
+
cz_on_system: SpecAttribute.new(:cz_on_system, TrueClass, false, :pde, 'Boolean representation of whether a specification is characterized in a system setup'),
|
59
|
+
cz_system_sample_size: SpecAttribute.new(:cz_system_sample_size, Integer, false, :pde, 'Integer number representing the sample size of the split used for customer Cpk calculation in a system'),
|
60
|
+
cz_system_cpk: SpecAttribute.new(:cz_system_cpk, Float, false, :pde, 'Float number representing the customer or representative Cpk of the specification as tested in a system')
|
61
|
+
}
|
62
|
+
|
63
|
+
ATTRS.each do |_id, spec_attr|
|
64
|
+
class_eval("def #{spec_attr.name}(param=nil); param.nil? ? @#{spec_attr.name} : (@#{spec_attr.name} = param); end")
|
65
|
+
end
|
66
|
+
|
67
|
+
# There are at least three attributes needed to define a unique spec.
|
68
|
+
# 1) name (e.g. :vdd)
|
69
|
+
# 2) type (e.g. :dc) Possible values are [:dc, :ac, :temperature]
|
70
|
+
# 3) mode (e.g. :global). mode defaults to the current mode found for the parent object
|
71
|
+
# A mode is defined as a device state that requires some sequence of actions to be enabled.
|
72
|
+
# A type is a classification moniker that exists without any stimulus required.
|
73
|
+
# Some specs require a fourth attribute sub_type to be uniquely defined.
|
74
|
+
# For example, a global device level VDD specification would require four attributes to be unique.
|
75
|
+
# Here is an example of two spec definitions for a VDD power supply
|
76
|
+
# name = :vdd, type: :dc, mode: :global, sub_type: typical_operating_conditions, typ = "1.0V +/- 30mV"
|
77
|
+
# name = :vdd, type: :dc, mode: :global, sub_type: maximum_operating_conditions, min = -0.3V, max = 1.8V
|
78
|
+
# Whereas a typical DDR timing specification might only need three attributes to be unique
|
79
|
+
# name: :tddkhas, type: :ac, mode: ddr4dr2400, sub_type: nil
|
80
|
+
|
81
|
+
def initialize(name, type, mode, owner_name, &block)
|
82
|
+
@name = name_audit(name)
|
83
|
+
fail 'Specification names must be of types Symbol or String and cannot start with a number' if @name.nil?
|
84
|
+
@type = type
|
85
|
+
@sub_type = nil # not necessary to be able to find a unique spec, but required for some specs
|
86
|
+
@mode = mode
|
87
|
+
@ip_name = owner_name
|
88
|
+
@symbol = nil # Meant to be populated with HTML representing the way the spec name should look in a document
|
89
|
+
@description = nil
|
90
|
+
@min, @typ, @max, @target = nil, nil, nil, nil
|
91
|
+
@min_ovr, @typ_ovr, @typ_ovr = nil, nil, nil
|
92
|
+
@audience = nil
|
93
|
+
@notes = {}
|
94
|
+
@exhibits = {}
|
95
|
+
@testable = nil
|
96
|
+
@guardband = nil
|
97
|
+
(block.arity < 1 ? (instance_eval(&block)) : block.call(self)) if block_given?
|
98
|
+
fail "Spec type must be one of #{TYPES.join(', ')}" unless TYPES.include? type
|
99
|
+
@min = Limit.new(@min)
|
100
|
+
@max = Limit.new(@max)
|
101
|
+
@typ = Limit.new(@typ)
|
102
|
+
@min_ovr = Limit.new(@min_ovr)
|
103
|
+
@max_ovr = Limit.new(@max_ovr)
|
104
|
+
@typ_ovr = Limit.new(@typ_ovr)
|
105
|
+
@guardband = Limit.new(@guardband)
|
106
|
+
fail "Spec #{name} failed the limits audit!" unless limits_ok?
|
107
|
+
end
|
108
|
+
|
109
|
+
def method_missing(method, *args, &block)
|
110
|
+
ivar = "@#{method.to_s.gsub('=', '')}"
|
111
|
+
ivar_sym = ":#{ivar}"
|
112
|
+
if method.to_s =~ /=$/
|
113
|
+
define_singleton_method(method) do |val|
|
114
|
+
instance_variable_set(ivar, val)
|
115
|
+
end
|
116
|
+
elsif instance_variables.include? ivar_sym
|
117
|
+
instance_variable_get(ivar)
|
118
|
+
else
|
119
|
+
define_singleton_method(method) do
|
120
|
+
instance_variable_get(ivar)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
send(method, *args, &block)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Do a 'diff' from the current spec (self) and the compare spec
|
127
|
+
# Returns a hash with attribute as key and an array of the
|
128
|
+
# attribute values that differed
|
129
|
+
def diff(compare_spec)
|
130
|
+
diff_results = Hash.new do |h, k|
|
131
|
+
h[k] = []
|
132
|
+
end
|
133
|
+
# Loop through self's isntance variables first
|
134
|
+
instance_variables.each do |ivar|
|
135
|
+
ivar_sym = ivar.to_s.gsub('@', '').to_sym
|
136
|
+
next if ivar_sym == :notes # temporarily disable until notes diff method written
|
137
|
+
ivar_str = ivar.to_s.gsub('@', '')
|
138
|
+
if compare_spec.respond_to? ivar_sym
|
139
|
+
# Check if the instance variable is a Limit and if so then find
|
140
|
+
# all instance_variables and diff them as well
|
141
|
+
if instance_variable_get(ivar).class == Origen::Specs::Spec::Limit
|
142
|
+
limit_diff_results = diff_limits(instance_variable_get(ivar), compare_spec.instance_variable_get(ivar))
|
143
|
+
# Extract the limit diff pairs and merge with updated keys with the diff_results hash
|
144
|
+
limit_diff_results.each do |k, v|
|
145
|
+
limit_diff_key = "#{ivar_str}_#{k}".to_sym
|
146
|
+
diff_results[limit_diff_key] = v
|
147
|
+
end
|
148
|
+
else
|
149
|
+
unless instance_variable_get(ivar) == compare_spec.instance_variable_get(ivar)
|
150
|
+
diff_results[ivar_sym] = [instance_variable_get(ivar), compare_spec.instance_variable_get(ivar)]
|
151
|
+
Origen.log.debug "Found spec difference for instance variable #{ivar} for #{self} and #{compare_spec}"
|
152
|
+
end
|
153
|
+
end
|
154
|
+
else
|
155
|
+
# The compare spec doesn't have the current instance variable
|
156
|
+
# so log a difference
|
157
|
+
if instance_variable_get(ivar).class == Origen::Specs::Spec::Limit
|
158
|
+
limit_diff_results = diff_limits(instance_variable_get(ivar), compare_spec.instance_variable_get(ivar))
|
159
|
+
# Extract the limit diff pairs and merge with updated keys with the diff_results hash
|
160
|
+
limit_diff_results.each do |k, v|
|
161
|
+
limit_diff_key = "#{ivar_str}_#{k}".to_sym
|
162
|
+
diff_results[limit_diff_key] = v
|
163
|
+
end
|
164
|
+
else
|
165
|
+
Origen.log.debug "Instance variable #{ivar} exists for #{self} and does not for #{compare_spec}"
|
166
|
+
diff_results[ivar_sym] = [instance_variable_get(ivar), '']
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
# Loop through unique instance variables for compare_spec
|
171
|
+
diff_results
|
172
|
+
end
|
173
|
+
|
174
|
+
# Monkey patch of hash/array include? method needed because
|
175
|
+
# Origen::Specs#specs can return a single Spec instance or an Array of Specs
|
176
|
+
def include?(s)
|
177
|
+
s == @name ? true : false
|
178
|
+
end
|
179
|
+
|
180
|
+
# Add a specification note
|
181
|
+
def add_note(id, options = {})
|
182
|
+
options = {
|
183
|
+
type: :spec
|
184
|
+
}.update(options)
|
185
|
+
# Create the Note instance and add to the notes attribute
|
186
|
+
@notes[id] = Origen::Specs::Note.new(id, options[:type], options)
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns a Note object from the notes hash
|
190
|
+
def notes(id = nil)
|
191
|
+
return nil if @notes.nil?
|
192
|
+
@notes.filter(id)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the number of notes as an Integer
|
196
|
+
def note_count
|
197
|
+
@notes.size
|
198
|
+
end
|
199
|
+
|
200
|
+
private
|
201
|
+
|
202
|
+
# This assumes the limit objects are Structs
|
203
|
+
def diff_limits(limit_one, limit_two = nil)
|
204
|
+
diff_results = Hash.new do |h, k|
|
205
|
+
h[k] = []
|
206
|
+
end
|
207
|
+
# Only need to loop through limit one ivars because the Limit class cannot
|
208
|
+
# be changed in 3rd party files like the Spec class can be
|
209
|
+
limit_one.members.each do |m|
|
210
|
+
if limit_two.respond_to? m
|
211
|
+
unless limit_one.send(m) == limit_two.send(m)
|
212
|
+
diff_results[m] = [limit_one.send(m), limit_two.send(m)]
|
213
|
+
Origen.log.debug "Found limit difference for member #{m} for #{limit_one} and #{limit_two}"
|
214
|
+
end
|
215
|
+
else
|
216
|
+
# Limit two doesn't have the current instance variable or was not provided
|
217
|
+
# as an argument so log a difference
|
218
|
+
Origen.log.debug "Member #{m} exists for #{limit_one} and does not for #{limit_two}"
|
219
|
+
diff_results[m] = [limit_one.send(m), '']
|
220
|
+
end
|
221
|
+
end
|
222
|
+
diff_results
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Origen
|
2
|
+
module Specs
|
3
|
+
# This class is used to store spec exhibit information used to document IP
|
4
|
+
class Version_History
|
5
|
+
attr_accessor :date, :author, :changes
|
6
|
+
|
7
|
+
def initialize(date, author, changes)
|
8
|
+
@date = date
|
9
|
+
@author = author
|
10
|
+
@changes = changes
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|