From c42c0bcf2217e2756811955c6cebb81c869cd3b8 Mon Sep 17 00:00:00 2001 From: Yohan Boujon Date: Mon, 20 Nov 2023 12:13:42 +0100 Subject: [PATCH] Added instruction COPY, Commenting the idea for COPY in CPU --- src/cpu.vhd | 3 +++ src/instruction_memory.vhd | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cpu.vhd b/src/cpu.vhd index 7f67e10..0ad4f6c 100644 --- a/src/cpu.vhd +++ b/src/cpu.vhd @@ -110,10 +110,13 @@ begin li_A <= inst(23 downto 16); li_B <= inst(15 downto 8); li_C <= inst(7 downto 0); + -- In this case, copy the content of li_A directly to di_A (just the idea) --case li_OP is -- AFC --when => X"06" => + -- In this case, put the content in memory_register_inst and get QA in di_A (just the idea) + --when => X"05" => --end case PC <= PC+'1'; end if; diff --git a/src/instruction_memory.vhd b/src/instruction_memory.vhd index 31b21cf..d6eaff8 100644 --- a/src/instruction_memory.vhd +++ b/src/instruction_memory.vhd @@ -23,7 +23,8 @@ entity instruction is for i in code_array'range loop init_result(i) := std_logic_vector(conv_unsigned(0, 32)); end loop; - init_result(0) := X"06010C00"; + init_result(0) := X"06010C00"; -- AFC 0x0c to R01 + init_result(1) := X"05000100"; -- COPY R01 to R00 return init_result; end function init; end instruction;