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

Subversion Repositories v6502

[/] [v6502/] [trunk/] [mcseq.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 Valerio63
library IEEE;
2
use IEEE.std_logic_1164.all;  -- defines std_logic types
3
use IEEE.STD_LOGIC_unsigned.all;
4
use IEEE.STD_LOGIC_arith.all;
5
 
6
-- opcode => microcode address translation logic (L1 microrom)
7
entity mcseq is
8
  port(    clk:  in STD_LOGIC;
9
           clr:  in STD_LOGIC;
10
        mc_nop:  in STD_LOGIC;
11
         fwait:  in STD_LOGIC;
12
             q: out STD_LOGIC_VECTOR(2 downto 0)
13
      );
14
end mcseq;
15
 
16
architecture comb of mcseq is
17
signal reg: STD_LOGIC_VECTOR(2 downto 0);
18
begin
19
  process(clk)
20
  begin
21
    if(clk'event and clk = '1')then
22
      if fwait = '1' then
23
        reg <= reg;
24
      else
25
        if clr = '1' then
26
          reg <= "000";
27
        else
28
          if mc_nop = '1' then
29
            reg <= "111";
30
          else
31
            reg <= reg +1;
32
          end if;
33
        end if;
34
      end if;
35
    end if;
36
  end process;
37
  q <= reg;
38
end comb;
39
 
40
 

powered by: WebSVN 2.1.0

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