Branch Predictor Simulator
Procedure
- Enter the assembly code in the code box provided or copy the example code.
- Click 'Generate Trace' to generate the execution trace for the program.
- Select the type of predictor you want to use (One-Bit or Two-Bit).
- Click on the 'Run Simulation' button to see the predictor's performance.
- You can reset the simulation at any time by clicking the 'Reset' button.
Allowed Instructions
ADD Rdest, Rsrc1, Rsrc2 — add two registers
SUB Rdest, Rsrc1, Rsrc2 — subtract two registers
AND Rdest, Rsrc1, Rsrc2 — bitwise AND two registers
MOV Rdest, constant — load immediate into a register
BEQ R1, R2, label — branch if equal
BNE R1, R2, label — branch if not equal