From eab6cf4fc5720b330ba89c38e9e6119a8a6fabfa Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Thu, 31 Jan 2019 11:02:03 +0100 Subject: Initial support for JAL. The JR, BEQ, BNE are most probably incorrect still. There is missing forwarding for pipelined execution. Signed-off-by: Pavel Pisa --- qtmips_machine/core.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qtmips_machine/core.h') diff --git a/qtmips_machine/core.h b/qtmips_machine/core.h index 625fe29..66eb1e6 100644 --- a/qtmips_machine/core.h +++ b/qtmips_machine/core.h @@ -49,6 +49,7 @@ signals: void decode_rs_num_value(std::uint32_t); void decode_rt_num_value(std::uint32_t); void decode_rd_num_value(std::uint32_t); + void decode_regd31_value(std::uint32_t); void execute_alu_value(std::uint32_t); void execute_reg1_value(std::uint32_t); void execute_reg2_value(std::uint32_t); @@ -83,6 +84,7 @@ protected: struct dtFetch { Instruction inst; // Loaded instruction + uint32_t inst_addr; // Address of instruction }; struct dtDecode { Instruction inst; @@ -90,6 +92,7 @@ protected: bool memwrite; // If memory should write input bool alusrc; // If second value to alu is immediate value (rt used otherwise) bool regd; // If rd is used (otherwise rt is used for write target) + bool regd31; // Use R31 as destionation for JAL bool regwrite; // If output should be written back to register (which one depends on regd) enum AluOp aluop; // Decoded ALU operation enum MemoryAccess::AccessControl memctl; // Decoded memory access type -- cgit v1.2.3