From 1823680973f52481821becedd0d1a4dc18e886a0 Mon Sep 17 00:00:00 2001 From: Jared De Blander Date: Sat, 4 Jan 2025 18:57:22 -0500 Subject: [PATCH] state machine cases --- peach/peach.sv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/peach/peach.sv b/peach/peach.sv index a75b538..7925e43 100644 --- a/peach/peach.sv +++ b/peach/peach.sv @@ -177,15 +177,15 @@ module peach32 ( end else begin // rv32i multi-cycle state machine case (state) - 0: begin + STATE_FETCH: begin // load the instruction from memory into instruction register ir <= memory_out; // calculate the program counter +4 with the alu next_pc <= pc + 4; // advance to state 1 - state <= 1; + state <= STATE_DECODE; end - 1: begin + STATE_DECODE: begin // decode ir and determine op type opcode <= ir[6:0]; funct3 <= ir[14:12];