From fe372f0efa6056d20bbbce19420c1c5516a049c3 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Fri, 17 Oct 2008 17:35:07 +0000 Subject: [PATCH] - Removed registered CYC_O (didn't work) git-svn-id: http://moon:8086/svn/vhdl/trunk@66 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/CPUs/MIPS/src/core/mips_bui.vhd | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/lib/CPUs/MIPS/src/core/mips_bui.vhd b/lib/CPUs/MIPS/src/core/mips_bui.vhd index b75299d..f8ad262 100644 --- a/lib/CPUs/MIPS/src/core/mips_bui.vhd +++ b/lib/CPUs/MIPS/src/core/mips_bui.vhd @@ -189,29 +189,21 @@ begin MRDY_O <= '1'; -cyc_registered_out: +read_cyc_register: process(CLK_I) - variable cyc : std_logic; begin if rising_edge(CLK_I) then if RST_I = '1' then - cyc := '0'; - CYC_O <= '0'; + read_cycle <= '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 := read_cycle; - end if; + read_cycle <= (dmem_mem_rd_gnt and CYC_O_dmem_rd) + or (dcache_mem_gnt and CYC_O_dcache) + or (icache_mem_gnt and CYC_O_icache); end if; end if; end process; - - read_cycle <= (dmem_mem_rd_gnt and CYC_O_dmem_rd) or (dcache_mem_gnt and CYC_O_dcache) or (icache_mem_gnt and CYC_O_icache); - + + CYC_O <= not bout_fifo_empty or read_cycle; STB_O <= not bout_fifo_empty; ADDR_O <= bout_fifo_addr_out; DAT_O <= bout_fifo_data_out; @@ -300,9 +292,14 @@ inst_bout_fifo: entity work.fifo_sync_dist data_r => bout_fifo_dout ); bout_rdy <= not bout_fifo_full; - bout_fifo_re <= SRDY_I; + bout_fifo_re <= not bout_fifo_empty and SRDY_I; bout_fifo_we <= STB_O_dmem_wr or STB_O_dmem_rd or STB_O_dcache or STB_O_icache; +-- bout_fifo_we <= STB_O_dmem_wr when dmem_mem_wr_gnt = '1' else +-- STB_O_dmem_rd when dmem_mem_rd_gnt = '1' else +-- STB_O_dcache when dcache_mem_gnt = '1' else +-- STB_O_icache when icache_mem_gnt = '1' else '0'; + bout_fifo_data_in <= DAT_O_dmem_wr when dmem_mem_wr_gnt = '1' else (others => '-');