origen_testers 0.41.0 → 0.42.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -0,0 +1,291 @@
|
|
1
|
+
% render "layouts/guides.html" do
|
2
|
+
|
3
|
+
% testers_api_url = 'https://origen-sdk.org/testers/api/OrigenTesters'
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<!-- Headers -->
|
7
|
+
<tr>
|
8
|
+
<th>Platform</th>
|
9
|
+
<th>File Extension(s)</th>
|
10
|
+
<th>Decompiled Pattern Class</th>
|
11
|
+
<th>Module Name</th>
|
12
|
+
<th>Vector Body Elements</th>
|
13
|
+
<th>Vector Platform Nodes</th>
|
14
|
+
<th>Additional Information</th>
|
15
|
+
</tr>
|
16
|
+
<!-- J750 -->
|
17
|
+
<tr>
|
18
|
+
<td>J750</td>
|
19
|
+
<td><code>.atp</code></td>
|
20
|
+
<td><code>OrigenTesters::IGXLBasedTester::Pattern</code></td>
|
21
|
+
<td><code>OrigenTesters::IGXLBasedTester</code></td>
|
22
|
+
<td><code>:start_label</code>, <code>:global_label</code>, <code>:vector</code>, <code>:label</code></td>
|
23
|
+
<td><code>opcode</code>, <code>opcode_arguments</code></td>
|
24
|
+
<td><a href='#Teradyne_J750_and_Ultraflex'>J750 & Ultraflex</a></td>
|
25
|
+
</tr>
|
26
|
+
<!-- Uflex -->
|
27
|
+
<tr>
|
28
|
+
<td>Ultraflex</td>
|
29
|
+
<td><code>.atp</code></td>
|
30
|
+
<td><code>OrigenTesters::IGXLBasedTester::Pattern</code></td>
|
31
|
+
<td><code>OrigenTesters::IGXLBasedTester</code></td>
|
32
|
+
<td><code>:start_label</code>, <code>:global_label</code>, <code>:vector</code>, <code>:label</code></td>
|
33
|
+
<td><code>opcode</code>, <code>opcode_arguments</code></td>
|
34
|
+
<td><a href='#Teradyne_J750_and_Ultraflex'>J750 & Ultraflex</a></td>
|
35
|
+
</tr>
|
36
|
+
<!-- V93K -->
|
37
|
+
<tr>
|
38
|
+
<td>V93K</td>
|
39
|
+
<td><code>.avc</code></td>
|
40
|
+
<td><code>OrigenTesters::SmartestBasedTester::Pattern</code></td>
|
41
|
+
<td><code>OrigenTesters::SmartestBasedTester</code></td>
|
42
|
+
<td><code>:sequencer_instruction</code>, <code>:vector</code></td>
|
43
|
+
<td><b>N/A</b></td>
|
44
|
+
<td><a href='#Advantest_V93K'>V93K</a></td>
|
45
|
+
</tr>
|
46
|
+
</table>
|
47
|
+
|
48
|
+
### Teradyne J750 and Ultraflex
|
49
|
+
|
50
|
+
Both supported Teradyne platforms share the same decompiler. It's assumed, at
|
51
|
+
this early stage, that the differences in decompiling are negligible, but
|
52
|
+
future enhancements will most likely split the two at some point.
|
53
|
+
|
54
|
+
Although all opcodes and arguments, including match loops, should decompile
|
55
|
+
correctly, they are not yet supported for execution and are simply ignored. In fact,
|
56
|
+
all opcodes (except `repeat`) are ignored, __including__ `end_module`.
|
57
|
+
|
58
|
+
#### Platform Nodes
|
59
|
+
|
60
|
+
##### Frontmatter
|
61
|
+
|
62
|
+
<table>
|
63
|
+
<tr>
|
64
|
+
<th>Platform Node</th>
|
65
|
+
<th>Description</th>
|
66
|
+
<th>Return Class</th>
|
67
|
+
<th>Default Value</th>
|
68
|
+
<th>Example Output</th>
|
69
|
+
<th>Additional Information</th>
|
70
|
+
</tr>
|
71
|
+
<tr>
|
72
|
+
<td><code>variable_assignments</code></td>
|
73
|
+
<td>Any global variable assignments or settings</td>
|
74
|
+
<td><code>Hash</code></td>
|
75
|
+
<td><code>{}</code></td>
|
76
|
+
<td><code>{'opcode_mode' => 'extended'}</code></td>
|
77
|
+
<td><b>N/A</b></td>
|
78
|
+
</tr>
|
79
|
+
<tr>
|
80
|
+
<td><code>imports</code></td>
|
81
|
+
<td>Imported attributes, e.g., <code>timesets</code></td>
|
82
|
+
<td><code>Hash</code></td>
|
83
|
+
<td><code>{}</code></td>
|
84
|
+
<td><code>{'tp0' => 'tset'}</code></td>
|
85
|
+
<td>
|
86
|
+
In the source, the imports are written as <i>type of import</i> then <i>name of import.</i>
|
87
|
+
In the retuned Hash, the keys are the <i>name of the imports</i> and the values are the <i>import types</i>.
|
88
|
+
</td>
|
89
|
+
</tr>
|
90
|
+
</table>
|
91
|
+
|
92
|
+
##### Vector
|
93
|
+
|
94
|
+
<table>
|
95
|
+
<tr>
|
96
|
+
<th>Platform Node</th>
|
97
|
+
<th>Description</th>
|
98
|
+
<th>Return Class</th>
|
99
|
+
<th>Default Value</th>
|
100
|
+
<th>Example Output</th>
|
101
|
+
<th>Additional Information</th>
|
102
|
+
</tr>
|
103
|
+
<tr>
|
104
|
+
<td><code>opcode</code></td>
|
105
|
+
<td>The opcode, if present in the vector.</td>
|
106
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
107
|
+
<td><code>nil</code></td>
|
108
|
+
<td><code>"repeat"</code></td>
|
109
|
+
<td><b>N/A</b></td>
|
110
|
+
</tr>
|
111
|
+
<tr>
|
112
|
+
<td><code>opcode_arguments</code></td>
|
113
|
+
<td>Any comman-separated, opcode arguments, if present.</td>
|
114
|
+
<td><code>Array</code></td>
|
115
|
+
<td><code>[]</code></td>
|
116
|
+
<td><code>['5']</code></td>
|
117
|
+
<td><b>N/A</b></td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
|
121
|
+
Note that `repeat` is actually an `opcode` for this platform. Many, many vectors
|
122
|
+
will have `opcode` and `opcode_arguments` that simply duplicate the generic `repeat`
|
123
|
+
accessor.
|
124
|
+
|
125
|
+
#### Vector Body Elements
|
126
|
+
|
127
|
+
<table>
|
128
|
+
<tr>
|
129
|
+
<th>Vector Body Element</th>
|
130
|
+
<th>Description</th>
|
131
|
+
<th>Type</th>
|
132
|
+
<th>Platform Nodes</th>
|
133
|
+
<th>Additional Information</th>
|
134
|
+
</tr>
|
135
|
+
<tr>
|
136
|
+
<td>Start Label</td>
|
137
|
+
<td>Label that signifies the start of the vector body. Required by <code>.atp</code> sources.</td>
|
138
|
+
<td><code>:start_label</code></td>
|
139
|
+
<td>
|
140
|
+
<table>
|
141
|
+
<tr>
|
142
|
+
<th>Platform Node</th>
|
143
|
+
<th>Description</th>
|
144
|
+
<th>Return Class</th>
|
145
|
+
<th>Default Value</th>
|
146
|
+
<th>Example Output</th>
|
147
|
+
<th>Additional Information</th>
|
148
|
+
</tr>
|
149
|
+
<tr>
|
150
|
+
<td><code>start_label</code></td>
|
151
|
+
<td>Name of the pattern's start label</td>
|
152
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
153
|
+
<td><code>nil</code></td>
|
154
|
+
<td><code>"pattern_st"</code></td>
|
155
|
+
<td><b>N/A</b></td>
|
156
|
+
</tr>
|
157
|
+
</table>
|
158
|
+
</td>
|
159
|
+
<td><b>N/A</b></td>
|
160
|
+
</tr>
|
161
|
+
<tr>
|
162
|
+
<td>Global Label</td>
|
163
|
+
<td>Defines a global label.</td>
|
164
|
+
<td><code>:global_label</code></td>
|
165
|
+
<td>
|
166
|
+
<table>
|
167
|
+
<tr>
|
168
|
+
<th>Platform Node</th>
|
169
|
+
<th>Description</th>
|
170
|
+
<th>Return Class</th>
|
171
|
+
<th>Default Value</th>
|
172
|
+
<th>Example Output</th>
|
173
|
+
<th>Additional Information</th>
|
174
|
+
</tr>
|
175
|
+
<tr>
|
176
|
+
<td><code>label_type</code></td>
|
177
|
+
<td>Type, or function, of the label.</td>
|
178
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
179
|
+
<td><code>nil</code></td>
|
180
|
+
<td><code>"subr"</code></td>
|
181
|
+
<td><b>N/A</b></td>
|
182
|
+
</tr>
|
183
|
+
<tr>
|
184
|
+
<td><code>label_name</code></td>
|
185
|
+
<td>Name of the label.</td>
|
186
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
187
|
+
<td><code>nil</code></td>
|
188
|
+
<td><code>"global_label_1"</code></td>
|
189
|
+
<td><b>N/A</b></td>
|
190
|
+
</tr>
|
191
|
+
</table>
|
192
|
+
</td>
|
193
|
+
<td><b>N/A</b></td>
|
194
|
+
</tr>
|
195
|
+
<tr>
|
196
|
+
<td>Label</td>
|
197
|
+
<td>Defines a label internal to the current pattern.</td>
|
198
|
+
<td><code>:label</code></td>
|
199
|
+
<td>
|
200
|
+
<table>
|
201
|
+
<tr>
|
202
|
+
<th>Platform Node</th>
|
203
|
+
<th>Description</th>
|
204
|
+
<th>Return Class</th>
|
205
|
+
<th>Default Value</th>
|
206
|
+
<th>Example Output</th>
|
207
|
+
<th>Additional Information</th>
|
208
|
+
</tr>
|
209
|
+
<tr>
|
210
|
+
<td><code>label_name</code></td>
|
211
|
+
<td>Name of the label</td>
|
212
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
213
|
+
<td><code>nil</code></td>
|
214
|
+
<td><code>"label1"</code></td>
|
215
|
+
<td><b>N/A</b></td>
|
216
|
+
</tr>
|
217
|
+
</table>
|
218
|
+
</td>
|
219
|
+
<td><b>N/A</b></td>
|
220
|
+
</tr>
|
221
|
+
</table>
|
222
|
+
|
223
|
+
### Advantest V93K
|
224
|
+
|
225
|
+
Similarly to the Teradyne platforms, sequencer instructions, other than `repeat`,
|
226
|
+
are not supported and are ignored.
|
227
|
+
|
228
|
+
#### Platform Nodes
|
229
|
+
|
230
|
+
This decompiler does not provide any `platform nodes`.
|
231
|
+
|
232
|
+
#### Vector Body Elements
|
233
|
+
<table>
|
234
|
+
<tr>
|
235
|
+
<th>Vector Body Element</th>
|
236
|
+
<th>Description</th>
|
237
|
+
<th>Type</th>
|
238
|
+
<th>Platform Nodes</th>
|
239
|
+
<th>Additional Information</th>
|
240
|
+
</tr>
|
241
|
+
<tr>
|
242
|
+
<td>Sequencer Instruction</td>
|
243
|
+
<td>Inter-pattern call to the V93K sequencer.</td>
|
244
|
+
<td><code>:sequencer_instruction</code></td>
|
245
|
+
<td>
|
246
|
+
<table>
|
247
|
+
<tr>
|
248
|
+
<th>Platform Node</th>
|
249
|
+
<th>Description</th>
|
250
|
+
<th>Return Class</th>
|
251
|
+
<th>Default Value</th>
|
252
|
+
<th>Example Output</th>
|
253
|
+
<th>Additional Information</th>
|
254
|
+
</tr>
|
255
|
+
<tr>
|
256
|
+
<td><code>instruction</code></td>
|
257
|
+
<td>Instruction code</td>
|
258
|
+
<td><code>String</code>, <code>NilClass</code></td>
|
259
|
+
<td><code>nil</code></td>
|
260
|
+
<td><code>"MACT"</code></td>
|
261
|
+
<td><b>N/A</b></td>
|
262
|
+
</tr>
|
263
|
+
<tr>
|
264
|
+
<td><code>arguments</code></td>
|
265
|
+
<td>Arguments for the instruction.</td>
|
266
|
+
<td><code>Array</code>, <code>NilClass</code></td>
|
267
|
+
<td><code>nil</code></td>
|
268
|
+
<td><code>['1737']</code></td>
|
269
|
+
<td><b>N/A</b></td>
|
270
|
+
</tr>
|
271
|
+
</table>
|
272
|
+
</td>
|
273
|
+
<td><b>N/A</b></td>
|
274
|
+
</tr>
|
275
|
+
</table>
|
276
|
+
|
277
|
+
#### No First Vector
|
278
|
+
|
279
|
+
The V93K supports patterns of just _sequencer instructions_ (see the approved
|
280
|
+
`simple.avc` pattern), which __does not__ contain a `first_vector`. In such
|
281
|
+
cases, calls to many of the methods will raise an exception. For example,
|
282
|
+
calls to `#add_pins`, `#execute`, and anything on the `Pinlist` will fail. As
|
283
|
+
only vector support is available at the moment, there is not much that can
|
284
|
+
be done with these types of pattern anyway.
|
285
|
+
|
286
|
+
That said, these patterns can still be decompiled, with full
|
287
|
+
[EnumerableExt](<%= path "guides/decompilation/universalapi#EnumerableExt" %>)
|
288
|
+
functionality. Any custom execution or conversion implementations, or custom
|
289
|
+
processing methods, can still be used.
|
290
|
+
|
291
|
+
% end
|
@@ -0,0 +1,598 @@
|
|
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
|
+
% Origen.load_target('configurable', dut: OrigenDecompilerDocDut)
|
6
|
+
% pat = OrigenTesters::IGXLBasedTester::Pattern.new(OrigenTesters::IGXLBasedTester.sample_source_atp)
|
7
|
+
% direct_pat = OrigenTesters::IGXLBasedTester::Pattern.new(OrigenTesters::IGXLBasedTester.sample_direct_source, direct_source: true)
|
8
|
+
% testers_api_url = 'https://origen-sdk.org/testers/api/OrigenTesters'
|
9
|
+
|
10
|
+
The `Universal API` attempts to tie all supported platforms together and provide
|
11
|
+
a generic yet flexible interface with which decompiled patterns from any source
|
12
|
+
or any platform can be treated the same.
|
13
|
+
|
14
|
+
This obvisously has its limitations and various hooks are in place to still allow
|
15
|
+
for platform-specifics to peek through the `universal API` but the API detailed
|
16
|
+
in this section should be applicable across all supported platforms.
|
17
|
+
|
18
|
+
The [OrigenTesters::Decompiler::Pattern](<%= "#{testers_api_url}//Decompiler/Pattern.html" %>)
|
19
|
+
base class provides this interface. All supported platforms should return
|
20
|
+
a class which inherits from this. For example,
|
21
|
+
|
22
|
+
~~~ruby
|
23
|
+
OrigenTesters::IGXLBasedTester::Pattern.ancestors.include?(OrigenTesters::Decompiler::Pattern)
|
24
|
+
#=> <%= OrigenTesters::IGXLBasedTester::Pattern.ancestors.include?(OrigenTesters::Decompiler::Pattern) %>
|
25
|
+
~~~
|
26
|
+
|
27
|
+
### Decompiling
|
28
|
+
|
29
|
+
The preferred method to decompile a pattern source is to use the
|
30
|
+
[Decompiler API](<%= path "guides/decompilation/decompilerapi/#Decompiling" %>)
|
31
|
+
but you can choose to instantiate the decompiler yourself, provided you know the
|
32
|
+
decompiler you want to use.
|
33
|
+
|
34
|
+
To decompile a source from the `J750`, we'll instantiate a new
|
35
|
+
`OrigenTesters::IGXLBasedTester::Pattern` class:
|
36
|
+
|
37
|
+
~~~ruby
|
38
|
+
pat = OrigenTesters::IGXLBasedTester::Pattern.new('path/to/src.atp')
|
39
|
+
~~~
|
40
|
+
|
41
|
+
Instantiating the decompiler __does not__ automatically decompile it. However,
|
42
|
+
a call to `#decompile` will do just that.
|
43
|
+
|
44
|
+
~~~ruby
|
45
|
+
pat.decompiled?
|
46
|
+
#=> <%= pat.decompiled? %>
|
47
|
+
|
48
|
+
pat.decompile
|
49
|
+
pat.decompiled?
|
50
|
+
% pat.decompile
|
51
|
+
#=> <%= pat.decompiled? %>
|
52
|
+
~~~
|
53
|
+
|
54
|
+
<div class="alert alert-success" role="alert">
|
55
|
+
Recall that <code>#decompile</code> on the
|
56
|
+
<a href='<%= path "guides/decompilation/decompilerapi/#Decompiling" %>'>Decompiler API</a> does this automatically.
|
57
|
+
</div>
|
58
|
+
|
59
|
+
Any decompiler will accept the pattern source as either:
|
60
|
+
|
61
|
+
1. A `string` containing the filename of the pattern source.
|
62
|
+
2. A `Pathname` containing the filename of the pattern source.
|
63
|
+
|
64
|
+
At times, [such as in the example](<%= path "guides/decompilation/overview#Example_Decompilation" %>),
|
65
|
+
you'll want to decompile a text source directly. Indicate this by providing
|
66
|
+
the `direct_source: true` option during instantiation:
|
67
|
+
|
68
|
+
~~~ruby
|
69
|
+
direct_pat = OrigenTesters::IGXLBasedTester::Pattern.new('path/to/src.atp', direct_source: true)
|
70
|
+
~~~
|
71
|
+
|
72
|
+
The decompiled pattern will keep track of its source and whether it was direct
|
73
|
+
or not:
|
74
|
+
|
75
|
+
~~~ruby
|
76
|
+
pat.direct_source?
|
77
|
+
#=> <%= pat.direct_source? %>
|
78
|
+
pat.source
|
79
|
+
#=> /home/origen_stuff/origen_testers/approved/j750/decompiler/sample/sample.atp
|
80
|
+
|
81
|
+
direct_pat.direct_source?
|
82
|
+
#=> <%= direct_pat.direct_source? %>
|
83
|
+
direct_pat.source
|
84
|
+
#=>
|
85
|
+
"<%= direct_pat.source %>"
|
86
|
+
~~~
|
87
|
+
|
88
|
+
<div class="alert alert-warning" role="alert">
|
89
|
+
The entire direct source is stored in the decompiler as the <code>source</code>,
|
90
|
+
so its not recommended to use direct sources for large patterns.
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div class="alert alert-info" role="alert">
|
94
|
+
Although it is <i>possible</i> to instantiate a <code>OrigenTesters::Decompiler::Pattern</code>
|
95
|
+
object yourself, this is just the base class and has no grammars. Any attempts
|
96
|
+
to actually work with this class directly will not end well.
|
97
|
+
|
98
|
+
<a href='<%= path "guides/decompilation/platformspecifics" %>'>See the supported platforms page</a>
|
99
|
+
for the class names of the actual decompiler implementations.
|
100
|
+
</div>
|
101
|
+
|
102
|
+
### Adding Pins and Executing
|
103
|
+
|
104
|
+
Both of these have been covered [in the example](<%= path "guides/decompilation/overview#Example_Decompilation" %>),
|
105
|
+
but for a quick review:
|
106
|
+
|
107
|
+
~~~ruby
|
108
|
+
# Add any missing pins to the DUT, returning the pins that were added
|
109
|
+
dut.pins
|
110
|
+
#=> <%= dut.pins %>
|
111
|
+
pat.add_pins
|
112
|
+
#=> <%= pat.add_pins %>
|
113
|
+
dut.pins
|
114
|
+
#=> <%= dut.pins %>
|
115
|
+
|
116
|
+
# Execute the vectors
|
117
|
+
pat.execute
|
118
|
+
~~~
|
119
|
+
|
120
|
+
### Sections
|
121
|
+
|
122
|
+
As also shown [in the example](<%= path "guides/decompilation/overview#Example_Decompilation" %>),
|
123
|
+
the pattern is divided into sections: the `frontmatter`, the `pinlist`, and the `vector body elements`.
|
124
|
+
|
125
|
+
The `frontmatter` and `pinlist` are parsed fully, stored in memory, and can be
|
126
|
+
accessed directly.
|
127
|
+
|
128
|
+
~~~ruby
|
129
|
+
# Access the pattern's frontmatter
|
130
|
+
pat.frontmatter
|
131
|
+
#=> <%= pat.frontmatter %>
|
132
|
+
|
133
|
+
# Retrieve the pattern header
|
134
|
+
pat.frontmatter.pattern_header
|
135
|
+
#=> <%= pat.frontmatter.pattern_header %>
|
136
|
+
~~~
|
137
|
+
|
138
|
+
~~~ruby
|
139
|
+
# Access the pattern's pinlist
|
140
|
+
pat.pinlist
|
141
|
+
#=> <%= pat.pinlist %>
|
142
|
+
|
143
|
+
# pat.pinlist.pins
|
144
|
+
#=> <%= pat.pinlist.pins %>
|
145
|
+
~~~
|
146
|
+
|
147
|
+
Methods to retrieve the pins are also available directly on the decompiled pattern:
|
148
|
+
|
149
|
+
~~~ruby
|
150
|
+
# Return an array of pins, in the order they appear in the pattern
|
151
|
+
pat.pins
|
152
|
+
#=> <%= pat.pins %>
|
153
|
+
|
154
|
+
# Return the pin names and their respective size
|
155
|
+
pat.pin_sizes
|
156
|
+
#=> <%= pat.pin_sizes %>
|
157
|
+
~~~
|
158
|
+
|
159
|
+
See the [OrigenTesters API](<%= testers_api_url %>)
|
160
|
+
for full details on the [Frontmatter](<%= "#{testers_api_url}/Decompiler/Pattern/Frontmatter.html" %>)
|
161
|
+
and the [Pinlist](<%= "#{testers_api_url}/Decompiler/Pattern/Pinlist.html" %>).
|
162
|
+
|
163
|
+
##### Platform Specifics
|
164
|
+
|
165
|
+
The `frontmatter` and `pinlist` may contain _platform-specific_ setup information. Any
|
166
|
+
platform-specifics should be documented
|
167
|
+
[on the supported platforms page](<%= path "guides/decompilation/platformspecifics" %>),
|
168
|
+
but some methods are provided to programmatically check what's available.
|
169
|
+
[For the example pattern](<%= path "guides/decompilation/overview#Example_Decompilation" %>),
|
170
|
+
using the `J750 decompiler`:
|
171
|
+
|
172
|
+
~~~ruby
|
173
|
+
pat.frontmatter.platform_nodes
|
174
|
+
#=> <%= pat.frontmatter.platform_nodes %>
|
175
|
+
|
176
|
+
pat.pinlist.platform_nodes
|
177
|
+
#=> <%= pat.pinlist.platform_nodes %>
|
178
|
+
~~~
|
179
|
+
|
180
|
+
Any `platform node` will have an accessor associated with it:
|
181
|
+
|
182
|
+
~~~ruby
|
183
|
+
pat.frontmatter.imports
|
184
|
+
#=> <%= pat.frontmatter.imports %>
|
185
|
+
|
186
|
+
pat.frontmatter.variable_assignments
|
187
|
+
#=> <%= pat.frontmatter.variable_assignments %>
|
188
|
+
~~~
|
189
|
+
|
190
|
+
Obviously, these nodes are _decompiler specific_, but <u>what's less obvious is
|
191
|
+
that the implementation, and return values, are not defined by the <code>universal API</code>.</u>
|
192
|
+
Two decompilers that both implement the same `platform node` may do so
|
193
|
+
differently and even have different meanings.
|
194
|
+
|
195
|
+
<div class="alert alert-info" role="alert">
|
196
|
+
This is also used in conjunction with <a href="#Vectors">vectors</a>.
|
197
|
+
</div>
|
198
|
+
|
199
|
+
#### Initial State
|
200
|
+
|
201
|
+
For some functions, it'll be essential to know the _initial state_ of the pattern.
|
202
|
+
This may include the [initial pin states](<%= "#{testers_api_url}/Decompiler/Pattern.html#first_pin_states-instance_method" %>),
|
203
|
+
the [initial timeset](<%= "#{testers_api_url}/Decompiler/Pattern.html#first_timeset-instance_method" %>),
|
204
|
+
or the [first vector](<%= "#{testers_api_url}/Decompiler/Pattern.html#first_vector-instance_method" %>), in its entirety.
|
205
|
+
|
206
|
+
##### First Vector
|
207
|
+
|
208
|
+
An exception to the _don't store vectors in memory_ rule is the `first vector`.
|
209
|
+
The first vector contains the initial state of the pattern, the initial timeset,
|
210
|
+
and, in many text representations, the sizes of the pins in the pinlist. This
|
211
|
+
vector is always available:
|
212
|
+
|
213
|
+
~~~ruby
|
214
|
+
# Access the first vector
|
215
|
+
pat.first_vector
|
216
|
+
#=> <%= pat.first_vector.class %>
|
217
|
+
~~~
|
218
|
+
|
219
|
+
An important observation is that this returns the _first vector_, __not__ the
|
220
|
+
first _vector body element_.
|
221
|
+
|
222
|
+
<div class="alert alert-warning" role="alert">
|
223
|
+
Some platforms, such as the <code>v93k</code>, do not actually require a vector
|
224
|
+
in the pattern source. In these cases, retrieving the first vector or querying
|
225
|
+
aspects of the decompiled pattern that relies on the first vector will raise
|
226
|
+
an <code>OrigenTesters::Decompiler::ParseError</code> exception with a
|
227
|
+
message containing <code>"Could not locate the first vector"</code>.
|
228
|
+
|
229
|
+
<a href="https://github.com/Origen-SDK/origen_testers/tree/master/approved/v93k/simple.avc">See the approved V93K simple pattern</a>
|
230
|
+
for an example of such a pattern.
|
231
|
+
</div>
|
232
|
+
|
233
|
+
##### First Pin States and First Timeset
|
234
|
+
|
235
|
+
Assuming the first vector is available, you can retrieve the _first pin states_
|
236
|
+
and the _first timeset_ directly.
|
237
|
+
[In the context of the example pattern](<%= path "guides/decompilation/overview#Example_Decompilation" %>):
|
238
|
+
|
239
|
+
~~~ruby
|
240
|
+
# Retrieve the initial pin states
|
241
|
+
pat.initial_pin_states
|
242
|
+
#=> <%= pat.initial_pin_states %>
|
243
|
+
|
244
|
+
# Retrieve the initial timeset
|
245
|
+
pat.initial_timeset
|
246
|
+
#=> <%= pat.initial_timeset %>
|
247
|
+
~~~
|
248
|
+
|
249
|
+
### Vector Body Elements
|
250
|
+
|
251
|
+
The final section is the `vector body elements`. This is a collection of not
|
252
|
+
just the vectors, but everything that may appear interweaved with them.
|
253
|
+
|
254
|
+
The most common non-vector will most likey be `comment blocks` which may be
|
255
|
+
scattered about among the actual vectors. Other non-vectors will be platform
|
256
|
+
specific. Some examples include [labels](<%= path "guides/decompilation/platformspecifics#Teradyne_J750_and_Ultraflex" %>),
|
257
|
+
on the `J750` or `Ultraflex`, or [sequencer instructions](<%= path "guides/decompilation/platformspecifics#Advantest_V93K" %>),
|
258
|
+
on the `V93K`.
|
259
|
+
|
260
|
+
Anything in the `vector body` will have a class of
|
261
|
+
[OrigenTesters::Decompiler::VectorBodyElement](<%= "#{testers_api_url}/Decompiler/Pattern/VectorBodyElement.html" %>),
|
262
|
+
which serves as a placeholder for anything that may come along and provides the
|
263
|
+
means to further decide how this particular element should be interfaced with.
|
264
|
+
|
265
|
+
#### Types
|
266
|
+
|
267
|
+
Every `vector body element` will have a `type`, which is assigned during
|
268
|
+
decompilation - all you need to do is retrieve it, using the `#type` method.
|
269
|
+
For a `comment` this will be `:comment_block`. For a bonafide
|
270
|
+
vector, this will be `:vector`.
|
271
|
+
|
272
|
+
Platforms can, and will, interject their own types. A `label` in a `.atp` pattern
|
273
|
+
source will have type `:label`. Retrieving and interacting with element
|
274
|
+
types will be shown throughout the remainder of this section.
|
275
|
+
|
276
|
+
#### Retrieving the Element
|
277
|
+
|
278
|
+
Knowing what `type` the element is lets you know what kind of accessors this
|
279
|
+
element should have. You would expect anything of type `:vector` to have `pin_states`,
|
280
|
+
but you would not expect the `:comment_block` type to. However, the `vector body element`
|
281
|
+
is just a placeholder, so the `#element` method must be used to retrieve the
|
282
|
+
underlying element that _actually_ contains the content. Examples of this are
|
283
|
+
shown in the sections below.
|
284
|
+
|
285
|
+
### Elements
|
286
|
+
|
287
|
+
The `universal API` supports two built-in vector types:
|
288
|
+
[comment blocks](<%= "#{testers_api_url}/Decompiler/Pattern/CommentBlock.html" %>)
|
289
|
+
and [vectors](<%= "#{testers_api_url}/Decompiler/Pattern/Vector.html" %>).
|
290
|
+
|
291
|
+
#### Comments
|
292
|
+
|
293
|
+
The simplest vector body element to start working with is a `comment_block`.
|
294
|
+
The decompiler will mash sequential comment lines in the pattern together to
|
295
|
+
form a single `vector body element` of type `:comment block`. A shorthand
|
296
|
+
method is provided to indicate when a `comment block` is encountered:
|
297
|
+
|
298
|
+
~~~ruby
|
299
|
+
vector_body_element.is_a_comment?
|
300
|
+
#=> true/false
|
301
|
+
~~~
|
302
|
+
|
303
|
+
There's only so much which can be done with comments. The main operation will be retrieving them:
|
304
|
+
|
305
|
+
~~~ruby
|
306
|
+
comment_block.comments
|
307
|
+
#=> [
|
308
|
+
#=> "Any comments in the block..."
|
309
|
+
#=> "Separated by newlines (or whatever the platform separator is)"
|
310
|
+
#=> "Will be its own array entry."
|
311
|
+
#=> ]
|
312
|
+
~~~
|
313
|
+
|
314
|
+
Note that the comments are returned as an `Array` of all the comments mashed
|
315
|
+
together. This is standard though, so a standalone, single-line comment will be an `Array`
|
316
|
+
of size `1`.
|
317
|
+
|
318
|
+
[You can view the API here](<%= "#{testers_api_url}/Decompiler/Pattern/CommentBlock.html" %>),
|
319
|
+
but there's not much more to `comment blocks` than that.
|
320
|
+
|
321
|
+
#### Vectors
|
322
|
+
|
323
|
+
`Vectors`, on the other hand, have a bit more going on.These will have
|
324
|
+
type `:vector` and a `vector body element` shorthand method is available here as well:
|
325
|
+
|
326
|
+
~~~ruby
|
327
|
+
vector_body_element.is_a_vector?
|
328
|
+
#=> true/false
|
329
|
+
~~~
|
330
|
+
|
331
|
+
Any vector, from any platform,
|
332
|
+
is expected to provide a `timeset`, `repeat`, `pin_states`, and `comment` accessor.
|
333
|
+
The `comment` in this case is a end-of-line comment, sharing the same line with the vector.
|
334
|
+
|
335
|
+
Each of these can be retrieved for any `vector`, but its best to see it as an example.
|
336
|
+
Returning [to the example pattern](<%= path "guides/decompilation/overview#Example_Decompilation" %>),
|
337
|
+
we can retrieve all this content from the [first vector](#Initial_State):
|
338
|
+
|
339
|
+
~~~ruby
|
340
|
+
pat.first_vector.timeset
|
341
|
+
#=> <%= pat.first_vector.timeset %>
|
342
|
+
|
343
|
+
pat.first_vector.pin_states
|
344
|
+
#=> <%= pat.first_vector.pin_states %>
|
345
|
+
|
346
|
+
pat.first_vector.repeat
|
347
|
+
#=> <%= pat.first_vector.repeat %>
|
348
|
+
|
349
|
+
pat.first_vector.comment
|
350
|
+
#=> <%= pat.first_vector.comment %>
|
351
|
+
~~~
|
352
|
+
|
353
|
+
Every `vector` is expected to contain _at least_ these accessors. Some may
|
354
|
+
be empty, but the accessor should always _work_ (no `undefined method...` errors).
|
355
|
+
|
356
|
+
The platform, will likey want to throw in its own content that it considers part of
|
357
|
+
a standard `vector`, such as `opcodes`, for the J750.
|
358
|
+
The platform will register these as `platform nodes`, and any `platform node` will
|
359
|
+
have a corresponding accessor. For example, the J750 registers
|
360
|
+
`opcode` and `opcode_arguments` as platform nodes so, when we've decompiled
|
361
|
+
using the `J750` decompiler, we'll have access those as well:
|
362
|
+
|
363
|
+
~~~ruby
|
364
|
+
pat.first_vector.opcode
|
365
|
+
#=> <%= pat.first_vector.opcode %>
|
366
|
+
|
367
|
+
pat.first_vector.opcode_arguments
|
368
|
+
#=> <%= pat.first_vector.opcode_arguments %>
|
369
|
+
~~~
|
370
|
+
|
371
|
+
Trying these platform nodes on other decompilers __is not__ guaranteed to
|
372
|
+
give you anything. [Check the platform specifics](<%= path "guides/decompilation/platformspecifics" %>)
|
373
|
+
for any additional platform nodes placed on the `vector` type.
|
374
|
+
|
375
|
+
You can also list the platform nodes
|
376
|
+
programmatically using `#platform_nodes`:
|
377
|
+
|
378
|
+
~~~ruby
|
379
|
+
pat.first_vector.platform_nodes
|
380
|
+
#=> <%= pat.first_vector.platform_nodes %>
|
381
|
+
~~~
|
382
|
+
|
383
|
+
##### Platform
|
384
|
+
|
385
|
+
The question of _'what was the decompiler?'_ may come up for complex scripts
|
386
|
+
geared towards handling different pattern sources or supporting various platforms.
|
387
|
+
The `#decompiler` method will return the decompiler used (which is, not coincidentally,
|
388
|
+
the `class` of the decompiled pattern object).
|
389
|
+
|
390
|
+
~~~ruby
|
391
|
+
pat.decompiler
|
392
|
+
#=> <%= pat.decompiler %>
|
393
|
+
~~~
|
394
|
+
|
395
|
+
In cases where decisions are made depending on the decompiler, the `#decompiler?(<platform>)`
|
396
|
+
method queries if the decompiled pattern was decompiled using the given platform:
|
397
|
+
|
398
|
+
~~~ruby
|
399
|
+
pat.decompiler?(OrigenTesters::IGXLBasedTester::Pattern)
|
400
|
+
#=> <%= pat.decompiler?(OrigenTesters::IGXLBasedTester::Pattern) %>
|
401
|
+
|
402
|
+
pat.decompiler?(OrigenTesters::SmartestBasedTester::Pattern)
|
403
|
+
#=> <%= pat.decompiler?(OrigenTesters::SmartestBasedTester::Pattern) %>
|
404
|
+
~~~
|
405
|
+
|
406
|
+
Now that we have all the tools to deal with vector types and the underlying elements,
|
407
|
+
we can begin to interface with the vector body itself.
|
408
|
+
|
409
|
+
#### Iterating Through Vectors
|
410
|
+
|
411
|
+
The simplest operation is just to iterate through all the available vector body
|
412
|
+
elements. The given block will be run for each one sequentially:
|
413
|
+
|
414
|
+
~~~ruby
|
415
|
+
# Iterate through all vector body elements, running the given block for each one.
|
416
|
+
# For example, to print the type of each vector body element:
|
417
|
+
pat.each_vector { |v| puts v.type }
|
418
|
+
<%= pat.collect { |v| ":#{v.type}" }.join("\n") %>
|
419
|
+
|
420
|
+
# Do the above, but with the index
|
421
|
+
pat.each_vector_with_index { |v, i| puts "Type at index #{i}: #{v.type}" }
|
422
|
+
<%= pat.collect_with_index { |v, i| "Type at index #{i}: #{v.type}" }.map { |v| "\"#{v}\"" }.join("\n") %>
|
423
|
+
~~~
|
424
|
+
|
425
|
+
This is the basis for working with the `vector body elements` section and from this
|
426
|
+
more complex operations are derived. For example, to cycle the tester for each
|
427
|
+
`vector` in the vector body:
|
428
|
+
|
429
|
+
~~~ruby
|
430
|
+
pat.each_vector do |v|
|
431
|
+
if v.is_a_vector?
|
432
|
+
tester.cycle(repeat: v.element.repeat)
|
433
|
+
end
|
434
|
+
end
|
435
|
+
~~~
|
436
|
+
|
437
|
+
#### EnumerableExt
|
438
|
+
|
439
|
+
Due to the non-standard `#each` method implementation, the
|
440
|
+
[Enumerable](https://ruby-doc.org/core-2.6.3/Enumerable.html) mixin cannot be used
|
441
|
+
directly. However, some select `Enumerable` methods are implemented:
|
442
|
+
|
443
|
+
~~~ruby
|
444
|
+
# Collect all the vectors, after having run the given block.
|
445
|
+
# For example, to collect all the types that appear in the example pattern:
|
446
|
+
pat.collect { |v| v.type }
|
447
|
+
#=> <%= pat.collect { |v| v.type } %>
|
448
|
+
|
449
|
+
# Filting out duplicates...:
|
450
|
+
pat.collect { |v| v.type }.uniq
|
451
|
+
#=> <%= pat.collect { |v| v.type }.uniq %>
|
452
|
+
|
453
|
+
# Find the first vector for which the block returns true.
|
454
|
+
# For example, to find the first vector body element that is of type vector:
|
455
|
+
pat.find { |v| v.is_a_vector? }
|
456
|
+
#=> <%= pat.find { |v| v.is_a_vector? }.class %>
|
457
|
+
pat.find { |v| v.is_a_vector? }.type
|
458
|
+
#=> :<%= pat.find { |v| v.is_a_vector? }.type %>
|
459
|
+
|
460
|
+
# Find all the vectors for which the block returns true:
|
461
|
+
# For example, to find the all vector body elements that are of type vector:
|
462
|
+
pat.find_all { |v| v.is_a_vector? }
|
463
|
+
#=> <%= pat.find_all { |v| v.is_a_vector? }.map { |v| v.class } %>
|
464
|
+
|
465
|
+
# Find all the vectors after filting out those for which the block returns true:
|
466
|
+
# For example, to find the all vector body elements that are NOT of type vector:
|
467
|
+
pat.reject { |v| v.is_a_vector? }
|
468
|
+
#=> <%= pat.reject { |v| v.is_a_vector? }.map { |v| v.class } %>
|
469
|
+
~~~
|
470
|
+
|
471
|
+
[See the API for a full listing.](<%= "#{testers_api_url}/Decompiler/Pattern/EnumerableExt.html" %>)
|
472
|
+
|
473
|
+
<div class="alert alert-warning" role="alert">
|
474
|
+
If <code>#collect</code> is used without any block provided, <b>all</b>
|
475
|
+
<code>vector body elements</code> will be returned. This may not bode well
|
476
|
+
for large patterns that contain thousands, or even hundreds of thousands, of vectors.
|
477
|
+
</div>
|
478
|
+
|
479
|
+
#### Vector At
|
480
|
+
|
481
|
+
At times, you may want to grab a `vector body element`
|
482
|
+
at a specific index. The method `#vector_at(i)` decompiles and returns
|
483
|
+
the vector at the index, `i`:
|
484
|
+
|
485
|
+
~~~ruby
|
486
|
+
pat.vector_at(3)
|
487
|
+
#=> <%= pat.vector_at(3).class %>
|
488
|
+
|
489
|
+
pat.vector_at(3).type
|
490
|
+
#=> :<%= pat.vector_at(3).type %>
|
491
|
+
|
492
|
+
pat.vector_at(3).element
|
493
|
+
#=> <%= pat.vector_at(3).element.class %>
|
494
|
+
|
495
|
+
pat.vector_at(3).element.repeat
|
496
|
+
#=> <%= pat.vector_at(3).element.repeat %>
|
497
|
+
|
498
|
+
pat.vector_at(4).element.repeat
|
499
|
+
#=> <%= pat.vector_at(4).element.repeat %>
|
500
|
+
~~~
|
501
|
+
|
502
|
+
<u>Observe that <code>#vector_at</code> is a bit of a misnomer</u>, as it actually
|
503
|
+
returns the `vector body elements` at `i`, not necessary one of type `vector`.
|
504
|
+
|
505
|
+
<div class="alert alert-danger" role="alert">
|
506
|
+
Please, <u>please</u>, <b><u>please</u></b> see the contextual notes below if planning to use <code>#vector_at(i)</code>
|
507
|
+
extensively.
|
508
|
+
</div>
|
509
|
+
|
510
|
+
#### Contextual Notes For vector_at
|
511
|
+
|
512
|
+
Recall that the vector body __is not__ stored in memory, so direct access to a given
|
513
|
+
vector index is not inheritently supported.
|
514
|
+
Therefore, each time `#vector_at(i)` is called, the decompiler
|
515
|
+
simply runs `#each_vector_with_index` and bails once the given index is hit,
|
516
|
+
returning the `vector body element` at that index. This gives the desired behavior,
|
517
|
+
but comes at a cost...
|
518
|
+
|
519
|
+
That cost being __runtime__. In
|
520
|
+
a normal array, you'd expect to retrieve a `vector body element` in constant time, `O(1)`;
|
521
|
+
however, iterating through the vector body behaves akin to that of a
|
522
|
+
[linked list](https://en.wikipedia.org/wiki/Linked_list#Linked_lists_vs._dynamic_arrays),
|
523
|
+
where the retrieval time for an arbitrary `vector body element` is `O(n)`.
|
524
|
+
|
525
|
+
Extending this a bit: if using
|
526
|
+
`#each_vector`, to iterate over `vector body elements` from `0` to `n`, you'll get `O(n)` runtime. However, if
|
527
|
+
using `#vector_at(i)` where `i` __is__ the range from `0` to `n`, you'll actually get a
|
528
|
+
`O(n^2)` runtime, as it starts from the beginning each time it retrieves a vector.
|
529
|
+
|
530
|
+
<div class="alert alert-success" role="alert">
|
531
|
+
Recall that the goal of not decompiling and storing the entire vector body at once
|
532
|
+
is to decouple the peak memory and CPU usage with the size of pattern source.
|
533
|
+
<br><br>
|
534
|
+
|
535
|
+
So, although more complex operations that require working with single vectors may take a drastic
|
536
|
+
<i>runtime</i> hit as compared to storing all vectors in memory, the <i>resource</i>
|
537
|
+
requirements of such operations will not, allowing the decompiler to operate on
|
538
|
+
absolutely massive patterns, even when run on sub-optimal machines.
|
539
|
+
<br><br>
|
540
|
+
|
541
|
+
If you have the computational resources (such as access to a distributed system,
|
542
|
+
as most corporations will have) or you know that the pattern sizes you'll be working
|
543
|
+
with are limited to what your system can handle, the
|
544
|
+
<a href='<%= "#{testers_api_url}/Decompiler/Pattern/EnumerableExt.html#collect-instance_method"%>'>enumerable method <code>#collect</code></a>
|
545
|
+
can be used to grab the entire vector body and store it in memory.
|
546
|
+
</div>
|
547
|
+
|
548
|
+
<b>tl;dr:</b> if jumping around the vector body, pre-processing, or otherwise working
|
549
|
+
with the entire vector body simultaneously, please be prepared to take a runtime hit.
|
550
|
+
|
551
|
+
#### Platform Specific Elements
|
552
|
+
|
553
|
+
Its quite likely that you'll encounter platform-specific elements when iterating
|
554
|
+
through the vector body. Recall the `type` attribute on each `vector body element`.
|
555
|
+
This, in conjunction with the [platform's documentation](<%= path "guides/decompilation/platformspecifics" %>)
|
556
|
+
will tell you what other elements may be encountered.
|
557
|
+
|
558
|
+
From a programmatic perspective, the `vector body element` in question knows if
|
559
|
+
it is platform-specific.
|
560
|
+
[Returning to the example pattern:](<%= path "guides/decompilation/overview#Example_Decompilation" %>)
|
561
|
+
|
562
|
+
~~~ruby
|
563
|
+
pat.vector_at(0).type
|
564
|
+
#=> :<%= pat.vector_at(0).type %>
|
565
|
+
pat.vector_at(0).is_platform_specific?
|
566
|
+
#=> <%= pat.vector_at(0).is_platform_specific? %>
|
567
|
+
|
568
|
+
pat.vector_at(1).type
|
569
|
+
#=> :<%= pat.vector_at(1).type %>
|
570
|
+
pat.vector_at(1).is_platform_specific?
|
571
|
+
#=> <%= pat.vector_at(1).is_platform_specific? %>
|
572
|
+
~~~
|
573
|
+
|
574
|
+
For platform-specific nodes, same as `vectors`, the parsed nodes from the decompilation
|
575
|
+
process are retrievable:
|
576
|
+
|
577
|
+
~~~ruby
|
578
|
+
pat.vector_at(0).platform_nodes
|
579
|
+
#=> <%= pat.vector_at(0).platform_nodes %>
|
580
|
+
~~~
|
581
|
+
|
582
|
+
Any `platform nodes` can be retrieved using the accessor:
|
583
|
+
|
584
|
+
~~~ruby
|
585
|
+
pat.vector_at(0).start_label
|
586
|
+
#=> "<%= pat.vector_at(0).start_label %>"
|
587
|
+
~~~
|
588
|
+
|
589
|
+
<div class="alert alert-info" role="alert">
|
590
|
+
Although these programmatic methods are provided, platform specifics should be documented and
|
591
|
+
any supported platform in which such documentation is either missing, incorrect, or unclear
|
592
|
+
should be addressed.
|
593
|
+
|
594
|
+
<a href="https://github.com/Origen-SDK/origen_testers/issues">Please open an issue at the OrigenTesters Github repository</a>
|
595
|
+
so corrections can be made.
|
596
|
+
</div>
|
597
|
+
|
598
|
+
% end
|