From 3e25aa1b5c3d80179d7c0de4395fd04d5b97e1e4 Mon Sep 17 00:00:00 2001 From: Gyorgy Szombathelyi Date: Tue, 5 Feb 2019 13:21:43 +0100 Subject: [PATCH] [C64] 6510: eliminate latches --- cores/c64/rtl/cpu_6510.vhd | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/cores/c64/rtl/cpu_6510.vhd b/cores/c64/rtl/cpu_6510.vhd index cbe719f..17e4b06 100644 --- a/cores/c64/rtl/cpu_6510.vhd +++ b/cores/c64/rtl/cpu_6510.vhd @@ -94,15 +94,17 @@ begin end if; end process; - process(ioDir, ioData, diIO) + process(clk) begin - for i in 0 to 7 loop - if ioDir(i) = '0' then - currentIO(i) <= std_logic(diIO(i)); - else - currentIO(i) <= ioData(i); - end if; - end loop; + if rising_edge(clk) then + for i in 0 to 7 loop + if ioDir(i) = '0' then + currentIO(i) <= std_logic(diIO(i)); + else + currentIO(i) <= ioData(i); + end if; + end loop; + end if; end process; -- Cunnect zee wires