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
File without changes
|
data/pattern/bitmap.rb
CHANGED
File without changes
|
data/pattern/dc_instr.rb
CHANGED
File without changes
|
data/pattern/delay.rb
CHANGED
File without changes
|
data/pattern/freq_counter.rb
CHANGED
File without changes
|
data/pattern/mem_test.rb
CHANGED
File without changes
|
data/pattern/multi_vector.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/pattern/nvm/j750/timing.rb
CHANGED
@@ -35,8 +35,8 @@ Pattern.create do
|
|
35
35
|
gen_vectors
|
36
36
|
|
37
37
|
ss 'Test ability to call with a single array argument'
|
38
|
-
cc 'These vectors should use timeset
|
39
|
-
$tester.set_timeset(['
|
38
|
+
cc 'These vectors should use timeset nvm_slow_40ns'
|
39
|
+
$tester.set_timeset(['nvm_slow_40ns', 40]) do
|
40
40
|
gen_vectors
|
41
41
|
end
|
42
42
|
cc 'These vectors should use timeset nvm_fast'
|
@@ -51,10 +51,10 @@ Pattern.create do
|
|
51
51
|
ss 'Test that delay calculations are based on the current timeset period'
|
52
52
|
|
53
53
|
cc 'This should wait for 5 cycles, 1000/200'
|
54
|
-
$tester.set_timeset('
|
54
|
+
$tester.set_timeset('nvm_slow_200ns', 200)
|
55
55
|
$tester.wait(:time_in_ns => 1000)
|
56
56
|
cc 'This should wait for 25 cycles, 1000/40'
|
57
|
-
$tester.set_timeset('
|
57
|
+
$tester.set_timeset('nvm_fast_40ns', 40)
|
58
58
|
$tester.wait(:time_in_ns => 1000)
|
59
59
|
|
60
60
|
ss 'Test the period counter'
|
File without changes
|
data/pattern/pin_flip.rb
ADDED
data/pattern/read_write_reg.rb
CHANGED
File without changes
|
data/pattern/reset.rb
CHANGED
File without changes
|
data/pattern/simple.rb
ADDED
File without changes
|
data/pattern/subroutines.rb
CHANGED
File without changes
|
data/pattern/tester_overlay.rb
CHANGED
File without changes
|
data/pattern/tester_store.rb
CHANGED
File without changes
|
File without changes
|
data/program/_efa_resources.rb
CHANGED
File without changes
|
data/program/_erase.rb
CHANGED
File without changes
|
data/program/_erase_vfy.rb
CHANGED
File without changes
|
data/program/_iv_resources.rb
CHANGED
File without changes
|
data/program/basic_interface.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/program/components/_temp.rb
CHANGED
File without changes
|
data/program/custom_tests.rb
CHANGED
File without changes
|
data/program/flow_control.rb
CHANGED
File without changes
|
data/program/prb1.rb
CHANGED
File without changes
|
data/program/prb1_resources.rb
CHANGED
File without changes
|
data/program/prb2.rb
CHANGED
File without changes
|
data/program/test.rb
CHANGED
File without changes
|
data/templates/example.txt.erb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,192 @@
|
|
1
|
+
% render "layouts/guides.html" do
|
2
|
+
|
3
|
+
% testers_api_url = 'https://origen-sdk.org/testers/api/OrigenTesters'
|
4
|
+
|
5
|
+
`OrigenTesters` includes the
|
6
|
+
[OrigenTesters::Decompiler](<%= "#{testers_api_url}/Decompiler/API.html" %>)
|
7
|
+
[mixin](https://ruby-doc.com/docs/ProgrammingRuby/html/tut_modules.html).
|
8
|
+
In addition to [decompiling](#Decompiling), this mixin provides some shorthand methods
|
9
|
+
for [adding pins](#Adding_Pins) and [executing](#Executing)
|
10
|
+
|
11
|
+
A quick summary:
|
12
|
+
|
13
|
+
~~~ruby
|
14
|
+
# Decompile a pattern source from a file
|
15
|
+
OrigenTesters.decompile('path/to/src')
|
16
|
+
|
17
|
+
OrigenTesters.add_pins('path/to_src')
|
18
|
+
#=> Queries the pattern's pins and adds any missing pins to the DUT
|
19
|
+
|
20
|
+
OrigenTesters.execute('path/to/src')
|
21
|
+
#=> Executes the pattern source in its entirety.
|
22
|
+
~~~
|
23
|
+
|
24
|
+
<div class="alert alert-warning" role="alert">
|
25
|
+
Neither <code>#add_pins</code> nor <code>#execute</code> support input as
|
26
|
+
a direct source. Use <code>#decompile_text</code> to get decompiled pattern,
|
27
|
+
then call <code>#add_pins</code> or <code>#execute</code> on that,
|
28
|
+
<a href='<%= path "guides/decompilation/overview#Example_Decompilation" %>'>as shown in the example.</a>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
### Decompiling
|
32
|
+
|
33
|
+
Decompiling the pattern source is the first step to working with it in Origen. The
|
34
|
+
`#decompile` method, when called on the `Decompiler API`, will do two things:
|
35
|
+
|
36
|
+
1. Using the pattern's extension, attempt to match the pattern source to the applicable decompiler.
|
37
|
+
2. Decompile the source, returning the decompiled pattern object.
|
38
|
+
|
39
|
+
For example, any input ending with `.atp` routes to the `IGXLBasedTester`
|
40
|
+
decompiler and input ending with `.avc` routes to the `SmartestBasedTester`
|
41
|
+
decompiler.
|
42
|
+
|
43
|
+
~~~ruby
|
44
|
+
pat = OrigenTesters.decompile('path/to/src.atp')
|
45
|
+
#=> OrigenTesters::IGXLBasedTester::Pattern
|
46
|
+
pat.decompiled?
|
47
|
+
#=> true
|
48
|
+
|
49
|
+
pat = OrigenTesters.decompile('path/to/src.avc')
|
50
|
+
#=> OrigenTesters::SmartestBasedTester::Pattern
|
51
|
+
pat.decompiled?
|
52
|
+
#=> true
|
53
|
+
~~~
|
54
|
+
|
55
|
+
You can also a get a pre-decompiled pattern object using `#decompiled_pattern`:
|
56
|
+
|
57
|
+
~~~ruby
|
58
|
+
pat = OrigenTesters.decompiled_pattern('path/to/src.atp')
|
59
|
+
#=> OrigenTesters::IGXLBasedTester::Pattern
|
60
|
+
pat.decompiled?
|
61
|
+
#=> false
|
62
|
+
|
63
|
+
pat = OrigenTesters.decompiled_pattern('path/to/src.avc')
|
64
|
+
#=> OrigenTesters::SmartestBasedTester::Pattern
|
65
|
+
pat.decompiled?
|
66
|
+
#=> false
|
67
|
+
~~~
|
68
|
+
|
69
|
+
If either method cannot find an applicable decompiler given the extension,
|
70
|
+
an exception is raised:
|
71
|
+
|
72
|
+
~~~ruby
|
73
|
+
pat = OrigenTesters.decompiled_pattern('path/to/src.blah')
|
74
|
+
#=> OrigenTesters::Decompiler::NoSuitableDecompiler
|
75
|
+
#=> Fail in origen_testers: Cannot find a suitable decompiler for pattern source 'pat.blah' ('.blah')
|
76
|
+
~~~
|
77
|
+
|
78
|
+
If you want to decompile a source from a `String` object directly, use `#decompile_text`.
|
79
|
+
You'll need to provide the applicable decompiler, as the `Decompiler API` is
|
80
|
+
not able to map a text source to the appropriate decompiler:
|
81
|
+
|
82
|
+
~~~ruby
|
83
|
+
pat = OrigenTesters.decompile_text("src as string", decompiler: OrigenTesters::IGXLBasedTester::Pattern)
|
84
|
+
#=> OrigenTesters::SmartestBasedTester::Pattern
|
85
|
+
pat.decompiled?
|
86
|
+
#=> true
|
87
|
+
~~~
|
88
|
+
|
89
|
+
#### Discerning Platform Decompilers
|
90
|
+
|
91
|
+
Platforms can register themselves as an available `decompiler` during bootup.
|
92
|
+
Discerning the appropriate decompiler boils down to asking each registered
|
93
|
+
decompiler if it is available to decompile the given source. Each decompiler
|
94
|
+
will respond _yes_ or _no_ and on the __first__ _yes_,
|
95
|
+
that decompiler will be selected. If no decompilers respond _yes_,
|
96
|
+
a `OrigenTesters::Decompiler::NoSuitableDecompiler` exception is raised.
|
97
|
+
|
98
|
+
As a user of the decompiler, simply inputting an appropriately named source should
|
99
|
+
trigger the correct decompiler, but the methods used underneath are available
|
100
|
+
as well:
|
101
|
+
|
102
|
+
~~~ruby
|
103
|
+
### See the registered decompilers
|
104
|
+
|
105
|
+
OrigenTesters.registered_decompilers
|
106
|
+
#=> <%= OrigenTesters.registered_decompilers %>
|
107
|
+
|
108
|
+
### See if an applicable decompiler exists for the pattern source
|
109
|
+
|
110
|
+
OrigenTesters.decompiler_for?("pat.atp")
|
111
|
+
#=> <%= OrigenTesters.decompiler_for?('pat.atp') %>
|
112
|
+
|
113
|
+
OrigenTesters.decompiler_for?("pat.blah")
|
114
|
+
#=> <%= OrigenTesters.decompiler_for?('pat.blah') %>
|
115
|
+
|
116
|
+
### Given the pattern source, select the appropriate decompiler, or return nil
|
117
|
+
|
118
|
+
OrigenTesters.select_decompiler("pat.atp")
|
119
|
+
#=> <%= OrigenTesters.select_decompiler('pat.atp') %>
|
120
|
+
|
121
|
+
OrigenTesters.select_decompiler("pat.blah")
|
122
|
+
#=> nil
|
123
|
+
|
124
|
+
### Given the pattern source, select the appropriate decompiler or raise and exception
|
125
|
+
### (Notice the '!')
|
126
|
+
|
127
|
+
OrigenTesters.select_decompiler!("pat.atp")
|
128
|
+
#=> <%= OrigenTesters.select_decompiler('pat.atp') %>
|
129
|
+
|
130
|
+
OrigenTesters.select_decompiler!("pat.blah")
|
131
|
+
% begin
|
132
|
+
% OrigenTesters.select_decompiler!("pat.blah")
|
133
|
+
% rescue Exception => e
|
134
|
+
#=> <%= e.class %>
|
135
|
+
#=> <%= e.message %>
|
136
|
+
% end
|
137
|
+
|
138
|
+
### See if the given module provides a decompiler
|
139
|
+
|
140
|
+
OrigenTesters.registered_decompiler?(OrigenTesters::IGXLBasedTester)
|
141
|
+
#=> <%= OrigenTesters.registered_decompiler?(OrigenTesters::IGXLBasedTester) %>
|
142
|
+
|
143
|
+
OrigenTesters.registered_decompiler?(Origen)
|
144
|
+
#=> <%= OrigenTesters.registered_decompiler?(Origen) %>
|
145
|
+
~~~
|
146
|
+
|
147
|
+
### Shorthand Methods
|
148
|
+
|
149
|
+
The `Decompiler API` supports some short-hand calls to common methods. The calls
|
150
|
+
here are equivalent to calling `#decompile`, then the corresponding method on
|
151
|
+
that decompiled pattern.
|
152
|
+
|
153
|
+
#### Adding Pins
|
154
|
+
|
155
|
+
Recall that `#add_pins` compares the available pins between the pattern source and
|
156
|
+
the `DUT` and adds any missing pins from the pattern source to the `DUT`, returning
|
157
|
+
any pins that it added. The `Decompiler API` has a shorthand method to perform
|
158
|
+
this operation: `OrigenTesters.add_pins('path/to/src')`. This will:
|
159
|
+
|
160
|
+
1. Decompile the source, using the corresponding platform decompiler.
|
161
|
+
2. Add any missing pins to the `DUT`.
|
162
|
+
|
163
|
+
~~~ruby
|
164
|
+
OrigenTesters.add_pins('pat.atp')
|
165
|
+
# Decompiles the pattern using the .atp decompiler
|
166
|
+
# Adds the pins to the DUT
|
167
|
+
# Returns any pins added to the DUT
|
168
|
+
#=> Array
|
169
|
+
~~~
|
170
|
+
|
171
|
+
#### Executing
|
172
|
+
|
173
|
+
Recall that `#execute` will actually execute the decompiled pattern in the context
|
174
|
+
of the current `DUT`.
|
175
|
+
|
176
|
+
Assuming the current `DUT` has been instantiated and all timesets are defined,
|
177
|
+
calling `OrigenTesters.execeute('path/to/src')` will:
|
178
|
+
|
179
|
+
1. Decompile the source, using the corresponding platform decompiler.
|
180
|
+
2. Add any missing pins to the `DUT`.
|
181
|
+
3. Execute the pattern.
|
182
|
+
|
183
|
+
~~~ruby
|
184
|
+
OrigenTesters.execute('pattern.atp')
|
185
|
+
# Decompiles the pattern using the .atp decompiler
|
186
|
+
# Adds the pins to the DUT
|
187
|
+
# Execute the pattern source
|
188
|
+
# Returns the decompiled pattern object
|
189
|
+
#=> OrigenTesters::IGXLBasedTesters::Pattern
|
190
|
+
~~~
|
191
|
+
|
192
|
+
% end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
% render "layouts/guides.html" do
|
2
|
+
|
3
|
+
% # Test pattern that'll be used throughout these guides.
|
4
|
+
% # Using the actual pattern object itself to get real return values when possible.
|
5
|
+
% class OrigenDecompilerDocDut
|
6
|
+
% include Origen::TopLevel
|
7
|
+
% end
|
8
|
+
% Origen.load_target('configurable', dut: OrigenDecompilerDocDut)
|
9
|
+
% pat = OrigenTesters.decompile_text(OrigenTesters::IGXLBasedTester.sample_direct_source, decompiler: OrigenTesters::IGXLBasedTester::Pattern)
|
10
|
+
|
11
|
+
Origen provides some basic functionality for decompiling, or reverse-compiling,
|
12
|
+
a pattern from its text representation (e.g., `.atp` for the J750 platform),
|
13
|
+
returning an object which Origen can work with.
|
14
|
+
|
15
|
+
### Philosophy
|
16
|
+
|
17
|
+
The decompiler attempts to support two, somewhat competing, goals:
|
18
|
+
|
19
|
+
1. Provide a `universal API` for working with decompiled patterns from any platform.
|
20
|
+
2. Allow platforms to implement the `universal API` in such a way that still maintains
|
21
|
+
the aspects only present on that particular platform (_platform-specifics_).
|
22
|
+
|
23
|
+
The aim is to provide the best of both worlds: a generic-enough,
|
24
|
+
`universal API` to accomplish most tasks, without regard to platform-specifics,
|
25
|
+
but not bar those platform-specifics completely in the event that such
|
26
|
+
a generic method either isn't available, isn't possible, or wouldn't be applicable
|
27
|
+
across more than a single platform.
|
28
|
+
|
29
|
+
### Definitions
|
30
|
+
|
31
|
+
In the context of the _decompilation_ sections, the following definition apply:
|
32
|
+
|
33
|
+
* Pattern Source: The text-representation of the a pattern.
|
34
|
+
* Platform: Producer of `Pattern Sources`. In most cases, this will be an ATE,
|
35
|
+
such as `j750`, or `v93k`, but this also could be `STIL` or `WGL`.
|
36
|
+
* Platform-Specifics: Any aspect which separates this platform from another,
|
37
|
+
outside of the _actual_ parsing and grammar rules.
|
38
|
+
* (Decompiled) Pattern: The instance of an object returned after successful
|
39
|
+
decompilation of a `Pattern Source` by a `Decompiler`.
|
40
|
+
* Note, this will often be written fully as `decompiled pattern`, to avoid additional confusion.
|
41
|
+
* Decompiler: The object that takes a `Pattern Source` and returns a `Pattern`.
|
42
|
+
There are two _flavors_ of this:
|
43
|
+
* In some context, this will be the `generic Decompiler`, that is, the abstract base which, itself, can't actually decompile anything.
|
44
|
+
* However, in most contexts this will refer to a specific platform.
|
45
|
+
For example, _"the J750 decompiler"_, refers to the J750's implementation of the `generic decompiler`, or
|
46
|
+
the `OrigenTesters::IGXLBasedTester::Pattern` class.
|
47
|
+
|
48
|
+
### Example Decompilation
|
49
|
+
|
50
|
+
This example shows some basic usage of the decompiler, without assuming you have
|
51
|
+
a pattern source for a supported platform ready to go. This example makes use of the `J750` platform.
|
52
|
+
If you aren't familiar with this platform, don't worry; understanding of the pattern source format is not a requirement
|
53
|
+
for _using_ the decompiler, specifically in the sense of the `universal API`.
|
54
|
+
|
55
|
+
#### Requirements
|
56
|
+
|
57
|
+
In order to follow along with these examples, you will need:
|
58
|
+
|
59
|
+
* Some `dut` object that does not have the pins `tclk`, `tms`, `tdo`, or `tdi`
|
60
|
+
already defined (you can still follow along, but you will not receive identical
|
61
|
+
return values from `#add_pins` (covered later) if these pins are already defined).
|
62
|
+
|
63
|
+
#### Decompiling Direct Source
|
64
|
+
|
65
|
+
The first step to working with a pattern source in Origen is to decompile said source.
|
66
|
+
The decompiler is accessed directly on the `OrigenTesters` module, and contains
|
67
|
+
methods to decompile a source from a given input string.
|
68
|
+
Consider the source, from a J750 `.atp`, below:
|
69
|
+
|
70
|
+
~~~
|
71
|
+
<%= OrigenTesters::IGXLBasedTester.sample_direct_source %>
|
72
|
+
~~~
|
73
|
+
|
74
|
+
Placing this in a `String`, we can decompile this directly using the the
|
75
|
+
`#decompile_text` method and providing the target decompiler:
|
76
|
+
|
77
|
+
<div class="alert alert-success" role="alert">
|
78
|
+
The source above is available as a <code>String</code> already:
|
79
|
+
|
80
|
+
<code>OrigenTesters::IGXLBasedTester.sample_direct_source</code>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
~~~ruby
|
84
|
+
# A very basic, pre-defined .atp source for the J750 platform
|
85
|
+
src = OrigenTesters::IGXLBasedTester.sample_direct_source
|
86
|
+
|
87
|
+
# Decompile this source.
|
88
|
+
pat = OrigenTesters.decompile_text(src, decompiler: OrigenTesters::IGXLBasedTester::Pattern)
|
89
|
+
#=> OrigenTesters::IGXLBasedTester::Pattern object
|
90
|
+
~~~
|
91
|
+
|
92
|
+
Since we've specified that this is an `IGXLBasedTester` source, the `#decompile_text` method
|
93
|
+
will use that as the target decompiler and return an object corresponding to
|
94
|
+
that specific platform's decompiler: `OrigenTesters::IGXLBasedTester::Pattern`.
|
95
|
+
|
96
|
+
If you have your own pattern source you'd rather compile, the `#decompile` method
|
97
|
+
will accept a filename either as a `String` or `Pathname` object:
|
98
|
+
|
99
|
+
~~~ruby
|
100
|
+
pat = OrigenTesters.decompile('path/to/src.atp')
|
101
|
+
#=> (for a source ending with .atp)
|
102
|
+
#=> OrigenTesters::IGXLBasedTester::Pattern object
|
103
|
+
~~~
|
104
|
+
|
105
|
+
<div class="alert alert-info" role="alert">
|
106
|
+
The decompiler will try to match the platform based on the extension of the given
|
107
|
+
filename. <a href='<%= path "guides/decompilation/decompilerapi#Discerning_Platform_Decompilers" %>'>See the decompilating section for additional details</a>.
|
108
|
+
</div>
|
109
|
+
|
110
|
+
Now, we can interact with our decompiled pattern. Some easy things we may want to do:
|
111
|
+
|
112
|
+
* [Query which pins are present in the pattern source](#Discerning_Pattern_Source_Pins)
|
113
|
+
* [Add those pins to the <code>DUT</code>](#Adding_Missing_Pins)
|
114
|
+
* [Iterate through the vectors, printing the repeat count and the pin states](#Vectors)
|
115
|
+
* [Execute the source in its entirety, in the context of the current <code>DUT</code>](#Executing_the_Pattern_Source)
|
116
|
+
|
117
|
+
#### Discerning Pattern Source Pins
|
118
|
+
|
119
|
+
There's two methods available to retrieve the pins: `#pins` and `#pin_sizes`.
|
120
|
+
|
121
|
+
~~~ruby
|
122
|
+
# Return an array of pins, in the order they appear in the pattern
|
123
|
+
pat.pins
|
124
|
+
#=> <%= pat.pins %>
|
125
|
+
|
126
|
+
# Return the pin names and their respective size
|
127
|
+
pat.pin_sizes
|
128
|
+
#=> <%= pat.pin_sizes %>
|
129
|
+
~~~
|
130
|
+
|
131
|
+
#### Adding Missing Pins
|
132
|
+
|
133
|
+
One of the most common operations with respect to the pins is to simply add any
|
134
|
+
missing pins to the current `dut`. The decompiled pattern has a built-in method
|
135
|
+
to do just that:
|
136
|
+
|
137
|
+
~~~ruby
|
138
|
+
# Assume the current dut has no pins
|
139
|
+
dut.pins
|
140
|
+
#=> <%= dut.pins %>
|
141
|
+
|
142
|
+
pat.add_pins
|
143
|
+
#=> <%= pat.add_pins %>
|
144
|
+
|
145
|
+
dut.pins
|
146
|
+
#=> <%= dut.pins %>
|
147
|
+
~~~
|
148
|
+
|
149
|
+
`#add_pins` will return any pins it added to the `dut`. For example, if the `dut`
|
150
|
+
already had all the pins from the pattern defined, `#add_pins` would've returned
|
151
|
+
`an empty array`. Running the above a second time:
|
152
|
+
|
153
|
+
~~~ruby
|
154
|
+
# Assume the current dut has no pins
|
155
|
+
dut.pins
|
156
|
+
#=> <%= dut.pins %>
|
157
|
+
|
158
|
+
pat.add_pins
|
159
|
+
#=> <%= pat.add_pins %>
|
160
|
+
|
161
|
+
dut.pins
|
162
|
+
#=> <%= dut.pins %>
|
163
|
+
~~~
|
164
|
+
|
165
|
+
#### Vectors
|
166
|
+
|
167
|
+
We can iterate through each _'vector'_ in the decompiled pattern with `#each_vector`.
|
168
|
+
This method takes a block and runs it for each _'vector'_ encountered. Notice the
|
169
|
+
quotes around _'vector'_. Each `v` in the example above is actually a `VectorBodyElement` object
|
170
|
+
that acts as a placeholder for any `element type` that could appear.
|
171
|
+
Each `vector body element` has a `type` associated with it to discern exactly
|
172
|
+
what it is:
|
173
|
+
|
174
|
+
~~~ruby
|
175
|
+
pat.each_vector { |v| puts v.type }
|
176
|
+
% # Use the collect method to return an actual array that'll render in the docs.
|
177
|
+
<%= pat.collect { |v| ":#{v.type}" }.join("\n") %>
|
178
|
+
#=> nil
|
179
|
+
~~~
|
180
|
+
|
181
|
+
Now that we have the `type`, we can access the underlying `element`.
|
182
|
+
In the example below, we'll check the `type` first and, in the event of a `:vector`,
|
183
|
+
access the underlying `element` and print its repeat count and pin states.
|
184
|
+
|
185
|
+
~~~ruby
|
186
|
+
pat.each_vector { |v| puts "(#{v.element.repeat}) #{v.element.pin_states}" if v.type == :vector }
|
187
|
+
% # Use the collect method to return an actual array that'll render in the docs.
|
188
|
+
<%= pat.select { |v| v if v.type == :vector }.map { |v| "(#{v.element.repeat}) #{v.element.pin_states}" } .join("\n") %>
|
189
|
+
#=> nil
|
190
|
+
~~~
|
191
|
+
|
192
|
+
<div class="alert alert-info" role="alert">
|
193
|
+
Note that <code>#each_vector</code> returns <code>nil</code>, <b>NOT</b> an
|
194
|
+
array containing all the vectors like a normal `each` method would do.
|
195
|
+
<a href='<%= path "guides/decompilation/universalapi#Contextual_Notes_For_vector_at"%>'>See the section on working with vectors</a>
|
196
|
+
for <i>why</i> this is the case.
|
197
|
+
</div>
|
198
|
+
|
199
|
+
There's much more to vectors and vector types.
|
200
|
+
[See the vectors section](<%= path "guides/decompilation/universalapi#Vector_Body_Elements" %>)
|
201
|
+
for further details.
|
202
|
+
|
203
|
+
#### Executing the Pattern Source
|
204
|
+
|
205
|
+
Now that we've added any missing pins to our `dut` and we've seen how to access
|
206
|
+
the vectors themselves, we can `execute` the pattern source. The `#execute`
|
207
|
+
method will iterate through each vector, apply the pin states, and
|
208
|
+
cycle the tester `repeat` number of times.
|
209
|
+
|
210
|
+
~~~ruby
|
211
|
+
pat.execute
|
212
|
+
~~~
|
213
|
+
|
214
|
+
% end
|