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 167 and 168

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

Rev 167 Rev 168
Line 322... Line 322...
                     PC_BRANCH, PC_LOAD );
                     PC_BRANCH, PC_LOAD );
 
 
  type SP_MODES is ( SP_IDLE, SP_RSET, SP_POP, SP_PUSH );
  type SP_MODES is ( SP_IDLE, SP_RSET, SP_POP, SP_PUSH );
 
 
  type DP_MODES is ( DATA_BUS_IDLE, DATA_RD_MEM,
  type DP_MODES is ( DATA_BUS_IDLE, DATA_RD_MEM,
                     DATA_WR_REG, DATA_WR_FLAG, DATA_WR_PC );
                     DATA_WR_REG, DATA_WR_FLAG,
 
                                                        DATA_WR_PC_LOWER, DATA_WR_PC_UPPER );
 
 
  type DP_CTRL_TYPE is record
  type DP_CTRL_TYPE is record
    Src                      : DP_MODES;
    Src                      : DP_MODES;
    Reg                      : SUBOP_TYPE;
    Reg                      : SUBOP_TYPE;
  end record;
  end record;
Line 416... Line 417...
    elsif( rising_edge(Clock) )then
    elsif( rising_edge(Clock) )then
 
 
      IC                     := CACHE_IDLE;
      IC                     := CACHE_IDLE;
      SP                     := SP_IDLE;
      SP                     := SP_IDLE;
      DP.Src                 := DATA_RD_MEM;
      DP.Src                 := DATA_RD_MEM;
      DP.Reg                 := ACCUM;
 
      Ack_D                  := '0';
      Ack_D                  := '0';
      INT.Mask_Set           := '0';
      INT.Mask_Set           := '0';
      INT.Soft_Ints          := x"00";
      INT.Soft_Ints          := x"00";
      INT.Incr_ISR           := '0';
      INT.Incr_ISR           := '0';
      RegSel                 := conv_integer(CPU.SubOp_p0);
      RegSel                 := conv_integer(CPU.SubOp_p0);
Line 530... Line 530...
                  CPU.State  <= GMSK_C1;
                  CPU.State  <= GMSK_C1;
 
 
                when SOP_JSR =>
                when SOP_JSR =>
                  IC         := CACHE_OPER1;
                  IC         := CACHE_OPER1;
                  PC         := PC_IDLE;
                  PC         := PC_IDLE;
                  DP.Src     := DATA_WR_PC;
                  DP.Src     := DATA_WR_PC_UPPER;
                  DP.Reg     := ACCUM+1;
 
                  CPU.State  <= JSR_C1;
                  CPU.State  <= JSR_C1;
 
 
                when others => null;
                when others => null;
              end case;
              end case;
 
 
Line 856... Line 855...
 
 
        when ISR_C3 =>
        when ISR_C3 =>
          IC                 := CACHE_OPER1;
          IC                 := CACHE_OPER1;
          PC                 := PC_IDLE;
          PC                 := PC_IDLE;
          SP                 := SP_PUSH;
          SP                 := SP_PUSH;
          DP.Src             := DATA_WR_PC;
          DP.Src             := DATA_WR_PC_UPPER;
          DP.Reg             := ACCUM+1;
 
          Ack_D              := '1';
          Ack_D              := '1';
          CPU.A_Oper         <= ALU_STP;
          CPU.A_Oper         <= ALU_STP;
          CPU.A_Reg          <= INT_FLAG;
          CPU.A_Reg          <= INT_FLAG;
          CPU.State          <= JSR_C1;
          CPU.State          <= JSR_C1;
 
 
        when JSR_C1 =>
        when JSR_C1 =>
          IC                 := CACHE_OPER2;
          IC                 := CACHE_OPER2;
          PC                 := PC_IDLE;
          PC                 := PC_IDLE;
          SP                 := SP_PUSH;
          SP                 := SP_PUSH;
          DP.Src             := DATA_WR_PC;
          DP.Src             := DATA_WR_PC_LOWER;
          DP.Reg             := ACCUM;
 
          CPU.State          <= JSR_C2;
          CPU.State          <= JSR_C2;
 
 
        when JSR_C2 =>
        when JSR_C2 =>
          SP                 := SP_PUSH;
          SP                 := SP_PUSH;
          PC                 := PC_LOAD;
          PC                 := PC_LOAD;
Line 1254... Line 1251...
 
 
        when DATA_WR_FLAG =>
        when DATA_WR_FLAG =>
          Wr_Enable          <= '1';
          Wr_Enable          <= '1';
          Wr_Data            <= Flags;
          Wr_Data            <= Flags;
 
 
        when DATA_WR_PC =>
        when DATA_WR_PC_LOWER =>
          Wr_Enable          <= '1';
          Wr_Enable          <= '1';
          Wr_Data            <= CPU.Program_Ctr(15 downto 8);
 
          if( DP.Reg = ACCUM )then
 
            Wr_Data          <= CPU.Program_Ctr(7 downto 0);
            Wr_Data          <= CPU.Program_Ctr(7 downto 0);
          end if;
 
 
                  when DATA_WR_PC_UPPER =>
 
          Wr_Enable          <= '1';
 
          Wr_Data            <= CPU.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.