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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [VHDL/] [o8_cpu.vhd] - Diff between revs 264 and 269

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

Rev 264 Rev 269
Line 256... Line 256...
--                           address generator to a multiplexor fed only by
--                           address generator to a multiplexor fed only by
--                           registers.
--                           registers.
-- Seth Henry      07/10/20 Fixed a bug in the LDO/LDX logic where the register
-- Seth Henry      07/10/20 Fixed a bug in the LDO/LDX logic where the register
--                           pair wasn't being incremented properly due to a
--                           pair wasn't being incremented properly due to a
--                           missing UPP2 signal to the ALU.
--                           missing UPP2 signal to the ALU.
 
-- Seth Henry      10/21/20 Modified the write data path to use separate
 
--                           enumerated states rather than reuse the .reg field
 
--                           to improve performance.
 
 
library ieee;
library ieee;
  use ieee.std_logic_1164.all;
  use ieee.std_logic_1164.all;
  use ieee.std_logic_unsigned.all;
  use ieee.std_logic_unsigned.all;
  use ieee.std_logic_arith.all;
  use ieee.std_logic_arith.all;
Line 629... Line 632...
                ALU_Ctrl.Oper     <= ALU_GMSK;
                ALU_Ctrl.Oper     <= ALU_GMSK;
 
 
              when SOP_JSR =>
              when SOP_JSR =>
                CPU_Next_State <= JSR_C1;
                CPU_Next_State <= JSR_C1;
                Cache_Ctrl        <= CACHE_OPER1;
                Cache_Ctrl        <= CACHE_OPER1;
                DP_Ctrl.Src       <= DATA_WR_PC;
                DP_Ctrl.Src       <= DATA_WR_PC_H;
                DP_Ctrl.Reg       <= PC_MSB;
 
 
 
              when others => null;
              when others => null;
            end case;
            end case;
 
 
          when OP_MUL =>
          when OP_MUL =>
Line 977... Line 979...
        CPU_Next_State       <= JSR_C1;
        CPU_Next_State       <= JSR_C1;
        Cache_Ctrl           <= CACHE_OPER1;
        Cache_Ctrl           <= CACHE_OPER1;
        ALU_Ctrl.Oper        <= ALU_STP;
        ALU_Ctrl.Oper        <= ALU_STP;
        ALU_Ctrl.Reg         <= conv_std_logic_vector(PSR_I,3);
        ALU_Ctrl.Reg         <= conv_std_logic_vector(PSR_I,3);
        SP_Ctrl.Oper         <= SP_PUSH;
        SP_Ctrl.Oper         <= SP_PUSH;
        DP_Ctrl.Src          <= DATA_WR_PC;
        DP_Ctrl.Src          <= DATA_WR_PC_H;
        DP_Ctrl.Reg          <= PC_MSB;
 
        Ack_D                <= '1';
        Ack_D                <= '1';
 
 
      when JSR_C1 =>
      when JSR_C1 =>
        CPU_Next_State       <= JSR_C2;
        CPU_Next_State       <= JSR_C2;
        Cache_Ctrl           <= CACHE_OPER2;
        Cache_Ctrl           <= CACHE_OPER2;
        SP_Ctrl.Oper         <= SP_PUSH;
        SP_Ctrl.Oper         <= SP_PUSH;
        DP_Ctrl.Src          <= DATA_WR_PC;
        DP_Ctrl.Src          <= DATA_WR_PC_L;
        DP_Ctrl.Reg          <= PC_LSB;
 
 
 
      when JSR_C2 =>
      when JSR_C2 =>
        CPU_Next_State       <= IPF_C0;
        CPU_Next_State       <= IPF_C0;
        PC_Ctrl.Oper         <= PC_LOAD;
        PC_Ctrl.Oper         <= PC_LOAD;
        SP_Ctrl.Oper         <= SP_PUSH;
        SP_Ctrl.Oper         <= SP_PUSH;
Line 1196... Line 1196...
 
 
        when DATA_WR_FLAG =>
        when DATA_WR_FLAG =>
          Open8_Bus.Wr_En    <= '1';
          Open8_Bus.Wr_En    <= '1';
          Open8_Bus.Wr_Data  <= Flags;
          Open8_Bus.Wr_Data  <= Flags;
 
 
        when DATA_WR_PC =>
        when DATA_WR_PC_L =>
          Open8_Bus.Wr_En    <= '1';
          Open8_Bus.Wr_En    <= '1';
          Open8_Bus.Wr_Data  <= Program_Ctr(15 downto 8);
 
          if( DP_Ctrl.Reg = PC_LSB )then
 
            Open8_Bus.Wr_Data <= Program_Ctr(7 downto 0);
            Open8_Bus.Wr_Data <= Program_Ctr(7 downto 0);
          end if;
 
 
        when DATA_WR_PC_H =>
 
          Open8_Bus.Wr_En    <= '1';
 
          Open8_Bus.Wr_Data  <= Program_Ctr(15 downto 8);
 
 
        when others =>
        when others =>
          null;
          null;
      end case;
      end case;
 
 

powered by: WebSVN 2.1.0

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