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

Subversion Repositories xucpu

[/] [xucpu/] [trunk/] [src/] [system/] [S2CPU.vhdl] - Diff between revs 32 and 33

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

Rev 32 Rev 33
Line 18... Line 18...
 
 
END ENTITY S2CPU;
END ENTITY S2CPU;
 
 
ARCHITECTURE Structural OF S2CPU IS
ARCHITECTURE Structural OF S2CPU IS
 
 
 
  SIGNAL PC : INTEGER RANGE 0 TO 32767 := 0;
 
 
BEGIN  -- ARCHITECTURE Structural
BEGIN  -- ARCHITECTURE Structural
 
 
 
  -- purpose: Let counter run to fetch instructions
 
  -- type   : combinational
 
  -- inputs : CLK,RST
 
  -- outputs: O_INSTR_ADDR
 
  IF1: PROCESS (CLK,RST) IS
 
  BEGIN  -- PROCESS IF1
 
    IF rising_edge(CLK) THEN
 
      IF rst = '1' THEN
 
        PC <= 0;
 
      ELSE
 
        IF PC = 32767 THEN
 
          PC <= 0;
 
        ELSE
 
          PC <= PC + 1;
 
        END IF;
 
      END IF;
 
    END IF;
 
  END PROCESS IF1;
 
 
 
  O_IF <= '1';
 
  O_INSTR_ADDR <= STD_LOGIC_VECTOR(to_unsigned(PC, 15));
 
 
END ARCHITECTURE Structural;
END ARCHITECTURE Structural;
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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