OpenCores
URL https://opencores.org/ocsvn/cpu_lecture/cpu_lecture/trunk

Subversion Repositories cpu_lecture

[/] [cpu_lecture/] [trunk/] [src/] [register_file.vhd] - Diff between revs 12 and 15

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 12 Rev 15
Line 247... Line 247...
            when AS_IMM => L_BASE <= I_IMM;
            when AS_IMM => L_BASE <= I_IMM;
            when others => L_BASE <= X"0000";
            when others => L_BASE <= X"0000";
        end case;
        end case;
    end process;
    end process;
 
 
    -- the value of the X/Y/Z/SP register after a potential PRE-decrement
    -- the value of the X/Y/Z/SP register after a potential PRE-inc/decrement
    -- (by 1 or 2) and POST-increment (by 1 or 2).
    -- (by 1 or 2) and POST-inc/decrement (by 1 or 2).
    --
    --
    process(I_AMOD(5 downto 3), I_IMM)
    process(I_AMOD, I_IMM)
    begin
    begin
        case I_AMOD(5 downto 3) is
        case I_AMOD is
            when AO_0   => L_PRE <= X"0000";    L_POST <= X"0000";
            when AMOD_Xq | AMOD_Yq | AMOD_Zq  =>
            when AO_i   => L_PRE <= X"0000";    L_POST <= X"0001";
                L_PRE <= I_IMM;      L_POST <= X"0000";
            when AO_ii  => L_PRE <= X"0000";    L_POST <= X"0002";
 
            when AO_q   => L_PRE <= I_IMM;      L_POST <= X"0000";
            when AMOD_Xi | AMOD_Yi | AMOD_Zi  =>
            when AO_d   => L_PRE <= X"FFFF";    L_POST <= X"FFFF";
                L_PRE <= X"0000";    L_POST <= X"0001";
            when AO_dd  => L_PRE <= X"FFFE";    L_POST <= X"FFFE";
 
            when others => L_PRE <= X"0000";    L_POST <= X"0000";
            when AMOD_dX  | AMOD_dY  | AMOD_dZ  =>
 
                L_PRE <= X"FFFF";    L_POST <= X"FFFF";
 
 
 
            when AMOD_iSP =>
 
                L_PRE <= X"0001";    L_POST <= X"0001";
 
 
 
            when AMOD_iiSP=>
 
                L_PRE <= X"0001";    L_POST <= X"0002";
 
 
 
            when AMOD_SPd =>
 
                L_PRE <= X"0000";    L_POST <= X"FFFF";
 
 
 
            when AMOD_SPdd=>
 
                L_PRE <= X"FFFF";    L_POST <= X"FFFE";
 
 
 
            when others =>
 
                L_PRE <= X"0000";    L_POST <= X"0000";
        end case;
        end case;
    end process;
    end process;
 
 
    L_XYZS <= L_BASE + L_POST;
    L_XYZS <= L_BASE + L_POST;
    L_ADR  <= L_BASE + L_PRE;
    L_ADR  <= L_BASE + L_PRE;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.