origen_testers 0.41.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/approved/j750/decompiler/sample/sample.atp +16 -0
- data/config/application.rb +6 -0
- data/config/boot.rb +3 -0
- data/config/commands.rb +148 -3
- data/config/global_commands.rb +0 -0
- data/config/shared_commands.rb +0 -0
- data/config/users.rb +0 -0
- data/config/version.rb +1 -1
- data/lib/commands/build.rb +0 -0
- data/lib/commands/convert.rb +16 -10
- data/lib/commands/run.rb +0 -0
- data/lib/origen_testers.rb +5 -0
- data/lib/origen_testers/api.rb +4 -0
- data/lib/origen_testers/atp.rb +0 -0
- data/lib/origen_testers/atp/ast/extractor.rb +0 -0
- data/lib/origen_testers/atp/ast/node.rb +0 -0
- data/lib/origen_testers/atp/flow.rb +0 -0
- data/lib/origen_testers/atp/flow_api.rb +0 -0
- data/lib/origen_testers/atp/formatter.rb +0 -0
- data/lib/origen_testers/atp/formatters/basic.rb +0 -0
- data/lib/origen_testers/atp/formatters/datalog.rb +0 -0
- data/lib/origen_testers/atp/parser.rb +0 -0
- data/lib/origen_testers/atp/processor.rb +0 -0
- data/lib/origen_testers/atp/processors/add_ids.rb +0 -0
- data/lib/origen_testers/atp/processors/add_set_result.rb +0 -0
- data/lib/origen_testers/atp/processors/adjacent_if_combiner.rb +0 -0
- data/lib/origen_testers/atp/processors/append_to.rb +0 -0
- data/lib/origen_testers/atp/processors/apply_post_group_actions.rb +0 -0
- data/lib/origen_testers/atp/processors/condition.rb +0 -0
- data/lib/origen_testers/atp/processors/continue_implementer.rb +0 -0
- data/lib/origen_testers/atp/processors/else_remover.rb +0 -0
- data/lib/origen_testers/atp/processors/empty_branch_remover.rb +0 -0
- data/lib/origen_testers/atp/processors/extract_set_flags.rb +0 -0
- data/lib/origen_testers/atp/processors/flag_optimizer.rb +0 -0
- data/lib/origen_testers/atp/processors/flattener.rb +0 -0
- data/lib/origen_testers/atp/processors/flow_id.rb +0 -0
- data/lib/origen_testers/atp/processors/marshal.rb +0 -0
- data/lib/origen_testers/atp/processors/on_pass_fail_remover.rb +0 -0
- data/lib/origen_testers/atp/processors/one_flag_per_test.rb +0 -0
- data/lib/origen_testers/atp/processors/pre_cleaner.rb +0 -0
- data/lib/origen_testers/atp/processors/redundant_condition_remover.rb +0 -0
- data/lib/origen_testers/atp/processors/relationship.rb +0 -0
- data/lib/origen_testers/atp/processors/sub_flow_remover.rb +0 -0
- data/lib/origen_testers/atp/program.rb +0 -0
- data/lib/origen_testers/atp/runner.rb +0 -0
- data/lib/origen_testers/atp/validator.rb +0 -0
- data/lib/origen_testers/atp/validators/condition.rb +0 -0
- data/lib/origen_testers/atp/validators/duplicate_ids.rb +0 -0
- data/lib/origen_testers/atp/validators/flags.rb +0 -0
- data/lib/origen_testers/atp/validators/jobs.rb +0 -0
- data/lib/origen_testers/atp/validators/missing_ids.rb +0 -0
- data/lib/origen_testers/atp_deprecation.rb +0 -0
- data/lib/origen_testers/basic_test_setups.rb +0 -0
- data/lib/origen_testers/callback_handlers.rb +0 -0
- data/lib/origen_testers/command_based_tester.rb +0 -0
- data/lib/origen_testers/decompiler.rb +9 -0
- data/lib/origen_testers/decompiler/decompiler_api.rb +163 -0
- data/lib/origen_testers/decompiler/nodes.rb +141 -0
- data/lib/origen_testers/decompiler/pattern.rb +304 -0
- data/lib/origen_testers/decompiler/pattern/elements/base.rb +44 -0
- data/lib/origen_testers/decompiler/pattern/elements/comment_block.rb +28 -0
- data/lib/origen_testers/decompiler/pattern/elements/frontmatter.rb +42 -0
- data/lib/origen_testers/decompiler/pattern/elements/pinlist.rb +44 -0
- data/lib/origen_testers/decompiler/pattern/elements/vector.rb +59 -0
- data/lib/origen_testers/decompiler/pattern/elements/vector_body_element.rb +105 -0
- data/lib/origen_testers/decompiler/pattern/enumerable_ext.rb +173 -0
- data/lib/origen_testers/decompiler/pattern/parsers.rb +111 -0
- data/lib/origen_testers/decompiler/pattern/spec_helpers.rb +41 -0
- data/lib/origen_testers/decompiler/pattern/splitter.rb +166 -0
- data/lib/origen_testers/decompiler/pattern/vector_delimiter_base.rb +70 -0
- data/lib/origen_testers/flow.rb +0 -0
- data/lib/origen_testers/generator/identity_map.rb +0 -0
- data/lib/origen_testers/generator/placeholder.rb +0 -0
- data/lib/origen_testers/generator/test_numberer.rb +0 -0
- data/lib/origen_testers/igxl_based_tester.rb +3 -0
- data/lib/origen_testers/igxl_based_tester/base.rb +8 -1
- data/lib/origen_testers/igxl_based_tester/base/custom_test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/flow.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/flow_line.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patgroup.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patgroups.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patset.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patset_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patsets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patsubr.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patsubr_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/patsubrs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/test_instance_group.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/test_instances.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/base/test_instances/custom_til.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/decompiler.rb +72 -0
- data/lib/origen_testers/igxl_based_tester/decompiler/atp.rb +98 -0
- data/lib/origen_testers/igxl_based_tester/decompiler/nodes.rb +77 -0
- data/lib/origen_testers/igxl_based_tester/files.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750.rb +1 -1
- data/lib/origen_testers/igxl_based_tester/j750/custom_test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/flow.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/flow_line.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/generator.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patgroup.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patgroups.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patset.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patset_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patsets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patsubr.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patsubr_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/patsubrs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/templates/flow.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/templates/instances.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/templates/patgroups.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/templates/patsets.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/templates/patsubrs.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/test_instance_group.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750/test_instances.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/custom_test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/flow.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/flow_line.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/generator.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patgroup.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patgroups.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patset.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patset_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patsets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubr.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubr_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/patsubrs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instance_group.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/j750_hpt/test_instances.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/ac_spec.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/ac_specs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/dc_spec.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/dc_specs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/descriptions.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/flow.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/flow_line.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/flows.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/pattern_set.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/pattern_sets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/test_instance.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/test_instances.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/timeset.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/parser/timesets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/flow_line.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/generator.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patgroup.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patgroups.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patset.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patset_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patsets.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patsubr_pattern.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/patsubrs.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/pinmap.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/templates/flow.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/templates/instances.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/templates/patgroups.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/templates/patsets.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/templates/patsubrs.txt.erb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/test_instance_group.rb +0 -0
- data/lib/origen_testers/igxl_based_tester/ultraflex/test_instances.rb +0 -0
- data/lib/origen_testers/labview_based_tester.rb +0 -0
- data/lib/origen_testers/memory_style.rb +0 -0
- data/lib/origen_testers/no_interface.rb +0 -0
- data/lib/origen_testers/origen_ext/application/runner.rb +0 -0
- data/lib/origen_testers/origen_ext/generator.rb +0 -0
- data/lib/origen_testers/origen_ext/generator/flow.rb +0 -0
- data/lib/origen_testers/origen_ext/generator/pattern.rb +0 -0
- data/lib/origen_testers/origen_ext/generator/resources.rb +0 -0
- data/lib/origen_testers/origen_ext/pins/timing.rb +57 -0
- data/lib/origen_testers/origen_ext/pins/timing/timeset.rb +29 -0
- data/lib/origen_testers/parser.rb +0 -0
- data/lib/origen_testers/parser/description_lookup.rb +0 -0
- data/lib/origen_testers/parser/searchable_array.rb +0 -0
- data/lib/origen_testers/parser/searchable_hash.rb +0 -0
- data/lib/origen_testers/pattern_compilers.rb +0 -0
- data/lib/origen_testers/pattern_compilers/assembler.rb +0 -0
- data/lib/origen_testers/pattern_compilers/base.rb +0 -0
- data/lib/origen_testers/pattern_compilers/igxl_based.rb +0 -0
- data/lib/origen_testers/pattern_compilers/j750.rb +0 -0
- data/lib/origen_testers/pattern_compilers/job.rb +0 -0
- data/lib/origen_testers/pattern_compilers/runner.rb +0 -0
- data/lib/origen_testers/pattern_compilers/templates/template.aiv.erb +0 -0
- data/lib/origen_testers/pattern_compilers/ultraflex.rb +0 -0
- data/lib/origen_testers/pattern_compilers/v93k.rb +0 -0
- data/lib/origen_testers/pattern_compilers/v93k/digcap.rb +13 -8
- data/lib/origen_testers/pattern_compilers/v93k/multiport.rb +0 -0
- data/lib/origen_testers/program_generators.rb +0 -0
- data/lib/origen_testers/smartest_based_tester.rb +2 -0
- data/lib/origen_testers/smartest_based_tester/base.rb +2 -2
- data/lib/origen_testers/smartest_based_tester/base/flow.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/generator.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/limits_file.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/pattern_compiler.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/pattern_master.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/processors/extract_bin_names.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/processors/extract_flow_vars.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_method.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/ac_tml.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/base_tml.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/custom_tml.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/dc_tml.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_methods/limits.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/test_suites.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/base/variables_file.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/decompiler.rb +43 -0
- data/lib/origen_testers/smartest_based_tester/decompiler/avc.rb +76 -0
- data/lib/origen_testers/smartest_based_tester/decompiler/nodes.rb +23 -0
- data/lib/origen_testers/smartest_based_tester/smt7.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/smt8.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/builder.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/builder/flow.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/builder/pattern_master.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/flow.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/generator.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/limits_file.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/pattern_compiler.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/pattern_master.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/templates/limits.csv.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/templates/template.aiv.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/templates/template.pmfl.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/templates/template.tf.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/templates/vars.tf.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/test_method.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/test_methods.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/test_suites.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k/variables_file.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/flow.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/generator.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/limits_file.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/limits_workbook.rb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/templates/limits.csv.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/templates/template.flow.erb +0 -0
- data/lib/origen_testers/smartest_based_tester/v93k_smt8/test_suite.rb +0 -0
- data/lib/origen_testers/stil_based_tester.rb +0 -0
- data/lib/origen_testers/stil_based_tester/base.rb +6 -6
- data/lib/origen_testers/stil_based_tester/d10.rb +0 -0
- data/lib/origen_testers/stil_based_tester/stil.rb +0 -0
- data/lib/origen_testers/test/basic_interface.rb +0 -0
- data/lib/origen_testers/test/block.rb +0 -0
- data/lib/origen_testers/test/complex_timing.rb +22 -0
- data/lib/origen_testers/test/custom_test_interface.rb +0 -0
- data/lib/origen_testers/test/dummy_decompiler.rb +106 -0
- data/lib/origen_testers/test/dut.rb +12 -0
- data/lib/origen_testers/test/dut2.rb +19 -6
- data/lib/origen_testers/test/dut_adv_timing.rb +0 -0
- data/lib/origen_testers/test/empty_dut.rb +12 -0
- data/lib/origen_testers/test/interface.rb +0 -0
- data/lib/origen_testers/test/nvm.rb +0 -0
- data/lib/origen_testers/timing.rb +108 -305
- data/lib/origen_testers/timing/timeset.rb +141 -0
- data/lib/origen_testers/timing/timing_api.rb +307 -0
- data/lib/origen_testers/vector.rb +0 -0
- data/lib/origen_testers/vector_based_tester.rb +0 -0
- data/lib/origen_testers/vector_generator.rb +1 -0
- data/lib/origen_testers/vector_pipeline.rb +0 -0
- data/pattern/bitmap.rb +0 -0
- data/pattern/dc_instr.rb +0 -0
- data/pattern/decompile.rb +4 -0
- data/pattern/delay.rb +0 -0
- data/pattern/freq_counter.rb +0 -0
- data/pattern/mem_test.rb +0 -0
- data/pattern/multi_vector.rb +0 -0
- data/pattern/multi_vector_plus1.rb +0 -0
- data/pattern/nvm/j750/add_late_pins.rb +0 -0
- data/pattern/nvm/j750/iterator_postfix_test_x_bx.rb +0 -0
- data/pattern/nvm/j750/iterator_test_x_bx.rb +0 -0
- data/pattern/nvm/j750/j750_halt.rb +0 -0
- data/pattern/nvm/j750/j750_workout.rb +0 -0
- data/pattern/nvm/j750/timing.rb +4 -4
- data/pattern/nvm/v93k/v93k_workout.rb +0 -0
- data/pattern/pin_flip.rb +9 -0
- data/pattern/read_write_reg.rb +0 -0
- data/pattern/reset.rb +0 -0
- data/pattern/simple.rb +4 -0
- data/pattern/single_overlay_store.rb +0 -0
- data/pattern/subroutines.rb +0 -0
- data/pattern/tester_overlay.rb +0 -0
- data/pattern/tester_store.rb +0 -0
- data/program/_additional_erase.rb +0 -0
- data/program/_efa_resources.rb +0 -0
- data/program/_erase.rb +0 -0
- data/program/_erase_vfy.rb +0 -0
- data/program/_iv_resources.rb +0 -0
- data/program/basic_interface.rb +0 -0
- data/program/components/_deep_nested.rb +0 -0
- data/program/components/_prb2_main.rb +0 -0
- data/program/components/_small.rb +0 -0
- data/program/components/_temp.rb +0 -0
- data/program/custom_tests.rb +0 -0
- data/program/flow_control.rb +0 -0
- data/program/prb1.rb +0 -0
- data/program/prb1_resources.rb +0 -0
- data/program/prb2.rb +0 -0
- data/program/test.rb +0 -0
- data/templates/example.txt.erb +0 -0
- data/templates/j750/_vt_flow.txt.erb +0 -0
- data/templates/j750/_vt_instances.txt.erb +0 -0
- data/templates/j750/program_sheet.txt.erb +0 -0
- data/templates/manifest/v93k.yaml.erb +0 -0
- data/templates/origen_guides/decompilation/decompilerapi.md.erb +192 -0
- data/templates/origen_guides/decompilation/overview.md.erb +214 -0
- data/templates/origen_guides/decompilation/platformspecifics.md.erb +291 -0
- data/templates/origen_guides/decompilation/universalapi.md.erb +598 -0
- data/templates/origen_guides/pattern/common.md.erb +0 -0
- data/templates/origen_guides/pattern/creating.md.erb +0 -0
- data/templates/origen_guides/pattern/custom.md.erb +0 -0
- data/templates/origen_guides/pattern/documenting.md.erb +0 -0
- data/templates/origen_guides/pattern/introduction.md.erb +0 -0
- data/templates/origen_guides/pattern/j750.md.erb +0 -0
- data/templates/origen_guides/pattern/name.md.erb +0 -0
- data/templates/origen_guides/pattern/pins.md.erb +0 -0
- data/templates/origen_guides/pattern/registers.md.erb +0 -0
- data/templates/origen_guides/pattern/running.md.erb +0 -0
- data/templates/origen_guides/pattern/stil.md.erb +0 -0
- data/templates/origen_guides/pattern/timing.md.erb +205 -2
- data/templates/origen_guides/pattern/ultraflex.md.erb +0 -0
- data/templates/origen_guides/pattern/v93k.md.erb +0 -0
- data/templates/origen_guides/program/code.md.erb +0 -0
- data/templates/origen_guides/program/custom.md.erb +0 -0
- data/templates/origen_guides/program/doc.md.erb +0 -0
- data/templates/origen_guides/program/flowapi.md.erb +0 -0
- data/templates/origen_guides/program/flows.md.erb +0 -0
- data/templates/origen_guides/program/generating.md.erb +0 -0
- data/templates/origen_guides/program/interface.md.erb +0 -0
- data/templates/origen_guides/program/introduction.md.erb +0 -0
- data/templates/origen_guides/program/j750.md.erb +0 -0
- data/templates/origen_guides/program/philosophy.md.erb +0 -0
- data/templates/origen_guides/program/resources.md.erb +0 -0
- data/templates/origen_guides/program/ultraflex.md.erb +0 -0
- data/templates/origen_guides/program/v93k.md.erb +0 -0
- data/templates/origen_guides/program/v93ksmt7.md.erb +0 -0
- data/templates/origen_guides/program/v93ksmt8.md.erb +0 -0
- data/templates/web/index.md.erb +0 -0
- data/templates/web/layouts/_basic.html.erb +0 -0
- data/templates/web/layouts/_guides.html.erb +0 -0
- data/templates/web/partials/_navbar.html.erb +0 -0
- data/templates/web/partials/_placeholder.md.erb +0 -0
- data/templates/web/release_notes.md.erb +0 -0
- metadata +61 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b61e30758057f753a3f11c3f9e804ec902c04b11ab5d044eead50e933396dcc4
|
4
|
+
data.tar.gz: 56e4f2859a2dd2d3440f41b8f0025764a1fdbe49dd54266ec46f3f18f6ed4315
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 218203f35e42e7d2de5fa2668dca505dff43339e598ce231d9a5d57f6f8dd02d90f5fb3b53e6d4aef3bc6036eeebe4bc09663190fb192fa72e1aed3ed3e7eb2c
|
7
|
+
data.tar.gz: 83d9e9baee738fac32b9123d8991f18b5b4b3c00cbfda40b74fde58c75c7d052f3da23533e090c8cef611207ae037a151da9d78bad8446a0b696240cf10788c2
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Sample pattern text for the J750
|
2
|
+
// Source located at: lib/origen_testers/igxl_based_tester/decompiler
|
3
|
+
|
4
|
+
import tset tp0;
|
5
|
+
svm_only_file = no;
|
6
|
+
opcode_mode = extended;
|
7
|
+
compressed = yes;
|
8
|
+
|
9
|
+
vector ($tset, tclk, tdi, tdo, tms)
|
10
|
+
{
|
11
|
+
start_label pattern_st:
|
12
|
+
// Start of vector body
|
13
|
+
repeat 2 > tp0 X X X X ; // First Vector
|
14
|
+
repeat 5 > tp0 1 0 X 1 ;
|
15
|
+
end_module > tp0 X X X X ; // Last Vector
|
16
|
+
}
|
data/config/application.rb
CHANGED
@@ -40,6 +40,12 @@ class OrigenTestersApplication < Origen::Application
|
|
40
40
|
section.page :custom, heading: "Creating Custom Testers"
|
41
41
|
section.page :generating, heading: "Running the ProgGen"
|
42
42
|
end
|
43
|
+
index.section :decompilation, heading: "Decompilation", before: :simulation do |section|
|
44
|
+
section.page :overview, heading: "Overview & Example"
|
45
|
+
section.page :decompilerapi, heading: "Decompiling, Adding Pins, & Executing"
|
46
|
+
section.page :universalapi, heading: "Working with Decompiled Patterns"
|
47
|
+
section.page :platformspecifics, heading: "Platform Specifics"
|
48
|
+
end
|
43
49
|
end
|
44
50
|
}
|
45
51
|
|
data/config/boot.rb
CHANGED
@@ -5,6 +5,9 @@ require "origen_testers"
|
|
5
5
|
require "origen_testers/test/dut.rb"
|
6
6
|
require "origen_testers/test/block.rb"
|
7
7
|
require "origen_testers/test/dut2.rb"
|
8
|
+
require "origen_testers/test/empty_dut.rb"
|
9
|
+
require "origen_testers/test/complex_timing.rb"
|
10
|
+
|
8
11
|
# NOTE: Before adding new duts-- consider adding option to DUT class
|
9
12
|
# so we don't reduce overall code coverage-- thx, mgmt
|
10
13
|
require "origen_testers/test/nvm.rb"
|
data/config/commands.rb
CHANGED
@@ -21,6 +21,151 @@ aliases = {
|
|
21
21
|
# Now branch to the specific task code
|
22
22
|
case @command
|
23
23
|
|
24
|
+
# Generates a pattern model given the input file(s).
|
25
|
+
when "generate_pattern_model"
|
26
|
+
Origen.load_target
|
27
|
+
approved = ARGV.delete('--approve')
|
28
|
+
ARGV.each do |pat|
|
29
|
+
puts "Generating pattern model for #{pat}"
|
30
|
+
model = OrigenTesters::Decompiler.decompile(pat)
|
31
|
+
path = model.write_spec_yaml(approved: approved)
|
32
|
+
puts "Wrote model to: #{path}"
|
33
|
+
puts
|
34
|
+
end
|
35
|
+
exit 0
|
36
|
+
|
37
|
+
when "analyze_decompiler_performance", 'analyze_decomp_perf'
|
38
|
+
options = {
|
39
|
+
output_csv: Origen.app.root.join('tmp/origen_testers/analyze_decompiler_performance.csv'),
|
40
|
+
ramp: [1]
|
41
|
+
}
|
42
|
+
|
43
|
+
envs = {
|
44
|
+
j750: {output: "#{Origen.app!.root}/output/j750/pin_flip.atp", count_scale: 1.0},
|
45
|
+
v93k: {output: "#{Origen.app!.root}/output/v93k/pin_flip.avc", count_scale: 1.0},
|
46
|
+
stil: {output: "#{Origen.app!.root}/output/stil/pin_flip.stil", count_scale: 1.0},
|
47
|
+
}
|
48
|
+
|
49
|
+
opt_parser = OptionParser.new do |opts|
|
50
|
+
opts.banner = 'Run a performance test for the available decompilers.'
|
51
|
+
opts.on('-c', '--count COUNT', Integer, 'Overrides the full-toggle count (number of vectors)') { |c| options[:count] = c }
|
52
|
+
opts.on('-s', '--scale SCALE', Float, 'Overrides the default scale of 1.0 for all decompilers') do |s|
|
53
|
+
envs.each { |e, o| o[:count_scale] *= s }
|
54
|
+
end
|
55
|
+
opts.on('-e', '--environment NAME', String, 'Override the default environment, NAME can be a full path or a fragment of an environment file name') { |e| options[:environment] = e }
|
56
|
+
opts.on('-t', '--target NAME', String, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
57
|
+
opts.on('-p', '--pin NAME', String, 'Override the default pin for toggling. Default is \'tclk\'') { |t| options[:pin] = t }
|
58
|
+
opts.on('--output_csv CSV_FILE', String, "Override the default output name & directory for the resulting CSV file. Default: #{options[:output_csv]}") { |o| options[:output_csv] = Pathname(o) }
|
59
|
+
opts.on('-r', '--ramp [RAMPS]', String, 'Run multiple tests, applying an additional count_scale of 0.1, 0.5, 1, 5, 10, 50, 100 each time. Note: with the default scale count of 10k, this becomes: 1k, 5k, 10k, 50k, 100k, 500k, 1mil. Or, supplying custom ramps formatted as count1,count2,...') do |r|
|
60
|
+
if r
|
61
|
+
options[:ramp] = r.split(',').map(&:to_f)
|
62
|
+
else
|
63
|
+
options[:ramp] = [0.1, 0.5, 1, 5, 10, 50, 100]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
envs.each do |env, o|
|
68
|
+
opts.on("--#{env}_scale SCALE", Float, "Additinally scales the #{env} platform") { |s| envs[env][:count_scale] *= s }
|
69
|
+
end
|
70
|
+
|
71
|
+
opts.separator ''
|
72
|
+
opts.on('-h', '--help', 'Show this message') { puts opts; exit 0 }
|
73
|
+
end
|
74
|
+
opt_parser.parse! ARGV
|
75
|
+
unless options[:output_csv].dirname.exist?
|
76
|
+
FileUtils.mkdir_p(options[:output_csv].dirname)
|
77
|
+
end
|
78
|
+
|
79
|
+
Origen.log.info "Testing Decompiler Performance..."
|
80
|
+
Origen.log.info "Performing setup..."
|
81
|
+
|
82
|
+
Origen.target.temporary = options[:target] || 'default'
|
83
|
+
Origen.load_target
|
84
|
+
ENV['ORIGEN_TESTERS_BIT_FLIP_PIN'] = options[:pin] || 'tclk'
|
85
|
+
|
86
|
+
Origen.log.info
|
87
|
+
Origen.log.info "Generating pattern 'pin_flip' toggling pin #{ENV['ORIGEN_TESTERS_BIT_FLIP_PIN']}..."
|
88
|
+
|
89
|
+
File.open(options[:output_csv], 'w') do |c|
|
90
|
+
c.puts('Base Count (vectors),' + envs.keys.map { |e| "#{e} (User Time (Seconds))" }.join(','))
|
91
|
+
|
92
|
+
options[:ramp].each do |r|
|
93
|
+
count = (options[:count] || 10_000) * r
|
94
|
+
envs.each do |e, opts|
|
95
|
+
env_count = (opts[:count_scale] * count).to_i.to_s
|
96
|
+
Origen.log.info " Generating pattern for environment: #{e}.rb... "
|
97
|
+
Origen.log.info " Target Count: #{env_count}"
|
98
|
+
|
99
|
+
ENV['ORIGEN_TESTERS_BIT_FLIP_COUNT'] = env_count
|
100
|
+
Origen.environment.temporary = "#{e}.rb"
|
101
|
+
Origen.load_target
|
102
|
+
Origen.app.runner.generate(patterns: 'pin_flip')
|
103
|
+
end
|
104
|
+
|
105
|
+
target_env = options[:environment] || 'v93k.rb'
|
106
|
+
Origen.log.info
|
107
|
+
Origen.log.info "Conversion Target Env: #{target_env}"
|
108
|
+
Origen.log.info "Converting Patterns..."
|
109
|
+
fields = {'User Time' => 0, 'System time' => 1, 'Elapsed Time' => 3, 'Peak Memory Usage' => 8}
|
110
|
+
resource_usages = {}
|
111
|
+
maxes = fields.map { |k, v| [k, [0.0, nil]] }.to_h
|
112
|
+
mins = fields.map { |k, v| [k, [Float::INFINITY, nil]] }.to_h
|
113
|
+
envs.each do |env, opts|
|
114
|
+
usage = {}
|
115
|
+
cmd = "/usr/bin/time -v origen convert #{opts[:output]} -e #{target_env} -o #{Origen.app!.root}/output/performance_test/#{env} -t #{Origen.target.name}"
|
116
|
+
puts cmd
|
117
|
+
out, err, stat = Open3.capture3(cmd)
|
118
|
+
output = err.split("\n")
|
119
|
+
fields.each do |f, i|
|
120
|
+
if f == 'Elapsed Time'
|
121
|
+
t = Time.parse("0:#{output[i+1].split(': ').last}")
|
122
|
+
usage[f] = ((t.min * 60) + t.sec).to_f
|
123
|
+
else
|
124
|
+
usage[f] = output[i+1].split(': ').last.to_f
|
125
|
+
end
|
126
|
+
if usage[f] > maxes[f][0]
|
127
|
+
maxes[f] = [usage[f], env]
|
128
|
+
end
|
129
|
+
if usage[f] < mins[f][0]
|
130
|
+
mins[f] = [usage[f], env]
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
resource_usages[env] = usage
|
135
|
+
puts out
|
136
|
+
puts err
|
137
|
+
end
|
138
|
+
|
139
|
+
Origen.log.info
|
140
|
+
Origen.log.info "Usage Report:"
|
141
|
+
Origen.log.info "Count Scales:"
|
142
|
+
envs.each do |env, opts|
|
143
|
+
Origen.log.info " #{env}: #{opts[:count_scale]} (#{opts[:count_scale] * count.to_i})"
|
144
|
+
end
|
145
|
+
Origen.log.info "File sizes:"
|
146
|
+
envs.each do |env, opts|
|
147
|
+
Origen.log.info " #{opts[:output]}: %.2f MiB" % (File.size(opts[:output]).to_f / 2**20)
|
148
|
+
end
|
149
|
+
fields.keys.each do |f|
|
150
|
+
Origen.log.info " #{f}:"
|
151
|
+
Origen.log.info " Max: #{maxes[f][0]} (#{maxes[f][1]})"
|
152
|
+
Origen.log.info " Min: #{mins[f][0]} (#{mins[f][1]})"
|
153
|
+
s = '%.2f' % (maxes[f][0] - mins[f][0])
|
154
|
+
Origen.log.info " Diff Max-to-Min: #{s}"
|
155
|
+
s = '%.2f' % ((mins[f][0] / maxes[f][0]) * 100)
|
156
|
+
Origen.log.info " Scale Max-to-Min: #{s}%"
|
157
|
+
s = '%.2f' % ((maxes[f][0] / mins[f][0]) * 100)
|
158
|
+
Origen.log.info " Scale Min-to-Max: #{s}%"
|
159
|
+
end
|
160
|
+
|
161
|
+
c.puts("#{count}," + resource_usages.values.collect { |u| u['User Time'] }.join(','))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
Origen.log.info
|
165
|
+
Origen.log.info "Output CSV available at: #{options[:output_csv]}"
|
166
|
+
|
167
|
+
exit 0
|
168
|
+
|
24
169
|
when "tags"
|
25
170
|
Dir.chdir Origen.root do
|
26
171
|
system "ripper-tags --recursive lib"
|
@@ -45,9 +190,9 @@ when "examples", "test"
|
|
45
190
|
# ARGV = %w(templates/example.txt.erb -t debug -r approved)
|
46
191
|
# load "origen/commands/compile.rb"
|
47
192
|
if Origen.app.stats.changed_files == 0 &&
|
48
|
-
|
49
|
-
|
50
|
-
|
193
|
+
Origen.app.stats.new_files == 0 &&
|
194
|
+
Origen.app.stats.changed_patterns == 0 &&
|
195
|
+
Origen.app.stats.new_patterns == 0
|
51
196
|
|
52
197
|
Origen.app.stats.report_pass
|
53
198
|
else
|
data/config/global_commands.rb
CHANGED
File without changes
|
data/config/shared_commands.rb
CHANGED
File without changes
|
data/config/users.rb
CHANGED
File without changes
|
data/config/version.rb
CHANGED
data/lib/commands/build.rb
CHANGED
File without changes
|
data/lib/commands/convert.rb
CHANGED
@@ -67,19 +67,25 @@ else
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def converter(file, options = {})
|
70
|
-
|
71
|
-
case snippet
|
72
|
-
when /STIL \d+\.\d+/
|
70
|
+
if OrigenTesters.decompiler_for?(file)
|
73
71
|
lambda do
|
74
|
-
|
75
|
-
# Use raw pin names in the output pattern and not the ALL pin group or similar, maybe
|
76
|
-
# make this an option in future though
|
77
|
-
dut.pin_pattern_order(*dut.pins.map { |id, pin| id })
|
78
|
-
STIL.execute(file, set_timesets: true)
|
72
|
+
OrigenTesters.execute(file)
|
79
73
|
end
|
80
74
|
else
|
81
|
-
|
82
|
-
|
75
|
+
snippet = IO.read(file, 2000) # Read first 2000 characters
|
76
|
+
case snippet
|
77
|
+
when /STIL \d+\.\d+/
|
78
|
+
lambda do
|
79
|
+
STIL.add_pins(file)
|
80
|
+
# Use raw pin names in the output pattern and not the ALL pin group or similar, maybe
|
81
|
+
# make this an option in future though
|
82
|
+
dut.pin_pattern_order(*dut.pins.map { |id, pin| id })
|
83
|
+
STIL.execute(file, set_timesets: true)
|
84
|
+
end
|
85
|
+
else
|
86
|
+
Origen.log.error "Unknown input format for file: #{file}"
|
87
|
+
nil
|
88
|
+
end
|
83
89
|
end
|
84
90
|
end
|
85
91
|
|
data/lib/commands/run.rb
CHANGED
File without changes
|
data/lib/origen_testers.rb
CHANGED
@@ -38,6 +38,9 @@ module OrigenTesters
|
|
38
38
|
ATP::Program.load(f)
|
39
39
|
end
|
40
40
|
end
|
41
|
+
|
42
|
+
require 'origen_testers/decompiler'
|
43
|
+
extend Decompiler::API
|
41
44
|
end
|
42
45
|
autoload :ATP, 'origen_testers/atp_deprecation'
|
43
46
|
|
@@ -51,3 +54,5 @@ require 'origen_testers/pattern_compilers/runner'
|
|
51
54
|
require 'origen_testers/callback_handlers'
|
52
55
|
require 'origen_testers/origen_ext/pins/pin'
|
53
56
|
require 'origen_testers/origen_ext/pins/pin_collection'
|
57
|
+
require 'origen_testers/origen_ext/pins/timing'
|
58
|
+
require 'origen_testers/origen_ext/pins/timing/timeset'
|
data/lib/origen_testers/api.rb
CHANGED
@@ -239,6 +239,10 @@ module OrigenTesters
|
|
239
239
|
repeat: nil
|
240
240
|
}.merge(options)
|
241
241
|
|
242
|
+
unless timeset.period_in_ns?
|
243
|
+
fail "You must supply a period_in_ns to timeset '#{timeset.name}' before you can cycle the tester!"
|
244
|
+
end
|
245
|
+
timeset.cycled = true
|
242
246
|
if PatSeq.thread
|
243
247
|
PatSeq.thread.cycle(options)
|
244
248
|
else
|
data/lib/origen_testers/atp.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,163 @@
|
|
1
|
+
module OrigenTesters
|
2
|
+
module Decompiler
|
3
|
+
module API
|
4
|
+
@registered_decompilers = []
|
5
|
+
|
6
|
+
# Decompiles the given pattern, returning
|
7
|
+
def decompile(pattern, options = {})
|
8
|
+
decompiled_pattern(pattern, options).decompile
|
9
|
+
end
|
10
|
+
|
11
|
+
# @note This method is the same as #decompile except that the module's
|
12
|
+
# #decompile method won't be automatically called.
|
13
|
+
def decompiled_pattern(pattern, options = {})
|
14
|
+
# decompiler!(pattern).decompiled_pattern(pattern)
|
15
|
+
_decompiler = options.delete(:decompiler)
|
16
|
+
_decompiler.nil? ? decompiler!(pattern).new(pattern, options) : _decompiler.new(pattern, options)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Creates a decompiled pattern from the raw input directly.
|
20
|
+
# In this case, no attempts to figure out the decompiler are made. The
|
21
|
+
# suitable decompiler should either be given with the :decompiler parameter,
|
22
|
+
# or the current environment will be used.
|
23
|
+
def decompile_text(text, decompiler: nil)
|
24
|
+
if decompiler.nil?
|
25
|
+
select_decompiler!.new(text, direct_source: true).decompile
|
26
|
+
else
|
27
|
+
decompiler.new(text, direct_source: true).decompile
|
28
|
+
end
|
29
|
+
end
|
30
|
+
alias_method :decompile_str, :decompile_text
|
31
|
+
alias_method :decompile_string, :decompile_text
|
32
|
+
alias_method :decompile_raw_input, :decompile_text
|
33
|
+
|
34
|
+
# Returns the decompiler module that will be uesd to decompile the
|
35
|
+
# given pattern source.
|
36
|
+
def select_decompiler(pattern = nil, options = {})
|
37
|
+
if pattern.is_a?(Hash)
|
38
|
+
options = pattern
|
39
|
+
pattern = nil
|
40
|
+
elsif pattern.nil?
|
41
|
+
options = {}
|
42
|
+
pattern = nil
|
43
|
+
end
|
44
|
+
|
45
|
+
# if respond_to?(:suitable_decompiler_for)
|
46
|
+
# puts "HI".red
|
47
|
+
# puts self
|
48
|
+
# registered_decompilers = [self]
|
49
|
+
# end
|
50
|
+
|
51
|
+
_registered_decompilers = respond_to?(:suitable_decompiler_for) ? [self] : registered_decompilers
|
52
|
+
|
53
|
+
# We have the list of modules that support decompilation, but those modules
|
54
|
+
# could have sub-modules that support other decompilation flavors.
|
55
|
+
# We'll select the decompiler by just iterating through each support
|
56
|
+
# decompiler and until we find one that supports either the file extension,
|
57
|
+
# or the current tester name.
|
58
|
+
_registered_decompilers.each do |m|
|
59
|
+
if pattern
|
60
|
+
mod = m.suitable_decompiler_for(pattern: pattern, **options)
|
61
|
+
elsif tester.nil?
|
62
|
+
return nil
|
63
|
+
else
|
64
|
+
mod = m.suitable_decompiler_for(tester: Origen.tester.name.to_s, **options)
|
65
|
+
end
|
66
|
+
|
67
|
+
if mod
|
68
|
+
return mod
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
nil
|
73
|
+
end
|
74
|
+
alias_method :decompiler, :select_decompiler
|
75
|
+
alias_method :decompiler_for, :select_decompiler
|
76
|
+
|
77
|
+
def select_decompiler!(pattern = nil, options = {})
|
78
|
+
mod = select_decompiler(pattern, options)
|
79
|
+
|
80
|
+
if mod.nil? && pattern
|
81
|
+
# Origen.log.error "Unknown decompiler for file extension '#{File.extname(pattern)}'"
|
82
|
+
Origen.app!.fail(
|
83
|
+
message: "Cannot find a suitable decompiler for pattern source '#{pattern}' ('#{File.extname(pattern)}')",
|
84
|
+
exception_class: OrigenTesters::Decompiler::NoSuitableDecompiler
|
85
|
+
)
|
86
|
+
elsif mod.nil?
|
87
|
+
# Origen.log.error "Unknown decompiler for tester #{Origen.tester.name}"
|
88
|
+
# fail "Current environment '#{Orige.current_environment}' does not contain a suitable decompiler! Cannot select this as the decompiler."
|
89
|
+
Origen.app!.fail(
|
90
|
+
message: "Current environment '#{Origen.environment.file.basename}' does not contain a suitable decompiler! Cannot select this as the decompiler.",
|
91
|
+
exception_class: OrigenTesters::Decompiler::NoSuitableDecompiler
|
92
|
+
)
|
93
|
+
end
|
94
|
+
mod
|
95
|
+
end
|
96
|
+
alias_method :decompiler!, :select_decompiler!
|
97
|
+
alias_method :decompiler_for!, :select_decompiler!
|
98
|
+
|
99
|
+
# Returns all the registered decompiler modules.
|
100
|
+
# @note Registered decompilers are stored on the OrigenTesters::Decompiler module.
|
101
|
+
def registered_decompilers
|
102
|
+
OrigenTesters::Decompiler::API.instance_variable_get(:@registered_decompilers)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Registers a new decompiler module.
|
106
|
+
# @return [TrueClass, FalseClass] Like Ruby's #require method, returns
|
107
|
+
# true if decompiler is now registered and returns false if the mod
|
108
|
+
# was previously registered.
|
109
|
+
# If there are problems registering the mod, an exception is raised.
|
110
|
+
# @raise [NoModule]
|
111
|
+
def register_decompiler(mod)
|
112
|
+
if mod.is_a?(String)
|
113
|
+
mod = eval(mod)
|
114
|
+
end
|
115
|
+
|
116
|
+
if registered_decompiler?(mod)
|
117
|
+
false
|
118
|
+
else
|
119
|
+
verify_decompiler_mod!(mod)
|
120
|
+
registered_decompilers << mod
|
121
|
+
true
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Verifies that the registered decompiler has the required methods
|
126
|
+
# available. Namely: #select_decompiler and #decompiled_pattern
|
127
|
+
def verify_decompiler_mod!(mod)
|
128
|
+
unless mod.respond_to?(:suitable_decompiler_for)
|
129
|
+
Origen.app!.fail(
|
130
|
+
exception_class: OrigenTesters::Decompiler::NoMethodError,
|
131
|
+
message: "No method #suitable_decompiler_for found on #{mod}. Cannot register as a decompiler."
|
132
|
+
)
|
133
|
+
end
|
134
|
+
true
|
135
|
+
end
|
136
|
+
|
137
|
+
# Queries if a decompiler is available for the given pattern.
|
138
|
+
def decompiler_for?(pattern = nil, options = {})
|
139
|
+
!select_decompiler(pattern, options).nil?
|
140
|
+
end
|
141
|
+
|
142
|
+
# Queries if the decompiler in mod has been registered.
|
143
|
+
def registered_decompiler?(mod)
|
144
|
+
if mod.is_a?(String)
|
145
|
+
mod = eval(mod)
|
146
|
+
end
|
147
|
+
|
148
|
+
registered_decompilers.include?(mod)
|
149
|
+
end
|
150
|
+
|
151
|
+
def execute(pattern, options = {})
|
152
|
+
decompile(pattern, options).execute(options)
|
153
|
+
end
|
154
|
+
|
155
|
+
def add_pins(pattern, options = {})
|
156
|
+
decompile(pattern, options).add_pins
|
157
|
+
end
|
158
|
+
|
159
|
+
def self.convert(pattern)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|