From f8962066f0b523ac97138464261ef2d783f26a2b Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 17 Oct 2008 13:39:07 +0000 Subject: [PATCH] - Registered CYC_O git-svn-id: http://moon:8086/svn/vhdl/trunk@63 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/src/core/mips_bui.vhd | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/lib/CPUs/MIPS/src/core/mips_bui.vhd b/lib/CPUs/MIPS/src/core/mips_bui.vhd index 4727eb9..fe8d081 100644 --- a/lib/CPUs/MIPS/src/core/mips_bui.vhd +++ b/lib/CPUs/MIPS/src/core/mips_bui.vhd @@ -186,7 +186,29 @@ begin MRDY_O <= '1'; - CYC_O <= not bout_fifo_empty or dmem_mem_rd_gnt or dcache_mem_gnt or icache_mem_gnt; + +cyc_registered_out: + process(CLK_I) + variable cyc : std_logic; + begin + if rising_edge(CLK_I) then + if RST_I = '1' then + cyc := '0'; + CYC_O <= '0'; + else + CYC_O <= cyc or not bout_fifo_empty; + if cyc = '0' then + if (bout_fifo_we and bout_rdy) = '1' then + cyc := '1'; + end if; + elsif SRDY_I = '1' then + cyc := dmem_mem_rd_gnt or dcache_mem_gnt or icache_mem_gnt; + end if; + end if; + end if; + end process; + +-- CYC_O <= not bout_fifo_empty or dmem_mem_rd_gnt or dcache_mem_gnt or icache_mem_gnt; STB_O <= not bout_fifo_empty; ADDR_O <= bout_fifo_addr_out; DAT_O <= bout_fifo_data_out; @@ -255,7 +277,7 @@ inst_dcache : dcache dcache_en <= cpu_dmem_en and not busy; -- Instantiate synchronous FIFO -inst_bout_fifo: entity work.fifo_sync +inst_bout_fifo: entity work.fifo_sync_dist GENERIC MAP ( addr_width => 4, @@ -294,7 +316,7 @@ inst_bout_fifo: entity work.fifo_sync bout_fifo_we_in <= '1' when dmem_mem_wr_gnt = '1' else '0'; -- Instantiate synchronous FIFO -inst_write_fifo: entity work.fifo_sync +inst_write_fifo: entity work.fifo_sync_dist GENERIC MAP ( addr_width => 4,