dt/deepjit: disc/fetch added
authorMartin Perner <martin@perner.cc>
Thu, 13 Jan 2011 16:30:11 +0000 (17:30 +0100)
committerMartin Perner <martin@perner.cc>
Thu, 13 Jan 2011 16:30:11 +0000 (17:30 +0100)
dt done by markus

cpu/src/alu_b.vhd
cpu/src/common_pkg.vhd
cpu/src/decoder_b.vhd
progs/deepjit.s

index 93f4f8dc5a686d8c266088e23aa919fe105fbf38..bd78302391114d40298521a502406204c8dbd839 100755 (executable)
@@ -188,7 +188,7 @@ begin
                end if;
        when STACK_OP =>
                mem_op := '1';
-               pwr_en_v := '1';
+               pwr_en_v := op_detail(PWREN_OPT);
                if op_detail(PUSH_OPT) = '1' then
                        mem_en := '1';
                        pinc_v := '1';
index a88336c7ec5f13f5ed8565761275a7bc2ec9be1f..2b711da003799afdb023292928077a6ec1b9f6b1 100755 (executable)
@@ -64,6 +64,7 @@ package common_pkg is
        constant CARRY_OPT : integer := 2;
        constant BYTE_OPT : integer := 2;
        constant LDI_REPLACE_OPT : integer := 2;
+       constant PWREN_OPT : integer := 2;
 
        constant RIGHT_OPT : integer := 3;
        constant JMP_REG_OPT : integer := 3;
index 525d408170a0b6b5bca6b12cfe42ec07f85df0e1..ed9ed4a290cf3178670836d0800b19fcd058154f 100644 (file)
@@ -312,16 +312,21 @@ begin
                instr_s.reg_dest_addr := instruction(22 downto 19);
                instr_s.op_group := STACK_OP;
                instr_s.op_detail(NO_PSW_OPT) := '1';
+               instr_s.op_detail(PWREN_OPT) := '1';
        
                case instruction(18 downto 17) is
-                       when "00" => 
+                       when "00" => --pop
                                instr_s.op_detail(PUSH_OPT) := '0';
                        
-                       when "01" => null;
+                       when "01" => --disc
+                               instr_s.op_detail(PUSH_OPT) := '0';
+                               instr_s.op_detail(NO_DST_OPT) := '1';
                        
-                       when "10" => null;
+                       when "10" => --fetch
+                               instr_s.op_detail(PUSH_OPT) := '0';
+                               instr_s.op_detail(PWREN_OPT) := '0';
                        
-                       when "11" =>
+                       when "11" => --push
                                instr_s.op_detail(PUSH_OPT) := '1';
                                
                        when others => null;
index 400b6eb98f2e829348f25d72ac94e6de0ae1200b..c0f66801edf40ada7ccc8aef3452456fdc129976 100644 (file)
@@ -73,8 +73,7 @@ prog_lessthan:
 .ifill pushge r15
 
 prog_dup:
-.ifill pop r6
-.ifill push r6
+.ifill fetch r6
 .ifill push r6
 
 prog_jmp:
@@ -90,7 +89,7 @@ prog_imm:
 .ifill push r6
 
 prog_pop:
-.ifill pop r6
+.ifill disc r6
 
 prog_xch:
 .ifill pop r6
@@ -436,11 +435,9 @@ vm_dup:
        PROGINSTR
        ldw r0, 4(r4)
        PROGINSTR
-       ldw r0, 8(r4)
-       PROGINSTR
 
        ;increment address
-       addi r2, r2, 3
+       addi r2, r2, 2
 
        br+ vm_loop