Write RISC-V code and watch it run on a real pipeline
OrchidCore is a 5-stage RV32I processor written in Verilog. Your program runs through its actual hardware, cycle by cycle, so you see exactly where the time goes: stalls, flushes, forwarding and branch prediction.
Core-DSE (Design Space Exploration) studies how software choices interact with a particular hardware design, using cycle-accurate models of real systems. OrchidCore is its first design: . Schools and companies: .
Your code ()
Signals
Register file
Data memory
OrchidCore
OrchidCore is a 32-bit RISC-V core implementing the RV32I base integer instruction set, with a 5-stage pipeline (fetch, decode, execute, memory and write back) and two separate memories, one for instructions and one for data. Each memory holds 4KB and both start at address 0.
It runs every RV32I computational instruction, loads and stores of
bytes, halfwords and words, all branches and jumps, and
lui/auipc. It has no multiply or divide
instructions (no M extension), and fence,
ecall, ebreak and the CSR instructions are
not supported: the core treats them as illegal instructions (see
below).
Both memories are synchronous: the instruction memory returns a word the cycle after the PC asks for it, and the data memory answers within the memory stage. So every instruction, loads and stores included, takes 5 clock cycles from fetch to write back, one per stage, and the value it writes is in the register file from the next cycle. An instruction in decode reads a register written back in that same cycle, so it already gets the new value.
OrchidCore ships as three selectable variants: V1, V2 and V3, picked from the CPU selector in the Simulator toolbar. Same instruction set and 5-stage pipeline throughout; what differs is how each one handles data and branch hazards:
- OrchidCore V1: no forwarding network. An instruction that needs a register still being computed by an instruction ahead of it waits in decode until that value is written back: 2 cycles when the producer is the instruction right before it, 1 cycle when it is two instructions before, none from three instructions on. Loads behave the same way. Branches are predicted not taken.
- OrchidCore V2: adds a forwarding (bypass) network that feeds the ALU inputs straight from the EX/MEM and MEM/WB registers, so an ALU result reaches the very next instruction with no wait. Only a load is too late: using its value in the instruction right after it (as an operand, as store data, as an address or in a branch) stalls 1 cycle. Branches are predicted not taken, same as V1.
-
OrchidCore V3: same forwarding and load-use
handling as V2, plus a Branch Target Buffer (BTB) of 128 entries.
Each entry remembers one branch or jump (picked by bits 8 to 2 of its
address, the rest of the address kept as a tag) with its target and
a 2-bit saturating counter. When the PC hits an entry whose counter
says taken, fetch goes straight to the stored target. A branch seen
for the first time is predicted not taken, one taken outcome is
enough to predict it taken, and once it has been taken twice in a
row it takes two not-taken outcomes to change its mind. Jumps go
through the BTB too; for
jalr(ret) the stored target is the last one, so returning to a different caller is a misprediction.
On all three, branches and jumps are resolved in Execute. When the prediction was wrong (on V1/V2 that means every taken branch and every jump), the PC is redirected to the right address and the two instructions fetched behind it on the wrong path are squashed into bubbles (nop), which costs 2 clock cycles:
- The one in Decode, about to enter Execute.
- The one just back from instruction memory, about to enter Decode.
On V3 a correctly predicted branch costs nothing, taken or not, which is where it pulls ahead of V1/V2 on branch-heavy code. A branch whose outcome alternates (taken, not taken, taken, ...) is the case a 2-bit counter always gets wrong.
The above execution cycle costs are important to analyse the simulation result and to have a hint on how to optimize the code passed to the simulator.
Also note that an illegal instruction (one the core doesn't support, see above) is never executed: the simulation stops as soon as it reaches Execute, and the results show the execution up to that point, with the instruction's address.
OrchidCore Simulator
The OrchidCore simulator interacts with the actual OrchidCore core,
enabling the use of C/assembly. The code is compiled, linked and
dumped using the GNU riscv64-unknown-elf toolchain (using -march=rv32i, no
standard library and no OS).
For assembly, the use of GCC enables support for the full real
syntax: labels, branches/jumps to labels, comments (#),
pseudo-instructions (li, j,
mv, ...), and .data/.text
declarations for globals.
Please note: sections other than text, data,
rodata and bss will be ignored by the
linker.
For C lovers, you can choose the optimization level (-O0
through -O3, -Os) from the toolbar (higher
levels produce fewer, more efficient instructions). It's a good way
to see the same C code execute very differently on the pipeline.
Programs are bare-metal: read and write memory-mapped addresses
through pointers.
For both languages, the startup function is main. A
shared startup routine sets up the stack, calls into
main, and signals the pipeline to stop once it
returns. The stack pointer starts at the top of data memory
(0x1000). The stop is signaled by writing to the halt
address = 0xFFFFFFF0 (-16).
Both data and instruction memory have 4KB of space, and execution is limited by a 50,000-cycle cap (it's enough to target a specific behaviour ^^).
Reading the signal tags
Each signal card in the Signals panel carries a small tag saying where its value comes from:
- reg: the output of a pipeline register (IF/ID, ID/EX, EX/MEM or MEM/WB). The value is held for the whole clock cycle and is what the next stage works from.
- comb: computed by combinational logic in this cycle from registered values. It can change within the cycle as its inputs settle, and is not stored.
- ctrl: a control decision from the pipeline controller (stall or flush), taken this cycle to steer the registers.
fa and fb are comb and
matter most: they are the forwarding unit's selects, and they
override the value read in decode for each EX operand. Read them to
see where the ALU inputs actually came from.
Each challenge is a small program that works but wastes cycles. Make it faster without breaking it: it runs on the real core with fresh random inputs every time. Pick a core to start.
Hint
For every account, after the 7-day trial too.
- OrchidCore V1 in the Simulator
- Every V1 challenge
- V1, V2 and V3 in the Simulator
- Every challenge, on all three cores
Up to 15 student accounts. For more students, we send you a quote.
- Everything in Individual, for each student
- An admin page for the teacher to follow students' challenge progress
- Progress reports to download
Your own deployment of OrchidCore, reachable only by your members, to fit your security rules. The price depends on the setup: write to us to discuss it.
Individuals and schools: send a request below. We answer by email and arrange the payment with you; the site never asks for card details.
Another question? Write to us from the page.
Members of . Approve/reject a pending request, or disable an already-approved account.
Challenge progress
Each member's stars and best cycle counts, from runs checked by the server. Open a member to see every level.
1. Data controller
The data controller is the individual operating this site on their own behalf (no company or commercial structure) under the project name Core-DSE. OrchidCore is a paid service, see the for how activation and payment work. To exercise your rights, or for any question about your data, use the form (available once logged in) rather than an email address published directly on this page.
2. Data collected
Only what the service actually needs to run:
- Account created by an administrator: email address (or a login identifier, if no real address is given), display name, access validity dates, and optional membership in an organization (school/company).
- Self-service sign-up: username, email address, password (encrypted by Keycloak, never stored in plain text).
- Google or GitHub sign-in: only the email address and display name returned by that provider and no other profile information (no photo, no contact list, etc.) is requested or kept.
- IP address: used temporarily, in memory only (never written to the database), to limit abusive login/sign-up attempts, and in the server's technical logs for operational security.
- Code submitted to the simulator: processed to produce a simulation result (waveforms, register/memory dumps), kept briefly and then automatically deleted after a short delay (on the order of an hour).
- Challenges: your progress on each level (stars, best cycle count, number of attempts, and the dates of your first success, best result and last attempt), the code of your best solution, and the code you're currently working on (your draft).
- Subscription requests: what you fill in on the Subscribe page (name, organization, number of accounts, notes), linked to the account you send it from and its email address, which is where we answer.
- Contact messages: the subject and message you send from the Contact page, kept on the server with your account's email address and display name so we can answer you, including any payment reference you choose to mention to help us match your payment to your account.
No payment card data is ever collected or processed by the application itself: payment is arranged directly with the operator when you get in touch, outside the app. Never include a full card number or other sensitive payment credentials in a Contact message it's a plain message form, not a secure payment page. No precise geolocation and no advertising profile are collected either.
3. Purpose and legal basis
This data is used exclusively to create and secure your account, authenticate you, run the simulator and the challenges, keep your challenge progress, report that progress to your organization if your account belongs to one (see section 4), answer subscription requests and contact messages, and prevent abuse (rate-limiting login attempts and subscription requests). The legal basis is performance of the service you or your organization requested (GDPR Article 6.1.b) and, for abuse prevention, legitimate interest (Article 6.1.f).
4. Recipients
Your data is never sold or shared for commercial purposes. It only passes through the technical providers strictly needed to run the service: the server's hosting provider, and, only if you choose to sign in that way, Google or GitHub, during the sign-in exchange you yourself initiate.
If your account belongs to an organization (a school, a university, a company), the administrator it designates, for example your teacher, can see the challenge progress of its members, including yours: for each level, your stars, best cycle count, number of attempts and dates. They can also download it as a report. They don't see the code you write. The operator of the site can see the same information for every account, to run the service.
5. Retention period
Account data, including challenge progress and the code kept with it, is kept for as long as the account exists, and deleted with the account (on request, see section 7). Simulation results are automatically deleted after about an hour. Subscription requests and contact messages are kept as long as needed to answer and follow up on them, and at most 3 years after our last exchange, even if the account is deleted in the meantime. Server technical logs are kept for a limited period for security purposes, then purged automatically.
6. Cookies and local storage
This site uses no cookies, no advertising tracking, and no third-party analytics tool. Your browser only keeps, in its own local storage (sessionStorage/localStorage), your login session (cleared when the tab closes) and a few display preferences (whether the sidebar is collapsed, whether you've already seen this notice, and which results view you last picked). Your challenge progress is kept on the server with your account, not in your browser. None of it is sent to any third party or used to track you across sites.
7. Your rights
Under the GDPR, you have the right to access, rectify, erase, restrict, object to, and port your data. To exercise any of these rights, use the form. You also have the right to lodge a complaint with the competent data protection authority.
8. Security
Passwords are managed and encrypted by Keycloak, an open-source authentication server; the application never stores them in plain text. Connections to the site are encrypted (HTTPS). Administrative access to the server is protected and limited to the technical operator.
1. Purpose
These Terms of Use govern access to and use of OrchidCore, an online RISC-V processor pipeline simulator, published by an individual under the project name Core-DSE. OrchidCore is a paid service. Using the service means you accept these Terms in full.
2. Access to the service
Using the simulator requires an account, created with Google or GitHub, each provider confirms you control the email address used to sign up. A new account is active immediately with a free 7-day trial of the whole service. OrchidCore V1, in the Simulator and in the challenges, stays free for every account afterwards; once the trial ends, using V2 and V3 requires a paid subscription, requested from the page. An account can also be created directly by an administrator, for example for an organization with its own arrangement, in which case its access period is set directly. Schools and universities can request accounts for their students from the page; companies get in touch through the form.
3. Pricing and payment
An individual subscription costs €9.99 per month or €79 per year, as shown on the page. For schools and universities, it costs €49 per year for up to 15 student accounts; for more accounts, the price is set by a quote. For companies, which can have their own deployment of the service, the price is agreed with us depending on the setup. The price that applies is the one in force when you send your request; a later change never affects a period you have already paid. Payment itself is arranged directly with the operator at that point; the app does not take card payments or process payment data itself, so never include a full card number or other sensitive payment credentials in a Contact message. Your account is activated once payment is confirmed.
4. Refunds
If you change your mind, you're entitled to a full refund within 14 days of your paid access starting, as long as you haven't used V2 or V3 (in the Simulator or the challenges) during the trial or the paid period. Using V1, which is free, doesn't count. To request one, use the form. Outside that window, or once the account has been used, payments are non-refundable, except where applicable law says otherwise.
5. User account
You're responsible for keeping your password confidential and for any activity carried out from your account. Only one active session is allowed per account: signing in again from a new device automatically closes the previous session. Report any fraudulent use without delay via the form.
6. Use of the service
It's forbidden to use it to submit code intended to harm the infrastructure, to attempt to circumvent platform limits (number of simulations, run duration), or for any activity contrary to your own country's law.
7. Intellectual property
The code, the OrchidCore processor architecture, and the site's content remain the property of Core-DSE or their respective authors. Source code you submit to the simulator remains yours; it's processed only to produce the requested simulation result, and is never reused or shared otherwise. For the challenges, the code of your best solution and your current draft are kept with your progress, so you find them again from any device; they aren't shown to your organization's administrator, and aren't reused or shared otherwise.
8. Challenges
Challenge results (correctness, cycle counts, stars) are computed and recorded by the server, on inputs it chooses for each run, so they reflect what your code actually does on the core. If your account belongs to an organization, its designated administrator can see your progress, as described in the . Trying to obtain results other than by solving the challenges, for example by attacking or misusing the platform, is forbidden: the progress obtained that way may be reset, and the account disabled.
9. Service commitment, availability, and liability
We commit that the simulator behaves as described on the page, its pipeline architecture, timing, and the cycle-level behavior documented there. Beyond that commitment, the service is otherwise provided "as is," with no guarantee of continuous availability: interruptions may occur for maintenance or force majeure. Core-DSE cannot be held liable for the consequences of downtime.
10. Termination
An account can be disabled by an administrator in case of a breach of these Terms. You may also request deletion of your account at any time via the form.
11. Governing law
These Terms are governed by Moroccan law. Any dispute will be submitted to the competent courts of Casablanca.
12. Changes to these Terms
These Terms may be changed at any time. The version in force is the one published on this page at the time you use the service.
Questions, a problem with your account, a refund, or a request about your data: write to us here and we answer at your account's email address. Your message is only seen by the person who runs this site.
Companies interested in their own deployment of OrchidCore: write to us here too. Individuals and schools subscribe from the page. Never include a card number or other payment details in a message.