├── .gitignore ├── .isort.cfg ├── .travis.yml ├── ABOUT.rst ├── CONTRIBUTING.md ├── Jenkinsfile ├── LICENSE ├── README.md ├── activate_microprobe ├── bootstrap_environment.sh ├── dev_tools ├── ci │ ├── Jenkinsfile.func │ ├── build_001_distribution.sh │ ├── check_ci.sh │ ├── code_conventions_001_pycodestyle.sh │ ├── code_conventions_002_pylint.sh │ ├── code_conventions_003_documentation.sh │ ├── code_conventions_004_mypy.sh │ ├── deploy_001.sh │ ├── environment.sh │ ├── install_advanced_toolchain.sh │ ├── install_riscv_toolchain.sh │ ├── manual_test.sh │ ├── pip.conf │ ├── test_001_end2end_tools.sh │ ├── test_002_end2end_examples.sh │ ├── test_003_end2end_targets.sh │ ├── test_004_unittest.sh │ ├── test_005_coverage.sh │ ├── test_deploy_001_install.sh │ ├── test_python_module.sh │ ├── travis_prolog │ └── update_pages.sh ├── distribution │ ├── make_distribution.sh │ ├── microprobe_all.py │ ├── microprobe_core.py │ ├── microprobe_doc.py │ ├── microprobe_target_power.py │ ├── microprobe_target_riscv.py │ └── setup.cfg ├── parsers │ ├── extract_propery_from_csv.py │ ├── parse_format_table.py │ ├── parse_riscv.py │ └── update_instruction_description.py ├── skeletons │ ├── create_env_skeleton.sh │ ├── create_isa_skeleton.sh │ └── create_uarch_skeleton.sh ├── templates │ ├── header.python │ └── header.yaml └── utils │ ├── check_fix_style.sh │ ├── check_instruction.py │ ├── copyright-add-or-update.sh │ ├── copyright-changer.sh │ ├── debug_binary_asm.sh │ ├── ensure_style.sh │ ├── generate_tags.sh │ ├── quick_replacer.py │ ├── strip-metadata.sh │ └── version-changer.sh ├── doc ├── Makefile ├── make.bat ├── mp_artwork │ ├── LOGOS.jpg │ ├── LOGOS.ppt │ ├── LOGOSnew.pptx │ ├── chartsDIDT.pptx │ ├── logo.tif │ ├── logo_black.png │ ├── logo_transp.png │ ├── logo_transp.xcf │ ├── logo_white.png │ ├── logo_white_reflect.png │ ├── minilogo_black.png │ ├── minilogo_black.tif │ ├── minilogo_white.png │ ├── minilogo_white.tif │ ├── postcard.jpg │ ├── postcard.png │ └── postcard.tif └── source │ ├── _templates │ ├── mybase.rst │ ├── myclass.rst │ ├── myclass.rst.all │ ├── myclass2.rst │ ├── myexception.rst │ └── mymodule.rst │ ├── api.rst │ ├── artwork │ ├── logo_black.png │ ├── logo_white.png │ ├── logo_white_reflect.png │ ├── minilogo_black.png │ ├── minilogo_white.ico │ ├── minilogo_white.png │ ├── minilogo_white_150px.png │ ├── minilogo_white_256px.ico │ ├── minilogo_white_256px2.ico │ ├── minilogo_white_256px3.ico │ ├── minilogo_whiteb_150px.png │ ├── minilogo_whiteb_150px.xcf │ └── postcard.png │ ├── conf.py │ ├── copyright.rst │ ├── design.rst │ ├── design_code_organization.rst │ ├── design_code_workflow.rst │ ├── design_overview.rst │ ├── design_target.rst │ ├── devel.rst │ ├── devel_code_style.rst │ ├── devel_continuous.rst │ ├── devel_contributing.rst │ ├── devel_patches.rst │ ├── devel_repository.rst │ ├── devel_roadmap.rst │ ├── devel_ticket.rst │ ├── examples.rst │ ├── examples │ ├── example_mp_objdump2mpt.dump │ └── mpt.mpt │ ├── images │ ├── c2mpt_workflow.png │ ├── c2mpt_workflow_bw.png │ ├── code_style_1.png │ ├── code_style_10.png │ ├── code_style_11.png │ ├── code_style_12.png │ ├── code_style_13.png │ ├── code_style_14.png │ ├── code_style_2.png │ ├── code_style_3.png │ ├── code_style_4.png │ ├── code_style_5.png │ ├── code_style_6.png │ ├── code_style_7.png │ ├── code_style_8.png │ ├── code_style_9.png │ ├── didt_example1.png │ ├── didt_example2.png │ ├── didt_example3.png │ ├── didt_example4.png │ ├── didt_example5.png │ ├── didt_example6.png │ ├── didt_example7.png │ └── didt_static_layout.png │ ├── index.rst │ ├── index_microprobe.rst │ ├── index_publications.rst │ ├── license.rst │ ├── microprobe.rst │ ├── nitpick-exceptions │ ├── start.rst │ ├── start_check.rst │ ├── start_install.rst │ ├── start_install_git.rst │ ├── start_install_pip.rst │ ├── start_organization.rst │ ├── start_quick.rst │ ├── start_requirements.rst │ ├── start_update.rst │ ├── support.rst │ ├── support_bug.rst │ ├── support_contact.rst │ ├── support_faq.rst │ ├── tools.rst │ ├── tools_ctest_format.rst │ ├── tools_mp_bin2asm.rst │ ├── tools_mp_bin2objdump.rst │ ├── tools_mp_c2mpt.rst │ ├── tools_mp_epi.rst │ ├── tools_mp_mpt2bin.rst │ ├── tools_mp_mpt2elf.rst │ ├── tools_mp_mpt2test.rst │ ├── tools_mp_mpt2trace.rst │ ├── tools_mp_objdump2mpt.rst │ ├── tools_mp_seq.rst │ ├── tools_mp_seqtune.rst │ ├── tools_mp_target.rst │ ├── tools_mpt_format.rst │ ├── tools_mpt_format_v05.rst │ ├── tools_target_definition.rst │ ├── tutorial.rst │ ├── tutorial_adding_definitions.rst │ ├── tutorial_complex_policy.rst │ ├── tutorial_custom_tool.rst │ └── tutorial_simple_policy.rst ├── requirements.txt ├── requirements_devel.txt ├── src └── microprobe │ ├── __init__.py │ ├── code │ ├── __init__.py │ ├── address.py │ ├── bbl.py │ ├── benchmark.py │ ├── cfg.py │ ├── context.py │ ├── ins.py │ ├── var.py │ └── wrapper.py │ ├── driver │ ├── __init__.py │ ├── genetic.py │ └── guided.py │ ├── exceptions.py │ ├── microprobe.cfg │ ├── model │ ├── __init__.py │ └── memory.py │ ├── passes │ ├── __init__.py │ ├── address │ │ └── __init__.py │ ├── branch │ │ └── __init__.py │ ├── dat │ │ └── __init__.py │ ├── decimal │ │ └── __init__.py │ ├── float │ │ └── __init__.py │ ├── ilp │ │ └── __init__.py │ ├── initialization │ │ └── __init__.py │ ├── instruction │ │ └── __init__.py │ ├── memory │ │ └── __init__.py │ ├── register │ │ └── __init__.py │ ├── structure │ │ └── __init__.py │ ├── switch │ │ └── __init__.py │ ├── symbol │ │ └── __init__.py │ └── variable │ │ └── __init__.py │ ├── property.py │ ├── schemas │ ├── __init__.py │ └── property.yaml │ ├── target │ ├── __init__.py │ ├── env │ │ └── __init__.py │ ├── isa │ │ ├── __init__.py │ │ ├── comparator.py │ │ ├── dat.py │ │ ├── default │ │ │ └── isa.yaml │ │ ├── generator.py │ │ ├── instruction.py │ │ ├── instruction_field.py │ │ ├── instruction_format.py │ │ ├── operand.py │ │ ├── register.py │ │ ├── register_type.py │ │ └── schemas │ │ │ ├── __init__.py │ │ │ ├── instruction.yaml │ │ │ ├── instruction_field.yaml │ │ │ ├── instruction_format.yaml │ │ │ ├── isa.yaml │ │ │ ├── operand.yaml │ │ │ ├── register.yaml │ │ │ └── register_type.yaml │ └── uarch │ │ ├── __init__.py │ │ ├── cache.py │ │ ├── default │ │ └── microarchitecture.yaml │ │ ├── element.py │ │ ├── element_type.py │ │ └── schemas │ │ ├── __init__.py │ │ ├── element.yaml │ │ ├── element_type.yaml │ │ └── microarchitecture.yaml │ └── utils │ ├── __init__.py │ ├── asm.py │ ├── bin.py │ ├── cache.py │ ├── cmdline.py │ ├── config.py │ ├── distrib.py │ ├── ieee.py │ ├── imp.py │ ├── info.py │ ├── logger.py │ ├── misc.py │ ├── mpt.py │ ├── objdump.py │ ├── policy.py │ ├── profile.py │ ├── run.py │ ├── typeguard_decorator.py │ └── yaml.py └── targets ├── generic ├── policies │ └── debug.py ├── templates │ ├── c2mpt.c │ ├── c2mpt.h │ └── c2mpt_template.c ├── tests │ ├── targets │ │ └── targets_tests.py │ └── tools │ │ ├── c2mpt_ll.c │ │ ├── c2mpt_mm.c │ │ ├── c2mpt_test001.c │ │ ├── c2mpt_test002.c │ │ ├── mp_bin2asm_tests.py │ │ ├── mp_bin2objdump_tests.py │ │ ├── mp_c2mpt_tests.py │ │ ├── mp_epi_tests.py │ │ ├── mp_mpt2test_tests.py │ │ ├── mp_objdump2mpt_tests.py │ │ ├── mp_seq_tests.py │ │ ├── mp_seqtune_tests.py │ │ ├── mp_target_tests.py │ │ └── mpt2test_test010.mpt ├── tools │ ├── mp_bin2asm.py │ ├── mp_bin2objdump.py │ ├── mp_c2mpt.py │ ├── mp_epi.py │ ├── mp_mpt2bin.py │ ├── mp_mpt2elf.py │ ├── mp_mpt2test.py │ ├── mp_objdump2mpt.py │ ├── mp_seq.py │ ├── mp_seqtune.py │ └── mp_target.py └── wrappers │ ├── asm.py │ ├── asmld.py │ ├── bin.py │ ├── c.py │ ├── cpapi.py │ ├── debug.py │ └── trace.py ├── power ├── doc │ ├── examples.rst │ └── examples_power.rst ├── env │ └── powerpc64_linux_gcc.py ├── examples │ ├── genetic_eval.sh │ ├── isa_power_v206_info.py │ ├── power_v206_power7_ppc64_linux_gcc_custom.py │ ├── power_v206_power7_ppc64_linux_gcc_fu_stress.py │ ├── power_v206_power7_ppc64_linux_gcc_genetic.py │ ├── power_v206_power7_ppc64_linux_gcc_memory.py │ ├── power_v206_power7_ppc64_linux_gcc_profile.py │ └── power_v206_power7_ppc64_linux_gcc_random.py ├── isa │ ├── p-common │ │ ├── comparator.py │ │ ├── generator.py │ │ ├── getcontext.S │ │ ├── instruction.py │ │ ├── instruction.yaml │ │ ├── instruction_field.py │ │ ├── instruction_field.yaml │ │ ├── instruction_format.py │ │ ├── instruction_format.yaml │ │ ├── instruction_props │ │ │ ├── algebraic.yaml │ │ │ ├── branch.yaml │ │ │ ├── branch_conditional.yaml │ │ │ ├── branch_relative.yaml │ │ │ ├── category.yaml │ │ │ ├── decimal.yaml │ │ │ ├── disable_asm.yaml │ │ │ ├── hypervisor.yaml │ │ │ ├── memory.yaml │ │ │ ├── memory_with_update.yaml │ │ │ ├── privileged.yaml │ │ │ ├── privileged_optional.yaml │ │ │ ├── switching.yaml │ │ │ ├── syscall.yaml │ │ │ └── trap.yaml │ │ ├── isa.py │ │ ├── isa.yaml │ │ ├── operand.py │ │ ├── operand.yaml │ │ ├── register.py │ │ ├── register.yaml │ │ ├── register_type.py │ │ ├── register_type.yaml │ │ └── setcontext.S │ ├── p-v2_06 │ │ ├── comparator.py │ │ ├── generator.py │ │ ├── instruction.py │ │ ├── instruction.yaml │ │ ├── instruction_field.yaml │ │ ├── instruction_format.yaml │ │ ├── isa.yaml │ │ ├── operand.py │ │ ├── operand.yaml │ │ ├── register.py │ │ ├── register.yaml │ │ └── register_type.yaml │ ├── p-v2_07 │ │ ├── comparator.py │ │ ├── generator.py │ │ ├── instruction.py │ │ ├── instruction.yaml │ │ ├── instruction_field.yaml │ │ ├── instruction_format.yaml │ │ ├── instruction_props │ │ │ ├── branch.yaml │ │ │ ├── branch_conditional.yaml │ │ │ ├── branch_relative.yaml │ │ │ ├── category.yaml │ │ │ ├── disable_asm.yaml │ │ │ ├── hypervisor.yaml │ │ │ ├── memory.yaml │ │ │ ├── privileged.yaml │ │ │ └── unsupported.yaml │ │ ├── isa.yaml │ │ ├── operand.py │ │ ├── operand.yaml │ │ ├── register.py │ │ ├── register.yaml │ │ └── register_type.yaml │ ├── p-v3_00 │ │ ├── comparator.py │ │ ├── generator.py │ │ ├── instruction.py │ │ ├── instruction.yaml │ │ ├── instruction_field.yaml │ │ ├── instruction_format.yaml │ │ ├── instruction_props │ │ │ ├── algebraic.yaml │ │ │ ├── branch.yaml │ │ │ ├── branch_conditional.yaml │ │ │ ├── branch_relative.yaml │ │ │ ├── category.yaml │ │ │ ├── decimal.yaml │ │ │ ├── disable_asm.yaml │ │ │ ├── hypervisor.yaml │ │ │ ├── memory.yaml │ │ │ ├── memory_with_update.yaml │ │ │ ├── privileged.yaml │ │ │ ├── privileged_optional.yaml │ │ │ ├── switching.yaml │ │ │ ├── syscall.yaml │ │ │ ├── trap.yaml │ │ │ └── unsupported.yaml │ │ ├── isa.yaml │ │ ├── operand.py │ │ ├── operand.yaml │ │ ├── register.py │ │ ├── register.yaml │ │ └── register_type.yaml │ └── p-v3_10 │ │ ├── comparator.py │ │ ├── generator.py │ │ ├── instruction.py │ │ ├── instruction.yaml │ │ ├── instruction_field.yaml │ │ ├── instruction_format.yaml │ │ ├── instruction_props │ │ ├── algebraic.yaml │ │ ├── branch.yaml │ │ ├── branch_conditional.yaml │ │ ├── branch_relative.yaml │ │ ├── category.yaml │ │ ├── decimal.yaml │ │ ├── disable_asm.yaml │ │ ├── hypervisor.yaml │ │ ├── memory.yaml │ │ ├── memory_with_update.yaml │ │ ├── privileged.yaml │ │ ├── privileged_optional.yaml │ │ ├── switching.yaml │ │ ├── syscall.yaml │ │ ├── trap.yaml │ │ └── unsupported.yaml │ │ ├── isa.py │ │ ├── isa.yaml │ │ ├── operand.py │ │ ├── operand.yaml │ │ ├── register.py │ │ ├── register.yaml │ │ └── register_type.yaml ├── policies │ ├── epi.py │ ├── epi_power10.py │ ├── epi_power9.py │ ├── seq_power10.py │ ├── seq_power9.py │ ├── seqtune_power10.py │ └── seqtune_power9.py ├── templates │ ├── power.ldscript │ ├── power_v206-power7-ppc64_linux_gcc.ldscript │ ├── power_v206-power7-ppc64le_linux_gcc.ldscript │ ├── power_v207-power8-ppc64_linux_gcc.ldscript │ ├── power_v207-power8-ppc64le_linux_gcc.ldscript │ ├── power_v300-power9-ppc64_linux_gcc.ldscript │ ├── power_v300-power9-ppc64le_linux_gcc.ldscript │ ├── power_v310-power10-ppc64_linux_gcc.ldscript │ └── power_v310-power10-ppc64le_linux_gcc.ldscript ├── tests │ ├── examples │ │ └── examples_power_tests.py │ ├── targets │ │ └── targets_tests.py │ └── tools │ │ ├── bin2objdump_test002.bin │ │ ├── c2mpt_test001.c │ │ ├── c2mpt_test002.c │ │ ├── mesa2mpt_test001.trace.gz │ │ ├── mesa2mpt_test002.trace.gz │ │ ├── mp_bin2objdump_tests.py │ │ ├── mp_c2mpt_tests.py │ │ ├── mp_epi_tests.py │ │ ├── mp_mpt2test_tests.py │ │ ├── mp_mpt2trace_tests.py │ │ ├── mp_objdump2mpt_tests.py │ │ ├── mp_seq_tests.py │ │ ├── mp_seqtune_tests.py │ │ ├── mp_target_tests.py │ │ ├── mpt2test_test003.mpt │ │ ├── mpt2test_test004.mpt │ │ ├── mpt2trace_test001.mpt │ │ ├── mpt2trace_test001_addresses.txt │ │ ├── mpt2trace_test002.mpt │ │ ├── mpt2trace_test003.mpt │ │ ├── objdump2mpt_test001.dump.gz │ │ ├── objdump2mpt_test002.dump │ │ ├── objdump2mpt_test003.dump │ │ ├── objdump2mpt_test_kernel_ppc64.dump.gz │ │ └── objdump2mpt_test_libc_ppc64.dump.gz ├── tools │ └── mp_mpt2trace.py ├── uarch │ ├── p-common │ │ ├── element.py │ │ ├── element.yaml │ │ ├── element_type.py │ │ ├── element_type.yaml │ │ ├── element_type_props │ │ │ ├── cache_hierarchy.yaml │ │ │ ├── cache_level.yaml │ │ │ ├── data_cache.yaml │ │ │ └── instruction_cache.yaml │ │ ├── microarchitecture.py │ │ └── microarchitecture.yaml │ ├── p-power10 │ │ ├── element.yaml │ │ ├── element_type.yaml │ │ ├── element_type_props │ │ │ ├── cache_hierarchy.yaml │ │ │ ├── cache_level.yaml │ │ │ ├── data_cache.yaml │ │ │ └── instruction_cache.yaml │ │ ├── microarchitecture.yaml │ │ └── microarchitecture_props │ │ │ └── common.yaml │ ├── p-power7 │ │ ├── element.yaml │ │ ├── element_type.yaml │ │ ├── element_type_props │ │ │ ├── cache_hierarchy.yaml │ │ │ ├── cache_level.yaml │ │ │ ├── data_cache.yaml │ │ │ └── instruction_cache.yaml │ │ ├── instruction_props │ │ │ ├── exec_units.yaml │ │ │ ├── latency.yaml │ │ │ └── throughtput.yaml │ │ ├── microarchitecture.yaml │ │ └── microarchitecture_props │ │ │ └── common.yaml │ ├── p-power8 │ │ ├── element.yaml │ │ ├── element_type.yaml │ │ ├── element_type_props │ │ │ ├── cache_hierarchy.yaml │ │ │ ├── cache_level.yaml │ │ │ ├── data_cache.yaml │ │ │ └── instruction_cache.yaml │ │ ├── microarchitecture.yaml │ │ └── microarchitecture_props │ │ │ └── common.yaml │ └── p-power9 │ │ ├── element.yaml │ │ ├── element_type.yaml │ │ ├── element_type_props │ │ ├── cache_hierarchy.yaml │ │ ├── cache_level.yaml │ │ ├── data_cache.yaml │ │ └── instruction_cache.yaml │ │ ├── microarchitecture.yaml │ │ └── microarchitecture_props │ │ └── common.yaml └── wrappers │ ├── CPSynchStepMultithread.headers │ ├── CPSynchStepMultithread.start_loop │ ├── CPSynchStepMultithread.start_main │ └── cppc.py └── riscv ├── doc ├── examples.rst └── examples_riscv.rst ├── env ├── riscv_eprocessor_sim.py ├── riscv_linux_gcc.py ├── riscv_riscy_sim.py ├── riscv_sargantana_sim.py ├── riscv_spike_sim.py └── riscv_test_p.py ├── examples ├── .gitignore ├── Makefile.in ├── Makefrag ├── README.md ├── configure.ac ├── riscv_branch.py ├── riscv_ipc.py ├── riscv_ipc │ ├── .gitignore │ └── Makefile ├── riscv_ipc_c.py └── riscv_ipc_seq.py ├── isa ├── riscv-common │ ├── comparator.py │ ├── generator.py │ ├── getcontext.S │ ├── instruction.py │ ├── instruction.yaml │ ├── instruction_field.py │ ├── instruction_field.yaml │ ├── instruction_format.py │ ├── instruction_format.yaml │ ├── instruction_props │ │ ├── branch.yaml │ │ ├── branch_conditional.yaml │ │ ├── branch_relative.yaml │ │ ├── decimal.yaml │ │ ├── disable_asm.yaml │ │ ├── memory.yaml │ │ ├── memory_with_update.yaml │ │ ├── priviledged.yaml │ │ ├── switching.yaml │ │ └── unsupported.yaml │ ├── isa.py │ ├── isa.yaml │ ├── operand.py │ ├── operand.yaml │ ├── register.py │ ├── register.yaml │ ├── register_type.py │ ├── register_type.yaml │ └── setcontext.S └── riscv-v2_2 │ ├── instruction.yaml │ └── isa.yaml ├── policies ├── epi.py ├── seq.py └── seqtune.py ├── templates ├── riscv.ldscript ├── riscv_v22-riscv_generic-riscv64_eprocessor_sim.ldscript ├── riscv_v22-riscv_generic-riscv64_linux_gcc.ldscript ├── riscv_v22-riscv_generic-riscv64_riscy_sim.ldscript ├── riscv_v22-riscv_generic-riscv64_sargantana_sim.ldscript ├── riscv_v22-riscv_generic-riscv64_spike_sim.ldscript └── riscv_v22-riscv_generic-riscv64_spike_sim_routines.s ├── tests ├── examples │ └── examples_riscv_tests.py └── tools │ ├── c2mpt_test003.c │ ├── mp_seq_tests.py │ ├── mp_seqtune_tests.py │ └── mpt2test_test003.mpt ├── uarch ├── riscv-common │ ├── element.py │ ├── element.yaml │ ├── element_type.py │ ├── element_type.yaml │ ├── element_type_props │ │ ├── cache_hierarchy.yaml │ │ ├── cache_level.yaml │ │ ├── data_cache.yaml │ │ └── instruction_cache.yaml │ ├── microarchitecture.py │ └── microarchitecture.yaml └── riscv-generic │ └── microarchitecture.yaml └── wrappers └── riscv-tests.py /.gitignore: -------------------------------------------------------------------------------- 1 | /.project 2 | /.idea 3 | __pycache__ 4 | *.pyc 5 | *.yaml.cache 6 | *.yaml.*.cache 7 | *.cache.lock 8 | .asm.py.asm.cache 9 | .bin.py.bin.cache 10 | .bin.py.code.cache 11 | .coverage* 12 | .settings 13 | *.swp 14 | htmlcov 15 | /doc/source/microprobe.*.rst 16 | /doc/source/examples_outputs/* 17 | /doc/build/* 18 | dev_tools/ci/*.sh.error 19 | dev_tools/ci/*.sh.html 20 | dev_tools/ci/*.sh.txt 21 | .*.swp 22 | .coverage 23 | .coverage.* 24 | coverage.zip 25 | htmlcov/ 26 | venv/ 27 | ./distribution/ 28 | documentation.txt 29 | pep8.out 30 | deploy-2.7/ 31 | deploy-2.6/ 32 | tests_*.xml 33 | /.cache* 34 | /distribution 35 | /cover*xml 36 | /venv* 37 | /pylint*.out 38 | /mypy*.out 39 | /doc.out 40 | /pycodestyle*.out 41 | /pycodestyle.err 42 | /nosetests.xml 43 | *~ 44 | .#* 45 | *#*# 46 | tags 47 | TAGS 48 | .pydevproject 49 | /.pydevproject 50 | doc/error.log 51 | doc/errors.txt 52 | get_pip 53 | -------------------------------------------------------------------------------- /.isort.cfg: -------------------------------------------------------------------------------- 1 | [settings] 2 | line_length=78 3 | sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER 4 | 5 | import_heading_future=Futures 6 | import_heading_stdlib=Built-in modules 7 | import_heading_thirdparty=Third party modules 8 | import_heading_firstparty=Own modules 9 | import_heading_localfolder=Local modules 10 | 11 | multi_line_output=2 12 | balanced_wrapping=True 13 | skip=None 14 | 15 | #known_future_library=future,pies 16 | #known_standard_library=std,std2 17 | #known_third_party=randomthirdparty 18 | #known_first_party=mylib1,mylib2 19 | #indent=' ' 20 | #multi_line_output=3 21 | #length_sort=1 22 | #forced_separate=django.contrib,django.utils 23 | #default_section=FIRSTPARTY 24 | -------------------------------------------------------------------------------- /ABOUT.rst: -------------------------------------------------------------------------------- 1 | Microprobe is a productive microbenchmark generation framework that an user 2 | can adapt towards exercising a complex multi-core, multi-threaded computing 3 | system in a variety of redundant ways for answering a range of questions 4 | related to power, energy and performance. 5 | 6 | Documentation: https://ibm.github.io/microprobe/ 7 | -------------------------------------------------------------------------------- /activate_microprobe: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env echo Pleases source me! 2 | # 3 | # MicroProbe support scripts 4 | # 5 | # Author: Ramon Bertran Monfort 6 | # 7 | # Copyright 2011-2018 IBM Corporation 8 | # IBM (c) 2011-2018 All rights reserved 9 | # 10 | scriptpath=$( cd -P -- "$(dirname -- "$(command -v -- "$1")")" && pwd -P ) 11 | if [ ! -d $scriptpath/venv/ ]; then echo Execute $scriptpath/bootstrap_environment.sh first!; 12 | else . $scriptpath/venv/bin/activate; fi 13 | -------------------------------------------------------------------------------- /dev_tools/ci/pip.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | find-links = 3 | VIRTUAL_ENV/common/dev/ 4 | VIRTUAL_ENV/common/stable/ 5 | -------------------------------------------------------------------------------- /dev_tools/ci/test_004_unittest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Microprobe CI support scripts 17 | # 18 | 19 | set -e # Finish right after a non-zero return command 20 | 21 | if [ "$WORKSPACE" = "" ]; then 22 | WORKSPACE=$(pwd) 23 | export WORKSPACE 24 | fi 25 | 26 | # shellcheck source=dev_tools/ci/environment.sh 27 | . "$WORKSPACE/dev_tools/ci/environment.sh" 28 | start_script "$0" 29 | 30 | command -v nosetests 31 | python "$(command -v nosetests)" --version 32 | 33 | set +e 34 | error=$? 35 | set -e 36 | 37 | if [ "$error" -ne 0 ]; then 38 | exit_error "$0" 39 | fi 40 | exit_success "$0" 41 | 42 | # vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab 43 | -------------------------------------------------------------------------------- /dev_tools/ci/test_005_coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | # Microprobe CI support scripts 17 | # 18 | 19 | set -e # Finish right after a non-zero return command 20 | 21 | if [ "$WORKSPACE" = "" ]; then 22 | WORKSPACE=$(pwd) 23 | export WORKSPACE 24 | fi 25 | 26 | # shellcheck source=dev_tools/ci/environment.sh 27 | . "$WORKSPACE/dev_tools/ci/environment.sh" 28 | start_script "$0" 29 | 30 | command -v coverage 31 | coverage --version 32 | 33 | set +e 34 | $NICE coverage combine 35 | $NICE coverage xml -o coverage.xml --fail-under=50 36 | error=$? 37 | set -e 38 | 39 | if [ "$error" -gt 3 ]; then 40 | exit_error "$0" 41 | fi 42 | exit_success "$0" 43 | 44 | # vim: set tabstop=4 softtabstop=4 shiftwidth=4 expandtab 45 | -------------------------------------------------------------------------------- /dev_tools/ci/travis_prolog: -------------------------------------------------------------------------------- 1 | set -e 2 | pip3 install -U -r requirements_devel.txt 3 | pip3 install -U -r requirements.txt 4 | pip3 install -U $(pip3 list | grep "\." | cut -d " " -f 1) 5 | pip3 install -U $(pip3 list | grep "\." | cut -d " " -f 1) 6 | pip3 install -U $(pip3 list | grep "\." | cut -d " " -f 1) 7 | export NEEDINSTALL=False 8 | export PATH=$PATH:$(pwd)/toolchain_riscv/install/bin 9 | export PATH=$PATH:/opt/at14.0/bin 10 | for file in ./targets/*/dev_tools/ci/travis.sh ; do if [ -f $file ]; then . $file; fi; done; 11 | -------------------------------------------------------------------------------- /dev_tools/ci/update_pages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # Copyright 2011-2021 IBM Corporation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | set -x 17 | set -e 18 | git checkout -f master 19 | git branch -D gh-pages || echo OK 20 | git checkout --orphan gh-pages 21 | ./dev_tools/ci/code_conventions_003_documentation.sh 22 | temp=$(mktemp -d) 23 | mv ./doc/build/html/* "$temp" 24 | git rm --cached -r . 25 | git rm -f .gitignore || echo OK 26 | rm -fr ./* 27 | mv "$temp"/* . 28 | touch .nojekyll 29 | git add ./* 30 | git add .nojekyll 31 | git commit -s -m "Autogenerated documentation from master branch" 32 | git push --force --set-upstream origin gh-pages 33 | rm -f .gitignore .isort.cfg .travis.yml 34 | git checkout -f master 35 | -------------------------------------------------------------------------------- /dev_tools/distribution/setup.cfg: -------------------------------------------------------------------------------- 1 | [egg_info] 2 | tag_build = @@TAG@@ 3 | egg_base = @@TMP2@@ 4 | 5 | [check] 6 | strict = 1 7 | 8 | [build] 9 | build_purelib = @@TMP@@ 10 | build_temp = @@TMP@@ 11 | 12 | [bdist_wheel] 13 | universal = 1 14 | bdist_dir = @@TMP@@ 15 | python_tag = py3 16 | dist_dir = @@INSTALLDIR@@ 17 | 18 | [rotate] 19 | keep = 30 20 | match = .whl 21 | dist_dir = @@INSTALLDIR@@ 22 | 23 | -------------------------------------------------------------------------------- /dev_tools/skeletons/create_env_skeleton.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | set -e 16 | 17 | if [ $# -ne 2 ]; then 18 | echo "Create Env skeleton utility. It generates the required files to start a new Env backend." 19 | echo 20 | echo "Usage: $0 target_dir name" 21 | echo 22 | exit 255 23 | fi 24 | 25 | if [ -e "$1/$2.py" ]; then 26 | echo "Target '$1/$2.py' already exists" 27 | exit 255 28 | fi 29 | 30 | DIR="$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P )" 31 | TEMPLATE_DIR=$DIR/templates 32 | 33 | cp "$TEMPLATE_DIR/header.python" "$1/$2.py" 34 | 35 | -------------------------------------------------------------------------------- /dev_tools/templates/header.python: -------------------------------------------------------------------------------- 1 | """ 2 | Docstring 3 | """ 4 | 5 | # Futures 6 | 7 | # Built-in modules 8 | 9 | # Third party modules 10 | 11 | # Own modules 12 | 13 | __author__ = "Ramon Bertran" 14 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 15 | __credits__ = [] 16 | __license__ = "IBM (c) 2011-2021 All rights reserved" 17 | __version__ = "0.5" 18 | __maintainer__ = "Ramon Bertran" 19 | __email__ = "rbertra@us.ibm.com" 20 | __status__ = "Development" # "Prototype", "Development", or "Production" 21 | 22 | # Constants 23 | 24 | # Functions 25 | 26 | # Classes 27 | 28 | -------------------------------------------------------------------------------- /dev_tools/templates/header.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /dev_tools/utils/generate_tags.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | script_dir=$( cd -P -- "$(dirname -- "$(command -v -- "$0")")" && pwd -P ) 17 | base_dir=$script_dir/../.. 18 | 19 | find "$base_dir" -name "*.py" -exec ctags --output-format=etags {} + 20 | find "$base_dir" -name "*.py" -exec ctags {} + 21 | -------------------------------------------------------------------------------- /dev_tools/utils/quick_replacer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | from __future__ import absolute_import 16 | from __future__ import print_function 17 | import sys 18 | 19 | myfile = sys.argv[1] 20 | old = sys.argv[2] 21 | new = sys.argv[3] 22 | 23 | print(("Replace '%s' by '%s' in '%s'" % (old, new, myfile))) 24 | 25 | fd = open(myfile, 'r') 26 | contents = ''.join(fd.readlines()) 27 | fd.close() 28 | 29 | contents = contents.replace(old, new) 30 | 31 | # print(contents) 32 | 33 | fd = open(myfile, 'w') 34 | fd.write(contents) 35 | fd.close() 36 | -------------------------------------------------------------------------------- /dev_tools/utils/strip-metadata.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2011-2021 IBM Corporation 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | find "$@" \ 17 | -type f \ 18 | \( -name "*.py" ! -name "info.py" \) \ 19 | -exec sed -i '/^__\(author\|copyright\|credits\|license\|version\|maintainer\|email\|status\)__.\+$/d' {} + 20 | -------------------------------------------------------------------------------- /doc/mp_artwork/LOGOS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/LOGOS.jpg -------------------------------------------------------------------------------- /doc/mp_artwork/LOGOS.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/LOGOS.ppt -------------------------------------------------------------------------------- /doc/mp_artwork/LOGOSnew.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/LOGOSnew.pptx -------------------------------------------------------------------------------- /doc/mp_artwork/chartsDIDT.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/chartsDIDT.pptx -------------------------------------------------------------------------------- /doc/mp_artwork/logo.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo.tif -------------------------------------------------------------------------------- /doc/mp_artwork/logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo_black.png -------------------------------------------------------------------------------- /doc/mp_artwork/logo_transp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo_transp.png -------------------------------------------------------------------------------- /doc/mp_artwork/logo_transp.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo_transp.xcf -------------------------------------------------------------------------------- /doc/mp_artwork/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo_white.png -------------------------------------------------------------------------------- /doc/mp_artwork/logo_white_reflect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/logo_white_reflect.png -------------------------------------------------------------------------------- /doc/mp_artwork/minilogo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/minilogo_black.png -------------------------------------------------------------------------------- /doc/mp_artwork/minilogo_black.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/minilogo_black.tif -------------------------------------------------------------------------------- /doc/mp_artwork/minilogo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/minilogo_white.png -------------------------------------------------------------------------------- /doc/mp_artwork/minilogo_white.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/minilogo_white.tif -------------------------------------------------------------------------------- /doc/mp_artwork/postcard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/postcard.jpg -------------------------------------------------------------------------------- /doc/mp_artwork/postcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/postcard.png -------------------------------------------------------------------------------- /doc/mp_artwork/postcard.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/mp_artwork/postcard.tif -------------------------------------------------------------------------------- /doc/source/_templates/mybase.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. auto{{ objtype }}:: {{ objname }} 7 | -------------------------------------------------------------------------------- /doc/source/_templates/myclass.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. autoclass:: {{ objname }} 7 | 8 | {% block attributes %} 9 | {% if attributes %} 10 | .. rubric:: Attributes 11 | 12 | .. autosummary:: 13 | {% for item in attributes %} 14 | {{ name }}.{{ item }} 15 | {%- endfor %} 16 | {% endif %} 17 | {% endblock %} 18 | 19 | {% block methods %} 20 | {% if methods %} 21 | .. rubric:: Methods 22 | 23 | .. autosummary:: 24 | {% for item in methods %} 25 | {{ name }}.{{ item }} 26 | {%- endfor %} 27 | {% endif %} 28 | {% endblock %} 29 | 30 | {% if attributes %} 31 | ---------------- 32 | Class attributes 33 | ---------------- 34 | {% for item in attributes %} 35 | .. autoattribute:: {{ name }}.{{ item }} 36 | {%- endfor %} 37 | {% endif %} 38 | 39 | {% if methods %} 40 | ------------- 41 | Class methods 42 | ------------- 43 | {% for item in methods %} 44 | .. automethod:: {{ name }}.{{ item }} 45 | {%- endfor %} 46 | {% endif %} 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/source/_templates/myclass.rst.all: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. autoclass:: {{ objname }} 7 | 8 | {% block attributes %} 9 | {% if attributes %} 10 | .. rubric:: Attributes 11 | 12 | .. autosummary:: 13 | {% for item in attributes %} 14 | ~{{ name }}.{{ item }} 15 | {%- endfor %} 16 | {% endif %} 17 | {% endblock %} 18 | 19 | {% block methods %} 20 | 21 | {% if methods %} 22 | .. rubric:: Methods 23 | 24 | .. autosummary: 25 | :template: mybase.rst 26 | {% for item in methods %} 27 | ~{{ name }}.{{ item }} 28 | {%- endfor %} 29 | {% endif %} 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /doc/source/_templates/myclass2.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. autoclass:: {{ objname }} 7 | :members: 8 | :no-private-members: 9 | :no-special-members: 10 | :undoc-members: 11 | :inherited-members: 12 | 13 | {% block methods %} 14 | .. automethod:: __init__ 15 | 16 | {% if methods %} 17 | .. rubric:: Methods 18 | 19 | .. autosummary:: 20 | {% for item in methods %} 21 | ~{{ name }}.{{ item }} 22 | {%- endfor %} 23 | {% endif %} 24 | {% endblock %} 25 | 26 | {% block attributes %} 27 | {% if attributes %} 28 | .. rubric:: Attributes 29 | 30 | .. autosummary:: 31 | {% for item in attributes %} 32 | ~{{ name }}.{{ item }} 33 | {%- endfor %} 34 | {% endif %} 35 | {% endblock %} 36 | 37 | {% block html %} 38 | .. raw:: html 39 | 40 |
41 |
42 |
43 | 44 | {% endblock %} 45 | 46 | 47 | -------------------------------------------------------------------------------- /doc/source/_templates/myexception.rst: -------------------------------------------------------------------------------- 1 | {{ fullname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | 6 | .. autoexception:: {{ objname }} 7 | 8 | {% block methods %} 9 | 10 | {% if methods %} 11 | .. rubric:: Methods 12 | 13 | .. autosummary:: 14 | {% for item in methods %} 15 | ~{{ name }}.{{ item }} 16 | {%- endfor %} 17 | {% endif %} 18 | {% endblock %} 19 | 20 | {% block attributes %} 21 | {% if attributes %} 22 | .. rubric:: Attributes 23 | 24 | .. autosummary:: 25 | {% for item in attributes %} 26 | ~{{ name }}.{{ item }} 27 | {%- endfor %} 28 | {% endif %} 29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /doc/source/artwork/logo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/logo_black.png -------------------------------------------------------------------------------- /doc/source/artwork/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/logo_white.png -------------------------------------------------------------------------------- /doc/source/artwork/logo_white_reflect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/logo_white_reflect.png -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_black.png -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white.ico -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white.png -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white_150px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white_150px.png -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white_256px.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white_256px.ico -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white_256px2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white_256px2.ico -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_white_256px3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_white_256px3.ico -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_whiteb_150px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_whiteb_150px.png -------------------------------------------------------------------------------- /doc/source/artwork/minilogo_whiteb_150px.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/minilogo_whiteb_150px.xcf -------------------------------------------------------------------------------- /doc/source/artwork/postcard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/artwork/postcard.png -------------------------------------------------------------------------------- /doc/source/copyright.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Copyright 3 | ========= 4 | 5 | Copyright 2011-2020 IBM Corporation. 6 | 7 | Contact name: Ramon Bertran, rbertra@us.ibm.com. 8 | 9 | This work was supported,in part, by DARPA MTO under contract no. HR0011-13-C-0022. 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/source/design.rst: -------------------------------------------------------------------------------- 1 | ====== 2 | Design 3 | ====== 4 | 5 | Please check the first publication on **Microprobe** (:doc:`index_publications`) 6 | for an overview of the original design. Since then, the framework has been 7 | improved to target different architectures and to be more generic. Check 8 | the rest of the documentation for further details. 9 | 10 | .. toctree:: 11 | :maxdepth: 1 12 | 13 | design_overview 14 | design_code_organization 15 | design_code_workflow 16 | design_target 17 | -------------------------------------------------------------------------------- /doc/source/design_code_organization.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Code Organization 3 | ================= 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/design_code_workflow.rst: -------------------------------------------------------------------------------- 1 | ========================= 2 | Code generation work-flow 3 | ========================= 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/design_overview.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Design overview 3 | =============== 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/design_target.rst: -------------------------------------------------------------------------------- 1 | ============= 2 | Design target 3 | ============= 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/devel.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Development Corner 3 | ================== 4 | 5 | In the following subsection you can find all the details regarding 6 | the development of **Microprobe**. Check them out and feel free 7 | to contribute to the project! 8 | 9 | .. toctree:: 10 | :maxdepth: 1 11 | 12 | devel_contributing 13 | devel_repository 14 | devel_code_style 15 | devel_patches 16 | devel_continuous 17 | devel_ticket 18 | devel_roadmap 19 | -------------------------------------------------------------------------------- /doc/source/devel_roadmap.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | Development road-map 3 | ==================== 4 | 5 | Since Microprobe is mainly a research-driven framework, our main focus is 6 | to provide support to the IBM product teams that use the framework, adding 7 | features and implementing bug fixes on demand. 8 | 9 | Besides that, the current development focus is on improving the code-quality 10 | and the documentation towards a stable public release of the framework so 11 | that other user communities can leverage it. 12 | -------------------------------------------------------------------------------- /doc/source/examples.rst: -------------------------------------------------------------------------------- 1 | ======== 2 | Examples 3 | ======== 4 | 5 | The following sections provide some examples on how to use Microprobe for 6 | the different targets implemented. Although we have split the examples by 7 | architecture, the concepts we introduce in each of these sections are common in 8 | all the architectures. Let us know which examples could be useful 9 | for new users, so that we can extend the current set of examples. 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | examples_power 15 | examples_riscv 16 | examples_z 17 | -------------------------------------------------------------------------------- /doc/source/images/c2mpt_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/c2mpt_workflow.png -------------------------------------------------------------------------------- /doc/source/images/c2mpt_workflow_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/c2mpt_workflow_bw.png -------------------------------------------------------------------------------- /doc/source/images/code_style_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_1.png -------------------------------------------------------------------------------- /doc/source/images/code_style_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_10.png -------------------------------------------------------------------------------- /doc/source/images/code_style_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_11.png -------------------------------------------------------------------------------- /doc/source/images/code_style_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_12.png -------------------------------------------------------------------------------- /doc/source/images/code_style_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_13.png -------------------------------------------------------------------------------- /doc/source/images/code_style_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_14.png -------------------------------------------------------------------------------- /doc/source/images/code_style_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_2.png -------------------------------------------------------------------------------- /doc/source/images/code_style_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_3.png -------------------------------------------------------------------------------- /doc/source/images/code_style_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_4.png -------------------------------------------------------------------------------- /doc/source/images/code_style_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_5.png -------------------------------------------------------------------------------- /doc/source/images/code_style_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_6.png -------------------------------------------------------------------------------- /doc/source/images/code_style_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_7.png -------------------------------------------------------------------------------- /doc/source/images/code_style_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_8.png -------------------------------------------------------------------------------- /doc/source/images/code_style_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/code_style_9.png -------------------------------------------------------------------------------- /doc/source/images/didt_example1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example1.png -------------------------------------------------------------------------------- /doc/source/images/didt_example2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example2.png -------------------------------------------------------------------------------- /doc/source/images/didt_example3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example3.png -------------------------------------------------------------------------------- /doc/source/images/didt_example4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example4.png -------------------------------------------------------------------------------- /doc/source/images/didt_example5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example5.png -------------------------------------------------------------------------------- /doc/source/images/didt_example6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example6.png -------------------------------------------------------------------------------- /doc/source/images/didt_example7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_example7.png -------------------------------------------------------------------------------- /doc/source/images/didt_static_layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/doc/source/images/didt_static_layout.png -------------------------------------------------------------------------------- /doc/source/microprobe.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | microprobe 3 | ========== 4 | 5 | .. automodule:: microprobe 6 | :no-members: 7 | :no-show-inheritance: 8 | :no-inherited-members: 9 | :no-undoc-members: 10 | :no-special-members: 11 | :no-private-members: 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | .. raw:: html 31 | 32 |
33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /doc/source/nitpick-exceptions: -------------------------------------------------------------------------------- 1 | py:class list 2 | py:class tuple 3 | py:class argparse.HelpFormatter 4 | -------------------------------------------------------------------------------- /doc/source/start.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Getting started 3 | =============== 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | start_quick 9 | start_requirements 10 | start_organization 11 | start_install 12 | start_update 13 | start_check 14 | start_quick_private 15 | -------------------------------------------------------------------------------- /doc/source/start_check.rst: -------------------------------------------------------------------------------- 1 | ================================ 2 | Checking Microprobe installation 3 | ================================ 4 | 5 | Remember that you have to activate the Microprobe virtual environment 6 | if you have installed it on a virtual environment:: 7 | 8 | > source INSTALLDIRECTORY/bin/activate 9 | 10 | and if you are using Microprobe from the git repository, you should follow the 11 | procedure defined in :doc:`start_install_git`. 12 | 13 | Then, you can check if *microprobe* package can be seen by the Python run-time 14 | by executing:: 15 | 16 | > python -c "import microprobe" 17 | 18 | If no error is shown, installation and environment set up is correct. 19 | 20 | Also, you can check the correctness of the installation by executing one 21 | of the command line tools provided:: 22 | 23 | > mp_target --help 24 | 25 | You should get something like: 26 | 27 | .. program-output:: ../../targets/generic/tools/mp_target.py --help 28 | 29 | If you do not get any error, you are done and ready to go. Otherwise, 30 | double-check your installation. Check :doc:`start_install` for further details. 31 | 32 | Finally, if something is still wrong, request :doc:`support`. 33 | -------------------------------------------------------------------------------- /doc/source/start_install.rst: -------------------------------------------------------------------------------- 1 | ===================== 2 | Installing Microprobe 3 | ===================== 4 | 5 | We provide different methods to obtain and update Microprobe. 6 | Check the links below: 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | 11 | start_install_pip 12 | start_install_git 13 | 14 | .. note:: 15 | 16 | We can not track broken things on all the possible linux/AIX distributions 17 | and architectures. If the installation instructions do not work in your 18 | system contact the main developers (:doc:`support_contact`). 19 | 20 | -------------------------------------------------------------------------------- /doc/source/start_quick.rst: -------------------------------------------------------------------------------- 1 | .. _myquick: 2 | 3 | ================= 4 | Quick start guide 5 | ================= 6 | 7 | Install Microprobe on your system by executing:: 8 | 9 | > pip install --pre -U microprobe_all 10 | 11 | Check the `pip` command documentation for different intallation 12 | options. 13 | 14 | .. note:: 15 | 16 | If you plan to contribute to the project, you should install 17 | Microprobe using the instructions here: :doc:`start_install_git` 18 | 19 | Check :doc:`start_update` for more details on how to upgrade your installation. 20 | -------------------------------------------------------------------------------- /doc/source/support.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Support 3 | ======= 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | support_faq 9 | support_contact 10 | support_bug -------------------------------------------------------------------------------- /doc/source/support_contact.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Contact 3 | ======= 4 | 5 | Developers 6 | ---------- 7 | 8 | The main developers of Microprobe are: 9 | 10 | - Ramon Bertran (main) 11 | - Arnau Bigas (RISC-V port) 12 | 13 | Feel free to join this list. Check out the :doc:`devel` section. 14 | 15 | Direct contact 16 | -------------- 17 | 18 | Microprobe is being developed by the 19 | *Efficient and Resilient Systems Research Group* 20 | group at IBM T. J. Watson Research Center. We are: 21 | 22 | - Ramon Bertran (main developer) 23 | - Karthik Swaminathan 24 | - Alper Buyuktosunoglu 25 | - Pradip Bose (manager) 26 | 27 | Collaborators and contributors 28 | ------------------------------ 29 | 30 | - Schuyler Eldridge (RISC-V port) 31 | -------------------------------------------------------------------------------- /doc/source/tutorial.rst: -------------------------------------------------------------------------------- 1 | ========= 2 | Tutorials 3 | ========= 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | tutorial_simple_policy 9 | tutorial_complex_policy 10 | tutorial_custom_tool 11 | tutorial_adding_definitions 12 | -------------------------------------------------------------------------------- /doc/source/tutorial_adding_definitions.rst: -------------------------------------------------------------------------------- 1 | ====================================== 2 | Tutorial: Adding/Modifying definitions 3 | ====================================== 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/tutorial_complex_policy.rst: -------------------------------------------------------------------------------- 1 | ========================================================= 2 | Tutorial: A more complex microbenchmark generation policy 3 | ========================================================= 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/tutorial_custom_tool.rst: -------------------------------------------------------------------------------- 1 | ================================================================== 2 | Tutorial: Creating a command line tool (microbenchmark-generators) 3 | ================================================================== 4 | 5 | TBD -------------------------------------------------------------------------------- /doc/source/tutorial_simple_policy.rst: -------------------------------------------------------------------------------- 1 | =================================================== 2 | Tutorial: A simple microbenchmark generation policy 3 | =================================================== 4 | 5 | TBD -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | PyYAML 2 | argparse 3 | rxjson 4 | six 5 | fasteners 6 | cachetools 7 | -------------------------------------------------------------------------------- /requirements_devel.txt: -------------------------------------------------------------------------------- 1 | pip 2 | wheel 3 | setuptools 4 | PyYAML 5 | argparse 6 | rxjson 7 | six 8 | sphinx 9 | sphinx_rtd_theme 10 | sphinxcontrib-websupport 11 | sphinxcontrib-programoutput 12 | pep8 13 | backports.functools_lru_cache 14 | pylint 15 | nose 16 | nose2 17 | nose_xunitmp 18 | cov-core 19 | subprocess32 20 | coverage 21 | virtualenv 22 | wheel 23 | pycodestyle 24 | pylint-mccabe 25 | pep8-naming 26 | # flake8 27 | # flake8-author 28 | # flake8-blind-except 29 | # flake8-builtins 30 | # flake8-commas 31 | # flake8-comprehensions 32 | # flake8-copyright 33 | # flake8-deprecated 34 | # flake8-docstrings 35 | # flake8-double-quotes 36 | # flake8-logging-format 37 | # flake8-sorted-keys 38 | # flake8-import-order-spoqa 39 | # flake8-future 40 | # flake8-string-format 41 | # flake8-future-import 42 | # flake8-todo 43 | # flake8-ownership 44 | # flake8-pep3101 45 | # flake8_strict 46 | # flake8_tuple 47 | yapf 48 | isort 49 | twine 50 | mypy 51 | typeguard 52 | black 53 | flynt 54 | -------------------------------------------------------------------------------- /src/microprobe/driver/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """:mod:`microprobe.driver` package 15 | 16 | """ 17 | 18 | from typing import List 19 | 20 | # Constants 21 | __all__: List[str] = [] 22 | 23 | # Functions 24 | 25 | # Classes 26 | -------------------------------------------------------------------------------- /src/microprobe/driver/guided.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """:mod:`microprobe.driver.guided` module 15 | 16 | """ 17 | 18 | from typing import List 19 | 20 | # Constants 21 | __all__: List[str] = [] 22 | 23 | # Functions 24 | 25 | # Classes 26 | -------------------------------------------------------------------------------- /src/microprobe/microprobe.cfg: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | verbosity = 0 3 | debug = False 4 | debugpasses = False 5 | default_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 6 | architecture_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 7 | microarchitecture_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 8 | environment_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 9 | template_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 10 | wrapper_paths = [ "MICROPROBE_INSTALL_DIR/definitions", "MICROPROBE_INSTALL_DIR/../../targets/" ] 11 | parallel_threshold = 999999999999 12 | no_cache = False 13 | -------------------------------------------------------------------------------- /src/microprobe/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """. 15 | 16 | . 17 | """ 18 | 19 | from typing import List 20 | 21 | # Constants 22 | __all__: List[str] = [] 23 | 24 | # Functions 25 | 26 | # Classes 27 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/default/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | Name: Default 16 | Description: Default ISA definition 17 | ISA: 18 | Class: GenericISA 19 | Module: microprobe/target/isa/__init__.py 20 | Instruction_format: 21 | Class: GenericInstructionFormat 22 | Module: microprobe/target/isa/instruction_format.py 23 | Instruction: 24 | Class: GenericInstructionType 25 | Module: microprobe/target/isa/instruction.py 26 | Register: 27 | Class: GenericRegister 28 | Module: microprobe/target/isa/register.py 29 | Register_type: 30 | Class: GenericRegisterType 31 | Module: microprobe/target/isa/register_type.py 32 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """. 15 | 16 | . 17 | """ 18 | 19 | from typing import List 20 | 21 | # Constants 22 | __all__: List[str] = [] 23 | 24 | # Functions 25 | 26 | # Classes 27 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/schemas/instruction_field.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name: 20 | type : //str 21 | length : { min: 1 } 22 | Size: 23 | type : //int 24 | range : { min: 1 } 25 | optional: 26 | Show: 27 | type : //bool 28 | IO: 29 | type : //str 30 | length : { min: 1 } 31 | Operand: 32 | type : //str 33 | length : { min: 1 } 34 | Description: 35 | type : //str 36 | length : { min: 1 } 37 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/schemas/instruction_format.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name: 20 | type: //str 21 | length: { min: 1 } 22 | Fields: 23 | type: //arr 24 | contents: 25 | type: //str 26 | length: { min: 1 } 27 | Assembly: 28 | type: //str 29 | length: { min: 1 } 30 | optional: 31 | Description: 32 | type: //str 33 | length: { min: 1 } 34 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/schemas/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name: 20 | type : //str 21 | length : { min: 1 } 22 | Type: 23 | type : //str 24 | length : { min: 1 } 25 | Representation: 26 | type : //str 27 | length : { min: 1 } 28 | optional: 29 | Codification: 30 | type : //str 31 | length : { min: 1 } 32 | Description: 33 | type : //str 34 | length : { min: 1 } 35 | Repeat: 36 | type : //rec 37 | required: 38 | From: 39 | type: //int 40 | range : { min: 0 } 41 | To: 42 | type: //int 43 | range : { min: 1 } 44 | -------------------------------------------------------------------------------- /src/microprobe/target/isa/schemas/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name: 20 | type : //str 21 | length : { min: 1 } 22 | Size: 23 | type : //int 24 | range : { min: 1 } 25 | optional: 26 | Description: 27 | type : //str 28 | length : { min: 1 } 29 | AddressArithmetic: 30 | type : //bool 31 | FloatArithmetic: 32 | type : //bool 33 | VectorArithmetic: 34 | type : //bool 35 | -------------------------------------------------------------------------------- /src/microprobe/target/uarch/default/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | Name: Default 16 | Description: Default Microarchitecture definition 17 | Microarchitecture: 18 | Class: GenericMicroarchitecture 19 | Module: microprobe/target/uarch/__init__.py 20 | Element: 21 | Class: GenericMicroarchitectureElement 22 | Module: microprobe/target/uarch/element.py 23 | Element_type: 24 | Class: GenericMicroarchitectureElementType 25 | Module: microprobe/target/uarch/element_type.py 26 | -------------------------------------------------------------------------------- /src/microprobe/target/uarch/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """. 15 | 16 | . 17 | """ 18 | 19 | from typing import List 20 | 21 | # Constants 22 | __all__: List[str] = [] 23 | 24 | # Functions 25 | 26 | # Classes 27 | -------------------------------------------------------------------------------- /src/microprobe/target/uarch/schemas/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name : 20 | type : //str 21 | length : { min: 1 } 22 | Type: 23 | type : //str 24 | length : { min: 1 } 25 | optional: 26 | Description : 27 | type : //str 28 | length : { min: 1 } 29 | Subelements : 30 | type : //arr 31 | contents: 32 | type: //str 33 | length : { min: 1 } 34 | Repeat: 35 | type : //rec 36 | required: 37 | From: 38 | type: //int 39 | range : { min: 0 } 40 | To: 41 | type: //int 42 | range : { min: 1 } 43 | -------------------------------------------------------------------------------- /src/microprobe/target/uarch/schemas/element_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | type: //arr 16 | contents: 17 | type: //rec 18 | required: 19 | Name: 20 | type : //str 21 | length : { min: 1 } 22 | optional: 23 | Description: 24 | type : //str 25 | length : { min: 1 } 26 | -------------------------------------------------------------------------------- /src/microprobe/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """:mod:`microprobe.utils` package 15 | 16 | """ 17 | 18 | from typing import List 19 | 20 | # Constants 21 | __all__: List[str] = [] 22 | 23 | # Functions 24 | 25 | # Classes 26 | -------------------------------------------------------------------------------- /src/microprobe/utils/typeguard_decorator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2023 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """:mod:`microprobe.utils.typeguard_decorator` module 15 | 16 | """ 17 | 18 | # Futures 19 | 20 | 21 | # Built-in modules 22 | import sys 23 | from typing import Any 24 | 25 | 26 | # Third party modules 27 | if "unittest" in sys.modules: 28 | # running in testsuite, enable runtime type checking 29 | import typeguard 30 | 31 | 32 | # Constants 33 | __all__ = ["typeguard_testsuite"] 34 | 35 | 36 | # Functions 37 | def typeguard_testsuite(dec: Any) -> Any: 38 | """Only perform runtime type checking when running testsuite""" 39 | if "unittest" in sys.modules: 40 | return typeguard.typechecked(dec) 41 | return dec 42 | -------------------------------------------------------------------------------- /targets/power/doc/examples.rst: -------------------------------------------------------------------------------- 1 | examples_power 2 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | __all__ = [] 29 | 30 | # Functions 31 | 32 | # Classes 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | __all__ = [] 29 | 30 | # Functions 31 | 32 | # Classes 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/branch.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch 16 | Description: Boolean indicating if the instruction is a branch 17 | Default: False 18 | Values: 19 | B_V0: True 20 | BA_V0: True 21 | BL_V0: True 22 | BLA_V0: True 23 | BC_V0: True 24 | BCA_V0: True 25 | BCL_V0: True 26 | BCLA_V0: True 27 | BCLR_V0: True 28 | BCLRL_V0: True 29 | BCCTR_V0: True 30 | BCCTRL_V0: True 31 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/branch_conditional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_conditional 16 | Description: Boolean indicating if the instruction is a branch conditional 17 | Default: False 18 | Values: 19 | BC_V0: True 20 | BCA_V0: True 21 | BCL_V0: True 22 | BCLA_V0: True 23 | BCLR_V0: True 24 | BCLRL_V0: True 25 | BCCTR_V0: True 26 | BCCTRL_V0: True 27 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/branch_relative.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_relative 16 | Description: Boolean indicating if the instruction is a relative branch 17 | Default: False 18 | Values: 19 | B_V0: True 20 | BL_V0: True 21 | BC_V0: True 22 | BCL_V0: True 23 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/disable_asm.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: disable_asm 16 | Description: Boolean indicating if ASM generation is disabled for the instruction. If so, binary codification is used. 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/hypervisor.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: hypervisor 16 | Description: Boolean indicating if the instruction need hypervisor mode 17 | Default: False 18 | Values: 19 | ADDG6S_V0: True 20 | CDTBCD_V0: True 21 | CBCDTD_V0: True 22 | DOZE_V0: True 23 | HRFID_V0: True 24 | LBZCIX_V0: True 25 | LDCIX_V0: True 26 | LHZCIX_V0: True 27 | LWZCIX_V0: True 28 | NAP_V0: True 29 | RVWINKLE_V0: True 30 | SLEEP_V0: True 31 | STBCIX_V0: True 32 | STDCIX_V0: True 33 | STHCIX_V0: True 34 | STWCIX_V0: True 35 | TLBIA_V0: True 36 | TLBIE_V0: True 37 | TLBSYNC_V0: True 38 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/privileged.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: privileged 16 | Description: Boolean indicating if the instruction is privileged 17 | Default: False 18 | Values: 19 | LQ_V0: True 20 | MFMSR_V0: True 21 | MFSPR_V0: True 22 | MFSR_V0: True 23 | MFSRIN_V0: True 24 | MTMSR_V0: True 25 | MTMSRD_V0: True 26 | MTSPR_V0: True 27 | MTSR_V0: True 28 | MTSRIN_V0: True 29 | RFID_V0: True 30 | SLBFEEx_V0: True 31 | SLBIA_V0: True 32 | SLBIE_V0: True 33 | SLBMFEE_V0: True 34 | SLBMFEV_V0: True 35 | SLBMTE_V0: True 36 | STQ_V0: True 37 | TLBIEL_V0: True 38 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/privileged_optional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: privileged_optional 16 | Description: Boolean indicating the instrucion is priviledged or not depending on the input values 17 | Default: False 18 | Values: 19 | MFSPR_V0: True 20 | MTSPR_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/syscall.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: syscall 16 | Description: Boolean indicating if the instruction is a syscall or return from one 17 | Default: False 18 | Values: 19 | SC_V0: True 20 | RFID_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/instruction_props/trap.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: trap 16 | Description: Boolean indicating if the instruction is a trap 17 | Default: False 18 | Values: 19 | TD_V0: True 20 | TDI_V0: True 21 | TW_V0: True 22 | TWI_V0: True 23 | -------------------------------------------------------------------------------- /targets/power/isa/p-common/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | __all__ = [] 29 | 30 | # Functions 31 | 32 | # Classes 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | __all__ = [] 29 | 30 | # Functions 31 | 32 | # Classes 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/instruction.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/instruction.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/instruction_field.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/instruction_format.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power_v206 15 | Description: Power ISA Version 2.06 16 | Extends: ../p-common 17 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/operand.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/register.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_06/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/branch.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch 16 | Description: Boolean indicating if the instruction is a branch 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/branch_conditional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_conditional 16 | Description: Boolean indicating if the instruction is a branch conditional 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/branch_relative.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_relative 16 | Description: Boolean indicating if the instruction is a relative branch 17 | Default: False -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/disable_asm.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: disable_asm 16 | Description: Boolean indicating if ASM generation is disabled for the instruction. If so, binary codification is used. 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/hypervisor.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: hypervisor 16 | Description: Boolean indicating if the instruction need hypervisor mode 17 | Default: False 18 | Values: 19 | MSGCLR_V0: True 20 | MSGSND_V0: True -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/memory.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: access_storage 16 | Description: Boolean indicating if the instruction has storage operands 17 | Default: False 18 | Values: 19 | LBEPX_V0: True 20 | LHEPX_V0: True 21 | LWEPX_V0: True 22 | LDEPX_V0: True 23 | LQARX_V0: True 24 | LXSIWAX_V0: True 25 | LXSIWZX_V0: True 26 | LXSSPX_V0: True 27 | STBEPX_V0: True 28 | STHEPX_V0: True 29 | STWEPX_V0: True 30 | STDEPX_V0: True 31 | STQCXx_V0: True 32 | STXSIWX_V0: True 33 | STXSSPX_V0: True 34 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/privileged.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: privileged 16 | Description: Boolean indicating if the instruction is privileged 17 | Default: False 18 | Values: 19 | LBEPX_V0: True 20 | LHEPX_V0: True 21 | LWEPX_V0: True 22 | LDEPX_V0: True 23 | STBEPX_V0: True 24 | STHEPX_V0: True 25 | STWEPX_V0: True 26 | STDEPX_V0: True 27 | MSGCLRP_V0: True 28 | MSGSNDP_V0: True 29 | TRECHKPTx_V0: True 30 | TRECLAIMx_V0: True 31 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/instruction_props/unsupported.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: unsupported 16 | Description: Boolean indicating if the instruction is unsupported 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power_v207 15 | Description: Power ISA Version 2.07 16 | Extends: ../p-common 17 | Instruction_format: 18 | YAML: ./instruction_format.yaml 19 | Instruction_field: 20 | YAML: ./instruction_field.yaml 21 | Instruction: 22 | YAML: ./instruction.yaml 23 | Register: 24 | YAML: ./register.yaml 25 | Operand: 26 | YAML: ./operand.yaml 27 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/operand.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: UImm10 15 | Description: Unsigned Immediate (bit size 10) 16 | Min: 0 17 | Max: 1023 18 | Step: 1 19 | Shift: 0 20 | - Name: TAR 21 | Description: Target address register 22 | Register: TAR 23 | - Name: SIX_dw_values 24 | Description: Values for SIX instruction field 25 | Values: 26 | - 0 27 | - 1 28 | - 4 29 | - 5 -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/register.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: TAR 15 | Type: SPR 16 | Representation: '815' 17 | Description: Target Address Register -------------------------------------------------------------------------------- /targets/power/isa/p-v2_07/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/algebraic.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: algebraic 16 | Description: Boolean indicating if operation uses algebraic rules to keep values 17 | Default: False 18 | Values: 19 | LFIWAX_V0: True 20 | LFIWAX_V1: True 21 | LHA_V0: True 22 | LHAU_V0: True 23 | LHAUX_V0: True 24 | LHAX_V0: True 25 | LWA_V0: True 26 | LWAUX_V0: True 27 | LWAX_V0: True 28 | LXSIWAX_V0: True 29 | MTVSRWA_V0: True 30 | SRAD_V0: True 31 | SRADx_V0: True 32 | SRADI_V0: True 33 | SRADIx_V0: True 34 | SRAW_V0: True 35 | SRAWx_V0: True 36 | SRAWI_V0: True 37 | SRAWIx_V0: True 38 | VSRAB_V0: True 39 | VSRAD_V0: True 40 | VSRAH_V0: True 41 | VSRAW_V0: True 42 | 43 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/branch.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch 16 | Description: Boolean indicating if the instruction is a branch 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | B_V0: True 22 | BA_V0: True 23 | BL_V0: True 24 | BLA_V0: True 25 | BC_V0: True 26 | BCA_V0: True 27 | BCL_V0: True 28 | BCLA_V0: True 29 | BCLR_V0: True 30 | BCLRL_V0: True 31 | BCCTR_V0: True 32 | BCCTRL_V0: True 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/branch_conditional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_conditional 16 | Description: Boolean indicating if the instruction is a branch conditional 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | BC_V0: True 22 | BCA_V0: True 23 | BCL_V0: True 24 | BCLA_V0: True 25 | BCLR_V0: True 26 | BCLRL_V0: True 27 | BCCTR_V0: True 28 | BCCTRL_V0: True 29 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/branch_relative.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_relative 16 | Description: Boolean indicating if the instruction is a relative branch 17 | Default: False 18 | Values: 19 | B_V0: True 20 | BL_V0: True 21 | BC_V0: True 22 | BCL_V0: True 23 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/disable_asm.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: disable_asm 16 | Description: Boolean indicating if ASM generation is disabled for the instruction. If so, binary codification is used. 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/hypervisor.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: hypervisor 16 | Description: Boolean indicating if the instruction need hypervisor mode 17 | Default: False 18 | Values: 19 | MSGCLR_V0: True 20 | MSGSND_V0: True 21 | ADDG6S_V0: True 22 | CDTBCD_V0: True 23 | CBCDTD_V0: True 24 | DOZE_V0: True 25 | HRFID_V0: True 26 | LBZCIX_V0: True 27 | LDCIX_V0: True 28 | LHZCIX_V0: True 29 | LWZCIX_V0: True 30 | NAP_V0: True 31 | RVWINKLE_V0: True 32 | SLEEP_V0: True 33 | STBCIX_V0: True 34 | STDCIX_V0: True 35 | STHCIX_V0: True 36 | STWCIX_V0: True 37 | TLBIA_V0: True 38 | TLBIE_V0: True 39 | TLBSYNC_V0: True 40 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/privileged_optional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: privileged_optional 16 | Description: Boolean indicating the instrucion is priviledged or not depending on the input values 17 | Default: False 18 | Values: 19 | MFSPR_V0: True 20 | MTSPR_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/syscall.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: syscall 16 | Description: Boolean indicating if the instruction is a syscall or return from one 17 | Default: False 18 | Values: 19 | SC_V0: True 20 | RFID_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/trap.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: trap 16 | Description: Boolean indicating if the instruction is a trap 17 | Default: False 18 | Values: 19 | TD_V0: True 20 | TDI_V0: True 21 | TW_V0: True 22 | TWI_V0: True 23 | RFEBB_V0: True 24 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/instruction_props/unsupported.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: unsupported 16 | Description: Boolean indicating if the instruction is unsupported 17 | Default: False 18 | Values: 19 | LMW_V0: True 20 | LSWI_V0: True 21 | STHCXx_V0: True 22 | STWCXx_V0: True 23 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power_v300 15 | Description: Power ISA Version 3.00 16 | Extends: ../p-v2_07 17 | Instruction_format: 18 | YAML: ./instruction_format.yaml 19 | Instruction_field: 20 | YAML: ./instruction_field.yaml 21 | Instruction: 22 | YAML: ./instruction.yaml 23 | Override: True 24 | Register: 25 | YAML: ./register.yaml 26 | Operand: 27 | YAML: ./operand.yaml 28 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/operand.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: FC 15 | Description: FC Operand 16 | Values: 17 | - 0 18 | - 1 19 | - 2 20 | - 3 21 | - 4 22 | - 5 23 | - 6 24 | - 7 25 | - 24 26 | - Name: UImm7 27 | Description: Unsigned Immediate (bit size 7) 28 | Min: 0 29 | Max: 127 30 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/register.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_00/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_field.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: "TP" 15 | Description: "TP Field" 16 | Operand: "VSR_regpairs" 17 | Show: True 18 | Size: 4 19 | IO: "O" 20 | - Name: "N" 21 | Description: "N Field" 22 | Operand: "UImm3" 23 | Show: True 24 | Size: 3 25 | IO: "I" 26 | - Name: "MP" 27 | Description: "MP Field" 28 | Operand: "UImm1" 29 | Show: True 30 | Size: 1 31 | IO: "I" 32 | - Name: "AT" 33 | Description: "AT Field" 34 | Operand: "ACC_regs" 35 | Show: True 36 | Size: 3 37 | IO: "IO" 38 | - Name: "AS" 39 | Description: "AS Field" 40 | Operand: "ACC_regs" 41 | Show: True 42 | Size: 3 43 | IO: "IO" 44 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/branch.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch 16 | Description: Boolean indicating if the instruction is a branch 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | B_V0: True 22 | BA_V0: True 23 | BL_V0: True 24 | BLA_V0: True 25 | BC_V0: True 26 | BCA_V0: True 27 | BCL_V0: True 28 | BCLA_V0: True 29 | BCLR_V0: True 30 | BCLRL_V0: True 31 | BCCTR_V0: True 32 | BCCTRL_V0: True 33 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/branch_conditional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_conditional 16 | Description: Boolean indicating if the instruction is a branch conditional 17 | Default: False 18 | Values: 19 | BCTAR_V0: True 20 | BCTARL_V0: True 21 | BC_V0: True 22 | BCA_V0: True 23 | BCL_V0: True 24 | BCLA_V0: True 25 | BCLR_V0: True 26 | BCLRL_V0: True 27 | BCCTR_V0: True 28 | BCCTRL_V0: True 29 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/branch_relative.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_relative 16 | Description: Boolean indicating if the instruction is a relative branch 17 | Default: False 18 | Values: 19 | B_V0: True 20 | BL_V0: True 21 | BC_V0: True 22 | BCL_V0: True 23 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/disable_asm.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: disable_asm 16 | Description: Boolean indicating if ASM generation is disabled for the instruction. If so, binary codification is used. 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/privileged_optional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: privileged_optional 16 | Description: Boolean indicating the instrucion is priviledged or not depending on the input values 17 | Default: False 18 | Values: 19 | MFSPR_V0: True 20 | MTSPR_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/syscall.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: syscall 16 | Description: Boolean indicating if the instruction is a syscall or return from one 17 | Default: False 18 | Values: 19 | SC_V0: True 20 | RFID_V0: True 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/trap.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: trap 16 | Description: Boolean indicating if the instruction is a trap 17 | Default: False 18 | Values: 19 | TD_V0: True 20 | TDI_V0: True 21 | TW_V0: True 22 | TWI_V0: True 23 | RFEBB_V0: True 24 | TDI_V0: True 25 | TDI_V1: True 26 | TD_V0: True 27 | TD_V1: True 28 | TWI_V0: True 29 | TWI_V1: True 30 | TW_V0: True 31 | TW_V1: True 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/instruction_props/unsupported.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: unsupported 16 | Description: Boolean indicating if the instruction is unsupported 17 | Default: False 18 | Values: 19 | LMW_V0: True 20 | LSWI_V0: True 21 | STHCXx_V0: True 22 | STWCXx_V0: True 23 | MSGCLRU_V0: True 24 | MSGSNDU_V0: True 25 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power_v310 15 | Description: Power ISA Version 3.10 16 | Extends: ../p-v3_00 17 | ISA: 18 | Class: POWERISAV310 19 | Module: ./isa.py 20 | Instruction_format: 21 | YAML: ./instruction_format.yaml 22 | Instruction_field: 23 | YAML: ./instruction_field.yaml 24 | Instruction: 25 | Class: POWERInstructionV310 26 | YAML: ./instruction.yaml 27 | Module: ./instruction.py 28 | Override: True 29 | Register: 30 | YAML: ./register.yaml 31 | Operand: 32 | YAML: ./operand.yaml 33 | Inherit: True 34 | Register_type: 35 | YAML: ./register_type.yaml 36 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/register.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | __author__ = "Ramon Bertran" 19 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 20 | __credits__ = [] 21 | __license__ = "IBM (c) 2011-2021 All rights reserved" 22 | __version__ = "0.5" 23 | __maintainer__ = "Ramon Bertran" 24 | __email__ = "rbertra@us.ibm.com" 25 | __status__ = "Development" # "Prototype", "Development", or "Production" 26 | 27 | # Constants 28 | 29 | # Functions 30 | 31 | # Classes 32 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: ACC0 15 | Type: ACC 16 | Representation: '0' 17 | Description: Accumulator Register 0 18 | Repeat: 19 | From: 0 20 | To: 7 21 | -------------------------------------------------------------------------------- /targets/power/isa/p-v3_10/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: ACC 15 | Size: 512 16 | Description: Accumulator Register 17 | VectorArithmetic: True 18 | -------------------------------------------------------------------------------- /targets/power/templates/power_v206-power7-ppc64_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v206-power7-ppc64le_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v207-power8-ppc64_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v207-power8-ppc64le_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v300-power9-ppc64_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v300-power9-ppc64le_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v310-power10-ppc64_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/templates/power_v310-power10-ppc64le_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | power.ldscript -------------------------------------------------------------------------------- /targets/power/tests/tools/bin2objdump_test002.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/bin2objdump_test002.bin -------------------------------------------------------------------------------- /targets/power/tests/tools/mesa2mpt_test001.trace.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/mesa2mpt_test001.trace.gz -------------------------------------------------------------------------------- /targets/power/tests/tools/mesa2mpt_test002.trace.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/mesa2mpt_test002.trace.gz -------------------------------------------------------------------------------- /targets/power/tests/tools/mpt2trace_test001_addresses.txt: -------------------------------------------------------------------------------- 1 | 0x300000 2 | 0x300100-0x300900-0x100 3 | -------------------------------------------------------------------------------- /targets/power/tests/tools/objdump2mpt_test001.dump.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/objdump2mpt_test001.dump.gz -------------------------------------------------------------------------------- /targets/power/tests/tools/objdump2mpt_test_kernel_ppc64.dump.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/objdump2mpt_test_kernel_ppc64.dump.gz -------------------------------------------------------------------------------- /targets/power/tests/tools/objdump2mpt_test_libc_ppc64.dump.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/microprobe/ffb07ec76efe567d0a19249327faa5556a868a7d/targets/power/tests/tools/objdump2mpt_test_libc_ppc64.dump.gz -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | docstring 16 | """ 17 | # Futures 18 | from __future__ import absolute_import 19 | 20 | # Own modules 21 | from microprobe.target.uarch.element import GenericMicroarchitectureElement 22 | 23 | __author__ = "Ramon Bertran" 24 | __copyright__ = "Copyright 2011-2021 IBM Corporation" 25 | __credits__ = [] 26 | __license__ = "IBM (c) 2011-2021 All rights reserved" 27 | __version__ = "0.5" 28 | __maintainer__ = "Ramon Bertran" 29 | __email__ = "rbertra@us.ibm.com" 30 | __status__ = "Development" # "Prototype", "Development", or "Production" 31 | 32 | # Constants 33 | 34 | # Functions 35 | 36 | 37 | # Classes 38 | class PowerMicroarchitectureElement(GenericMicroarchitectureElement): 39 | pass 40 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: Core 15 | Type: Core 16 | Subelements: 17 | - Cache 18 | - Name: Cache 19 | Type: DummyCache 20 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element_type_props/cache_hierarchy.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_next_level 16 | Description: Next cache level 17 | Default: NO_DEFAULT 18 | - Name: cache_size 19 | Description: Cache size in kb 20 | Default: NO_DEFAULT 21 | Values: 22 | DummyCache: 128 23 | - Name: cache_linesize 24 | Description: Cache line size in bytes 25 | Default: NO_DEFAULT 26 | Values: 27 | DummyCache: 256 28 | - Name: cache_ways 29 | Description: Cache ways 30 | Default: NO_DEFAULT 31 | Values: 32 | DummyCache: 8 33 | - Name: cache_address_size 34 | Description: Address size in bits 35 | Default: NO_DEFAULT 36 | Values: 37 | DummyCache: 64 38 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | DummyCache: 1 20 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Values: 19 | DummyCache: True 20 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Values: 19 | DummyCache: True 20 | -------------------------------------------------------------------------------- /targets/power/uarch/p-common/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: pcommon 15 | Description: P common 16 | Microarchitecture: 17 | Class: PowerMicroarchitecture 18 | Module: ./microarchitecture.py 19 | Element: 20 | Class: PowerMicroarchitectureElement 21 | Module: ./element.py 22 | YAML: ./element.yaml 23 | Element_type: 24 | Class: PowerMicroarchitectureElementType 25 | Module: ./element_type.py 26 | YAML: ./element_type.yaml 27 | Instruction_properties: 28 | Path: ./instruction_props 29 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: Processor 15 | Type: Processor 16 | Subelements: 17 | - Core0 18 | - L3 19 | - MEM 20 | - Name: Core0 21 | Type: Core 22 | Subelements: 23 | - L1D 24 | - L1I 25 | - L2 26 | - Name: L3 27 | Type: L3 28 | - Name: MEM 29 | Type: MEM 30 | - Name: L1D 31 | Type: L1D 32 | - Name: L1I 33 | Type: L1I 34 | - Name: L2 35 | Type: L2 36 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/element_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | L3: 3 20 | L2: 2 21 | L1D: 1 22 | L1I: 1 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1D: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1I: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power10 15 | Description: POWER10 microarchitecture 16 | Extends: ../p-common 17 | Element: 18 | YAML: ./element.yaml 19 | Override: True 20 | Element_type: 21 | YAML: ./element_type.yaml 22 | Instruction_properties: 23 | Path: ./instruction_props 24 | Override: True 25 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power10/microarchitecture_props/common.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cores 16 | Description: Number of cores 17 | Value: 30 18 | - Name: smt_modes 19 | Description: Modes of SMT 20 | Value: 21 | - 1 22 | - 2 23 | - 4 24 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power7/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | MEM: 4 20 | L3: 3 21 | L2: 2 22 | L1D: 1 23 | L1I: 1 24 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power7/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Override: True 19 | Values: 20 | MEM: True 21 | L3: True 22 | L2: True 23 | L1D: True 24 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power7/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Override: True 19 | Values: 20 | MEM: True 21 | L3: True 22 | L2: True 23 | L1I: True 24 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power7/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power7 15 | Description: POWER7 microarchitecture 16 | Extends: ../p-common 17 | Element: 18 | YAML: ./element.yaml 19 | Override: True 20 | Element_type: 21 | YAML: ./element_type.yaml 22 | Instruction_properties: 23 | Path: ./instruction_props 24 | Override: True 25 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power7/microarchitecture_props/common.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cores 16 | Description: Number of cores 17 | Value: 8 18 | - Name: smt_modes 19 | Description: Modes of SMT 20 | Value: 21 | - 1 22 | - 2 23 | - 4 -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: Processor 15 | Type: Processor 16 | Subelements: 17 | - Core0 18 | - L3 19 | - MEM 20 | - Name: Core0 21 | Type: Core 22 | Subelements: 23 | - L1D 24 | - L1I 25 | - L2 26 | - Name: L3 27 | Type: L3 28 | - Name: MEM 29 | Type: MEM 30 | - Name: L1D 31 | Type: L1D 32 | - Name: L1I 33 | Type: L1I 34 | - Name: L2 35 | Type: L2 36 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/element_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | L3: 3 20 | L2: 2 21 | L1D: 1 22 | L1I: 1 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1D: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1I: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power8 15 | Description: POWER8 microarchitecture 16 | Extends: ../p-common 17 | Element: 18 | YAML: ./element.yaml 19 | Override: True 20 | Element_type: 21 | YAML: ./element_type.yaml 22 | Instruction_properties: 23 | Path: ./instruction_props 24 | Override: True 25 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power8/microarchitecture_props/common.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cores 16 | Description: Number of cores 17 | Value: 12 18 | - Name: smt_modes 19 | Description: Modes of SMT 20 | Value: 21 | - 1 22 | - 2 23 | - 4 24 | - 8 25 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: Processor 15 | Type: Processor 16 | Subelements: 17 | - Core0 18 | - L3 19 | - MEM 20 | - Name: Core0 21 | Type: Core 22 | Subelements: 23 | - L1D 24 | - L1I 25 | - L2 26 | - Name: L3 27 | Type: L3 28 | - Name: MEM 29 | Type: MEM 30 | - Name: L1D 31 | Type: L1D 32 | - Name: L1I 33 | Type: L1I 34 | - Name: L2 35 | Type: L2 36 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/element_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | L3: 3 20 | L2: 2 21 | L1D: 1 22 | L1I: 1 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1D: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Override: True 19 | Values: 20 | L3: True 21 | L2: True 22 | L1I: True 23 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: power9 15 | Description: POWER9 microarchitecture 16 | Extends: ../p-common 17 | Element: 18 | YAML: ./element.yaml 19 | Override: True 20 | Element_type: 21 | YAML: ./element_type.yaml 22 | Instruction_properties: 23 | Path: ./instruction_props 24 | Override: True 25 | -------------------------------------------------------------------------------- /targets/power/uarch/p-power9/microarchitecture_props/common.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cores 16 | Description: Number of cores 17 | Value: 24 18 | - Name: smt_modes 19 | Description: Modes of SMT 20 | Value: 21 | - 1 22 | - 2 23 | - 4 24 | -------------------------------------------------------------------------------- /targets/power/wrappers/CPSynchStepMultithread.headers: -------------------------------------------------------------------------------- 1 | #define _GNU_SOURCE 2 | #define __USE_GNU 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #define MASK_1S_1 0x00000001ffffff0 20 | #define MASK_1S_2 0xfffffffe0000000 21 | #define MASK_4US_1 0x0000000001ffff0 22 | #define MASK_4US_2 0xfffffffffe00000 23 | 24 | -------------------------------------------------------------------------------- /targets/power/wrappers/CPSynchStepMultithread.start_loop: -------------------------------------------------------------------------------- 1 | if (local_master != 0) { 2 | 3 | /* printf("CPU%d: Master Synchronizing\n", cpu); */ 4 | 5 | *stck=1; 6 | clock = -1; 7 | 8 | while( 9 | (((clock & $SYNCHMASK1$) >> 4 ) != $SYNCHBIAS$) || 10 | ((clock & $SYNCHMASK2$) == clock_ant) 11 | ) 12 | { 13 | clock = __ppc_get_timebase(); 14 | } 15 | 16 | clock_ant = clock & $SYNCHMASK2$; 17 | /* printf("CPU%d: Master wake up at %lx \n", cpu, clock); */ 18 | *stck=0; 19 | 20 | $MASTERSTEPS$ 21 | 22 | $MASTERDELAY$ 23 | 24 | } else { 25 | 26 | /* printf("CPU%d: Slave Synchronizing\n", cpu); */ 27 | 28 | while(*stck!=0){ 29 | __asm("nop"); 30 | __asm("nop"); 31 | __asm("nop"); 32 | } 33 | 34 | /* printf("CPU%d: Slave wake up\n", cpu); */ 35 | 36 | $SLAVESTEPS$ 37 | 38 | } 39 | 40 | $DELAY$ 41 | -------------------------------------------------------------------------------- /targets/riscv/doc/examples.rst: -------------------------------------------------------------------------------- 1 | examples_riscv 2 | -------------------------------------------------------------------------------- /targets/riscv/doc/examples_riscv.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | Examples on RISCV 3 | ================= 4 | 5 | Some examples on RISCV can be found 6 | `here `_ 7 | . 8 | -------------------------------------------------------------------------------- /targets/riscv/examples/.gitignore: -------------------------------------------------------------------------------- 1 | autom4te.cache 2 | build 3 | configure 4 | -------------------------------------------------------------------------------- /targets/riscv/examples/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix := @prefix@ 2 | abs_top_srcdir := @abs_top_srcdir@ 3 | XLEN := @XLEN@ 4 | RISCVTOOLS := @RISCVTOOLS@ 5 | 6 | .PHONY: all clean riscv_ipc 7 | 8 | all: riscv_ipc 9 | 10 | vars = \ 11 | abs_top_srcdir=$(abs_top_srcdir) \ 12 | XLEN=$(XLEN) \ 13 | src_dir=$(abs_top_srcdir)/$@ \ 14 | RISCVTOOLS=$(RISCVTOOLS) 15 | 16 | riscv_ipc: 17 | mkdir -p $@ 18 | $(MAKE) -C $@ -f $(abs_top_srcdir)/$@/Makefile $(vars) 19 | 20 | clean: 21 | $(MAKE) -C riscv_ipc -f $(abs_top_srcdir)/riscv_ipc/Makefile abs_top_srcdir=$(abs_top_srcdir) src_dir=$(abs_top_srcdir)/riscv_ipc clean 22 | -------------------------------------------------------------------------------- /targets/riscv/examples/Makefrag: -------------------------------------------------------------------------------- 1 | XLEN ?= 64 2 | 3 | TARGET ?= riscv$(XLEN)-unknown-elf 4 | CC := $(TARGET)-gcc 5 | LD := $(CC) 6 | 7 | ENV_P = $(RISCVTOOLS)/riscv-tests/env/p 8 | ENV_V = $(RISCVTOOLS)/riscv-tests/env/p 9 | -------------------------------------------------------------------------------- /targets/riscv/examples/configure.ac: -------------------------------------------------------------------------------- 1 | AC_INIT(microprobe-riscv-tests, 1.0) 2 | 3 | cross_compiling=yes 4 | AC_PROG_CC 5 | 6 | AC_ARG_WITH(xlen, 7 | [AS_HELP_STRING([--with-xlen=XLEN], 8 | [Set XLEN, the X-register bit width (default is 64)])], 9 | AC_SUBST(XLEN, $withval), 10 | AC_SUBST(XLEN, 64) 11 | ) 12 | 13 | AC_ARG_WITH(riscvtools, 14 | [AS_HELP_STRING([--with-riscvtools=RISCVTOOLS], 15 | [Set the path to an installation of riscv-tools])], 16 | AC_SUBST(RISCVTOOLS, $withval), 17 | AC_MSG_ERROR("You must specify a path to a riscv-tools repo (--with-riscvtools)", 1) 18 | ) 19 | 20 | AC_OUTPUT( 21 | Makefile 22 | ) 23 | -------------------------------------------------------------------------------- /targets/riscv/examples/riscv_ipc/.gitignore: -------------------------------------------------------------------------------- 1 | *.S 2 | tests.d -------------------------------------------------------------------------------- /targets/riscv/examples/riscv_ipc/Makefile: -------------------------------------------------------------------------------- 1 | include $(abs_top_srcdir)/Makefrag 2 | 3 | src_dir := . 4 | include $(src_dir)/tests.d 5 | 6 | RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- 7 | RISCV_GCC ?= $(RISCV_PREFIX)gcc 8 | 9 | tests_p = $(addprefix riscv_ipc-p-, $(tests)) 10 | tests_v = $(addprefix riscv_ipc-v-, $(tests)) 11 | 12 | CFLAGS ?= \ 13 | -static \ 14 | -mcmodel=medany \ 15 | -fvisibility=hidden \ 16 | -nostdlib \ 17 | -nostartfiles \ 18 | -I$(abs_top_srcdir) \ 19 | -I$(RISCVTOOLS) 20 | 21 | .PHONY: default all clean 22 | 23 | default: all 24 | 25 | all: $(tests_p) $(tests_v) 26 | 27 | vpath %.S $(src_dir) 28 | 29 | riscv_ipc-p-%: %.S 30 | $(RISCV_GCC) $(CFLAGS) -I$(ENV_P) -T$(ENV_P)/link.ld -o $@ $< 31 | 32 | riscv_ipc-v-%: %.S 33 | $(RISCV_GCC) $(CFLAGS) -I$(ENV_V) -T$(ENV_V)/link.ld -o $@ $< 34 | 35 | junk += $(tests_p) $(tests_v) 36 | 37 | clean: 38 | rm -rf $(junk) 39 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/comparator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Constants 19 | 20 | # Functions 21 | 22 | # Classes 23 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/generator.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Constants 19 | 20 | # Functions 21 | 22 | # Classes 23 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_field.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.isa.instruction_field import GenericInstructionField 23 | 24 | # Constants 25 | 26 | # Functions 27 | 28 | 29 | # Classes 30 | class RISCVInstructionField(GenericInstructionField): 31 | """ 32 | RISC-V Instruction Field Class 33 | """ 34 | pass 35 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_format.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.isa.instruction_format import GenericInstructionFormat 23 | 24 | # Constants 25 | 26 | # Functions 27 | 28 | 29 | # Classes 30 | class RISCVInstructionFormat(GenericInstructionFormat): 31 | """ 32 | RISC-V Instruction Format Class 33 | """ 34 | pass 35 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/branch.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch 16 | Description: Boolean indicating if the instruction is a branch 17 | Default: False 18 | Values: 19 | BEQ_V0: True 20 | BGEU_V0: True 21 | BGE_V0: True 22 | BLTU_V0: True 23 | BLT_V0: True 24 | BNE_V0: True 25 | JALR_V0: True 26 | JAL_V0: True 27 | C.J_V0: True 28 | C.JAL_V0: True 29 | C.JR_V0: True 30 | C.JALR_V0: True 31 | C.BEQZ_V0: True 32 | C.BNEZ_V0: True 33 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/branch_conditional.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_conditional 16 | Description: Boolean indicating if the instruction is a branch confitional 17 | Default: False 18 | Values: 19 | BEQ_V0: True 20 | BGEU_V0: True 21 | BGE_V0: True 22 | BLTU_V0: True 23 | BLT_V0: True 24 | BNE_V0: True 25 | C.BEQZ_V0: True 26 | C.BNEZ_V0: True 27 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/branch_relative.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: branch_relative 16 | Description: Boolean indicating if the instruction is a relative branch 17 | Default: False 18 | Values: 19 | BEQ_V0: True 20 | BGEU_V0: True 21 | BGE_V0: True 22 | BLTU_V0: True 23 | BLT_V0: True 24 | BNE_V0: True 25 | JAL_V0: True 26 | C.J_V0: True 27 | C.JAL_V0: True 28 | C.BEQZ_V0: True 29 | C.BNEZ_V0: True 30 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/decimal.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: decimal 16 | Description: Boolean indication if the instruction requires inputs in decimal format 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/disable_asm.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: disable_asm 16 | Description: Boolean indicating if ASM generation is disabled for the instruction. If so, binary codification is used 17 | Default: False 18 | Values: 19 | CUSTOM0_V0: True 20 | CUSTOM1_V0: True 21 | CUSTOM2_V0: True 22 | CUSTOM3_V0: True 23 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/memory_with_update.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: access_storage_with_update 16 | Description: Boolean indicating if the instruction accesses to storage and updates the source register with the generated address 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/priviledged.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: priviledged 16 | Description: Boolean indicating if the instruction is privileged 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/switching.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: switching 16 | Description: Input values required to maximize the computational switching 17 | Default: None 18 | Values: 19 | ADDI_V0: [[ None, 1, 0x3FFFFFFFFFFFFFFF ], 20 | [ None, -1, 0x0000000000000000 ]] 21 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/instruction_props/unsupported.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: unsupported 16 | Description: Boolean indicating if the instruction is unsupported 17 | Default: False 18 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/operand.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Constants 19 | 20 | # Functions 21 | 22 | # Classes 23 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/register.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.isa.register import GenericRegister 23 | 24 | # Constants 25 | 26 | # Functions 27 | 28 | 29 | # Classes 30 | class RISCVRegister(GenericRegister): 31 | """ 32 | RISC-V Architecture Register Class 33 | """ 34 | pass 35 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/register.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: X0 15 | Type: ireg 16 | Representation: 'x0' 17 | Codification: '0' 18 | Description: General Purpose Register 0 19 | Repeat: 20 | From: 0 21 | To: 31 22 | - Name: F0 23 | Type: freg 24 | Representation: 'f0' 25 | Codification: '0' 26 | Description: Floating Point Register 0 27 | Repeat: 28 | From: 0 29 | To: 31 30 | - Name: PC 31 | Type: SPR 32 | Representation: 'N/A' 33 | Description: Program Counter register 34 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/register_type.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | Docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.isa.register_type import GenericRegisterType 23 | 24 | # Constants 25 | 26 | # Functions 27 | 28 | 29 | # Classes 30 | class RISCVRegisterType(GenericRegisterType): 31 | """ 32 | RISC-V Architecture Register Type Class 33 | """ 34 | pass 35 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-common/register_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: ireg 15 | Size: 64 16 | Description: General Purpose Register 64 bits 17 | AddressArithmetic: True 18 | - Name: freg 19 | Size: 64 20 | Description: Floating Point Register 64 bits 21 | FloatArithmetic: True 22 | - Name: SPR 23 | Size: 64 24 | Description: Special Purpose Register (64 bits) 25 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-v2_2/instruction.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | -------------------------------------------------------------------------------- /targets/riscv/isa/riscv-v2_2/isa.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: riscv_v22 15 | Description: RISC-V v2.2 16 | Extends: ../riscv-common 17 | Instruction: 18 | YAML: ./instruction.yaml 19 | -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_eprocessor_sim.ldscript: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_linux_gcc.ldscript: -------------------------------------------------------------------------------- 1 | riscv.ldscript -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_riscy_sim.ldscript: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_sargantana_sim.ldscript: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | } 4 | -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_spike_sim.ldscript: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | .text.trap_handler 0x10000 : { *(.text.trap_handler) } 4 | .tohost 0x11000 : { *(.tohost) } 5 | } 6 | -------------------------------------------------------------------------------- /targets/riscv/templates/riscv_v22-riscv_generic-riscv64_spike_sim_routines.s: -------------------------------------------------------------------------------- 1 | .section .text.trap_handler 2 | .option norvc 3 | la x1, tohost 4 | li x2, 3 # fail 5 | sw x2, 0(x1) 6 | 7 | .section .tohost 8 | .globl tohost 9 | tohost: .quad 0 10 | .globl fromhost 11 | fromhost: .quad 0 12 | .globl itercount 13 | itercount: .quad 0 -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.uarch.element import GenericMicroarchitectureElement 23 | 24 | # Constants 25 | 26 | # functions 27 | 28 | # Classes 29 | 30 | 31 | class RISCVMicroarchitectureElement(GenericMicroarchitectureElement): 32 | pass 33 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: Core 15 | Type: Core 16 | Subelements: 17 | - Cache 18 | - Name: Cache 19 | Type: DummyCache 20 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.uarch.element_type import \ 23 | GenericMicroarchitectureElementType 24 | 25 | # Constants 26 | 27 | # functions 28 | 29 | # Classes 30 | 31 | 32 | class RISCVMicroarchitectureElementType(GenericMicroarchitectureElementType): 33 | pass 34 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | - Name: DummyCache 15 | Description: DummyCache used when the cache hierarchy is not fully defined 16 | - Name: Processor 17 | Description: Compute processor 18 | - Name: Core 19 | Description: Computing core 20 | - Name: MEM 21 | Description: Main memory 22 | - Name: L3 23 | Description: L3 Cache 24 | - Name: L2 25 | Description: L2 Cache 26 | - Name: L1D 27 | Description: L1 Data Cache 28 | - Name: L1I 29 | Description: L1 Instruction Cache 30 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type_props/cache_hierarchy.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_next_level 16 | Description: Next cache level 17 | Default: NO_DEFAULT 18 | - Name: cache_size 19 | Description: Cache size in kb 20 | Default: NO_DEFAULT 21 | Values: 22 | DummyCache: 128 23 | - Name: cache_linesize 24 | Description: Cache line size in bytes 25 | Default: NO_DEFAULT 26 | Values: 27 | DummyCache: 256 28 | - Name: cache_ways 29 | Description: Cache ways 30 | Default: NO_DEFAULT 31 | Values: 32 | DummyCache: 8 33 | - Name: cache_address_size 34 | Description: Address size in bits 35 | Default: NO_DEFAULT 36 | Values: 37 | DummyCache: 64 38 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type_props/cache_level.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: cache_level 16 | Description: Integer indicating that element level in the cache hierarchy 17 | Default: NO_DEFAULT 18 | Values: 19 | DummyCache: 1 20 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type_props/data_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: data_cache 16 | Description: Boolean indicating that the element is a data cache 17 | Default: False 18 | Values: 19 | DummyCache: True 20 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/element_type_props/instruction_cache.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | --- 15 | - Name: instruction_cache 16 | Description: Boolean indicating that the element is a instruction cache 17 | Default: False 18 | Values: 19 | DummyCache: True 20 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/microarchitecture.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | """ 15 | docstring 16 | """ 17 | 18 | # Futures 19 | from __future__ import absolute_import 20 | 21 | # Own modules 22 | from microprobe.target.uarch import GenericCPUMicroarchitecture 23 | 24 | # Constants 25 | 26 | # functions 27 | 28 | # Classes 29 | 30 | 31 | class RISCVMicroarchitecture(GenericCPUMicroarchitecture): 32 | pass 33 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-common/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: riscv-common 15 | Description: RISC-V common 16 | Microarchitecture: 17 | Class: RISCVMicroarchitecture 18 | Module: ./microarchitecture.py 19 | Element: 20 | Class: RISCVMicroarchitectureElement 21 | Module: ./element.py 22 | YAML: ./element.yaml 23 | Element_type: 24 | Class: RISCVMicroarchitectureElementType 25 | Module: ./element_type.py 26 | YAML: ./element_type.yaml 27 | Instruction_properties: 28 | Path: ./instruction_props 29 | -------------------------------------------------------------------------------- /targets/riscv/uarch/riscv-generic/microarchitecture.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2011-2021 IBM Corporation 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | Name: riscv_generic 15 | Description: Generic RISC-V microarchitecture 16 | Extends: ../riscv-common 17 | --------------------------------------------------------------------------------