{"id":13649375,"url":"https://github.com/openrisc/mor1kx","last_synced_at":"2025-04-22T14:31:32.979Z","repository":{"id":4356248,"uuid":"5492471","full_name":"openrisc/mor1kx","owner":"openrisc","description":"mor1kx - an OpenRISC 1000 processor IP core","archived":false,"fork":false,"pushed_at":"2025-03-29T07:25:44.000Z","size":2913,"stargazers_count":525,"open_issues_count":37,"forks_count":150,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-03-29T08:24:49.748Z","etag":null,"topics":["openrisc","verilog"],"latest_commit_sha":null,"homepage":"","language":"Verilog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openrisc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-21T08:45:53.000Z","updated_at":"2025-03-29T07:25:48.000Z","dependencies_parsed_at":"2022-09-20T23:03:47.832Z","dependency_job_id":"b41fa172-4a19-481a-9be0-8ef6ed05ef80","html_url":"https://github.com/openrisc/mor1kx","commit_stats":{"total_commits":743,"total_committers":24,"mean_commits":"30.958333333333332","dds":0.4279946164199192,"last_synced_commit":"4cebbb684bba8f9fe74f9b69e679796d4fd4a35b"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrisc%2Fmor1kx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrisc%2Fmor1kx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrisc%2Fmor1kx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openrisc%2Fmor1kx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openrisc","download_url":"https://codeload.github.com/openrisc/mor1kx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250258976,"owners_count":21401017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openrisc","verilog"],"created_at":"2024-08-02T01:04:58.483Z","updated_at":"2025-04-22T14:31:27.966Z","avatar_url":"https://github.com/openrisc.png","language":"Verilog","funding_links":[],"categories":["Verilog"],"sub_categories":[],"readme":"# *mor1kx* - an OpenRISC processor IP core\n\n## The Basics\n\nThis repository contains an OpenRISC 1000 compliant processor IP core.\n\nIt is written in Verilog HDL.\n\nThis repository only contains the IP source code and some documentation. For\na verification environment, please see other projects.\n\n## Documentation\n\nThe documentation is located in the [doc/](doc/) directory.\n\nIt is in asciidoc format, and there's a makefile to build HTML or PDF documentation. To\nbuild the HTML documentation, run the following in the [doc/](doc/) directory:\n\n```\n  $ make html\n```\n\n## License\n\nThis project is licensed under the CERN Open Hardware Licence Version 2 - Weakly Reciprocal (CERN-OHL-W). For\ndetails please see the [LICENSE](./LICENSE) file or https:/cern.ch/cern-ohl\n\nSPDX-License-Identifier: CERN-OHL-W-2.0\n\nhttps://spdx.org/licenses/CERN-OHL-W-2.0.html\n\n## Configuration\n\nThe mor1kx CPU is very configurable to allow you to customize the core to your\nexact needs. The following tables explain how each parameter can be configured,\nwhat the configuration does and why you might want to use it.\n\n**Note:** *The **Usage?** field below indicates if a certain application (such\nas running Linux) requires a setting different than the default value.*\n\n### Basic parameters\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|OPTION_OPERAND_WIDTH|Specify the CPU data and address widths|32|32, 64, etc| |\n|OPTION_CPU0|Specify the CPU pipeline core|`CAPPUCCINO`|`CAPPUCCINO` `ESPRESSO` `PRONTO_ESPRESSO`|`CAPPUCCINO` for Linux|\n|OPTION_RESET_PC|Specify the program counter upon reset|`0x100`|n| |\n\n### Caching parameters\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_DATACACHE|Enable memory access data caching|`NONE`|`ENABLED` `NONE`| |\n|OPTION_DCACHE_BLOCK_WIDTH|Specify the address width of a cache block|5|`n`| |\n|OPTION_DCACHE_SET_WIDTH|Specify the set address width|9|`n`| |\n|OPTION_DCACHE_WAYS|Specify the number of blocks per set|2|`n`| |\n|OPTION_DCACHE_LIMIT_WIDTH|Specify the maximum address width|32|`n`|`31` for Linux to allow uncached device access|\n|OPTION_DCACHE_SNOOP|Enable bus snooping for cache coherency|`NONE`|`ENABLED` `NONE`|Linux SMP|\n|FEATURE_INSTRUCTIONCACHE|Enable memory access instruction caching|`NONE`|`ENABLED` `NONE`| |\n|OPTION_ICACHE_BLOCK_WIDTH|Specify the address width of a cache block|5|`n`| |\n|OPTION_ICACHE_SET_WIDTH|Specify the set address width|9|`n`| |\n|OPTION_ICACHE_WAYS|Specify the number of blocks per set|2|`n`| |\n|OPTION_ICACHE_LIMIT_WIDTH|Specify the maximum address width|32|`n`| |\n\n### Memory Management Unit (MMU) parameters\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_DMMU|Enable the data bus MMU|`NONE`|`ENABLED` `NONE`|Linux expects `ENABLED`|\n|FEATURE_DMMU_HW_TLB_RELOAD|Enable hardware TLB reload|`NONE`|`ENABLED` `NONE`|Linux expects `NONE`|\n|OPTION_DMMU_SET_WIDTH|Specify the set address width|6|`n`| |\n|OPTION_DMMU_WAYS|Specify the number of ways per set|1|`n`| |\n|FEATURE_IMMU|Enable the instruction bus MMU|`NONE`|`ENABLED` `NONE`|Linux expects `ENABLED`|\n|FEATURE_IMMU_HW_TLB_RELOAD|Enable hardware TLB reload|`NONE`|`ENABLED` `NONE`|Linux expects `NONE`|\n|OPTION_IMMU_SET_WIDTH|Specify the set address width|6|`n`| |\n|OPTION_IMMU_WAYS|Specify the number of ways per set|1|`n`| |\n\n### System bus parameters\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_STORE_BUFFER|Enable the load store unit store buffer|`ENABLED`|`ENABLED` `NONE`|Large footprint|\n|OPTION_STORE_BUFFER_DEPTH_WIDTH|Specify the load store unit store buffer depth|8|1-n| |\n|BUS_IF_TYPE|Specify the bus interface type|`WISHBONE32`|`WISHBONE32`| |\n|IBUS_WB_TYPE|Specify the Instruction bus interface type option|`B3_READ_BURSTING`|`B3_READ_BURSTING` `B3_REGISTERED_FEEDBACK` `CLASSIC`| |\n|DBUS_WB_TYPE|Specify the Data bus interface type option|`CLASSIC`|`B3_READ_BURSTING` `B3_REGISTERED_FEEDBACK` `CLASSIC`| |\n\n### Hardware unit configuration parameters\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_TRACEPORT_EXEC|Enable the traceport hardware interface|`NONE`|`ENABLED` `NONE`|Verilator|\n|FEATURE_DEBUGUNIT|Enable hardware breakpoints and advanced debug unit interface|`NONE`|`ENABLED` `NONE`|OpenOCD|\n|FEATURE_PERFCOUNTERS|Enable the performance counters unit|`NONE`|`ENABLED` `NONE`| |\n|OPTION_PERFCOUNTERS_NUM|Specify the number of performance counters to generate|0|n| |\n|FEATURE_TIMER|Enable the internal OpenRISC timer|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_PIC|Enable the internal OpenRISC PIC|`ENABLED`|`ENABLED` `NONE`| |\n|OPTION_PIC_TRIGGER|Specify the PIC trigger mode|`LEVEL`|`LEVEL` `EDGE` `LATCHED_LEVEL`| |\n|OPTION_PIC_NMI_WIDTH|Specify non maskable interrupts width, starting at 0, these interrupts will not be reset or maskable|0|0-32| |\n|OPTION_RF_CLEAR_ON_INIT|Enable clearing all registers on initialization|0|0, 1| |\n|OPTION_RF_NUM_SHADOW_GPR|Specify the number of shadow register files|0|0-16|Set `\u003e=1` for Linux SMP|\n|OPTION_RF_ADDR_WIDTH|Specify the address width of the register file|5|5| |\n|OPTION_RF_WORDS|Specify the number of registers in the register file|32|32| |\n|FEATURE_FASTCONTEXTS|Enable fast context switching of register sets|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_MULTICORE|Enable the `coreid` and `numcores` SPR registers|`NONE`|`ENABLED` `NONE`|Linux SMP|\n|FEATURE_FPU|Enable the FPU, for cappuccino pipeline only|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_BRANCH_PREDICTOR|Select the branch predictor implementation|`SIMPLE`|`SIMPLE` `GSHARE` `SAT_COUNTER`| |\n\n**Note:** *C/C++ float to integer conversion assumes truncation (rounding `toward zero`).\n`lf.ftoi.s` instruction performes such rouning regardless of `rounding mode` bits of FPCSR.\nAll other floating point instructions always perform rounding in according with\n`rounding mode` bits of FPCSR.*\n\n### Exception handling options\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_DSX|Enable setting the `SR[DSX]` flag when raising exceptions in a delay slot|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_RANGE|Enable checking and raising range exceptions|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_OVERFLOW|Enable checking and raising overflow exceptions|`ENABLED`|`ENABLED` `NONE`| |\n\n### ALU configuration options\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_MULTIPLIER|Specify the multiplier implementation|`THREESTAGE`|`THREESTAGE` `PIPELINED` `SERIAL` `SIMULATION` `NONE`| |\n|FEATURE_DIVIDER|Specify the divider implementation|`SERIAL`|`SERIAL` `SIMULATION` `NONE`| |\n|OPTION_SHIFTER|Specify the shifter implementation|`BARREL`|`BARREL` `SERIAL`| |\n|FEATURE_CARRY_FLAG|Enable checking and setting the carry flag|`ENABLED`|`ENABLED` `NONE`| |\n\n### Instruction enabling options\n\n|Parameter|Description|Default|Values|Usage?|\n|---------|-----------|-------|------|------|\n|FEATURE_MAC|Enable the `l.mac*` multiply accumulate instructions|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_SYSCALL|Enable the 'l.sys` OS syscall instruction|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_TRAP|Enable the `l.trap` instruction|`ENABLED`|`ENABLED` `NONE`|GDB|\n|FEATURE_ADDC|Enable the `l.addc` add with `carry` flag instruction|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_SRA|Enable the `l.sra` shirt right arithmetic instruction|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_ROR|Enable the `l.ror*` rotate right instructions|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_EXT|Enable the `l.ext*` sign extend instructions|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CMOV|Enable the `l.cmov` conditional move instruction|`ENABLED`|`ENABLED` `NONE`| |\n|FEATURE_FFL1|Enable the `l.f[fl]1` find first/last set bit instructions|`ENABLED`|`ENABLED` `NONE`|Linux|\n|FEATURE_ATOMIC|Enable the `l.lwa` and `l.swa` atomic instructions|`ENABLED`|`ENABLED` `NONE`|Linux SMP|\n|FEATURE_CUST1|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST2|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST3|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST4|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST5|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST6|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST7|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n|FEATURE_CUST8|Enable the `l.cust*` custom instruction|`NONE`|`ENABLED` `NONE`| |\n\n## Testing and Continuous Integration\n\nA CPU core cannot be trusted without a full set of verification testing.  The `mor1kx`\npipelines are constantly verified for correctness with the or1k Continuous\nIntegration (CI) suite.  This currently covers:\n\n - source linting - a `verilator --lint-only` check is run on each commit to\n   ensure there are no code quality issues.\n - [or1k-tests](https://github.com/openrisc/or1k-tests) - the `or1k-tests` test suite\n   is run against each pipeline to check most major instructions, exception handling,\n   caching, timers, interrupts and other features.\n - mor1kx formal - `formal-verification` tests are run on the cappuccino pipeline to confirm the processor doesn't\n   encounter undesirable states and identify unseen bugs.\n\n   Status: ![Build Status](https://github.com/openrisc/mor1kx/actions/workflows/ci.yml/badge.svg)\n\nWe would also like to add the following tests to our continuous integration\nsuite, if you would like to volunteer please reach out:\n\n  - softfloat, fpu verification (may not be feasable in CI due to long run times)\n  - CPU pipeline debugging verification via GDB/OpenOCD\n  - Resource utilization regression with yosys synth_intel synth_xilinx\n  - Formal verification of ESPRESSO and PRONTO ESPRESSO using yosys-formal.\n  - Verification that each revision can boot differnt OS's **Linux**, **RTMES**\n  - Golden reference `or1ksim` trace comparisons vs verilog model using constrained\n    random inputs.\n\nVerification status of mor1kx pipelines:\n\n|Pipeline|Testing Support|Comments|\n|--------|---------------|--------|\n|`CAPPUCCINO`|`Linting` `or1k-tests` `formal-verification` |All supported tests passing|\n|`ESPRESSO`|`linting` `or1k-tests` |Still many pipeline failures, see issue #71|\n|`PRONTO_ESPRESSO`|`linting`|No toolchain support for no-delayslot c code|\n|`MAROCCHINO`|`linting` `or1k-tests`|See [marocchino](https://github.com/openrisc/or1k_marocchino) project.|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrisc%2Fmor1kx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenrisc%2Fmor1kx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenrisc%2Fmor1kx/lists"}