URL
https://opencores.org/ocsvn/c16/c16/trunk
[/] [c16/] [trunk/] [vhdl/] [opcode_fetch.vhd] - Diff between revs 2 and 9
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 2 |
Rev 9 |
Line 34... |
Line 34... |
PC <= LPC;
|
PC <= LPC;
|
|
|
process(CLK_I)
|
process(CLK_I)
|
begin
|
begin
|
if (rising_edge(CLK_I)) then
|
if (rising_edge(CLK_I)) then
|
if (T2 = '1') then
|
if (CLR = '1') then
|
if (CLR = '1') then LPC <= X"0000";
|
LPC <= X"0000";
|
elsif (CE = '1') then
|
elsif (CE = '1' and T2 = '1') then
|
case PC_OP is
|
case PC_OP is
|
when PC_NEXT => LPC <= LPC + 1; -- next address
|
when PC_NEXT => LPC <= LPC + 1; -- next address
|
when PC_JMP => LPC <= JDATA; -- jump address
|
when PC_JMP => LPC <= JDATA; -- jump address
|
when PC_RETL => LRET <= RDATA; -- return address L
|
when PC_RETL => LRET <= RDATA; -- return address L
|
LPC <= LPC + 1;
|
LPC <= LPC + 1;
|
Line 49... |
Line 49... |
when PC_WAIT =>
|
when PC_WAIT =>
|
when others => LPC <= X"0008"; -- interrupt
|
when others => LPC <= X"0008"; -- interrupt
|
end case;
|
end case;
|
end if;
|
end if;
|
end if;
|
end if;
|
end if;
|
|
end process;
|
end process;
|
|
|
end Behavioral;
|
end Behavioral;
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.