Commit 54b5ebf2 authored by Dimitris Lampridis's avatar Dimitris Lampridis

[hdl] wip to fix l2p_dma_master wishbone-driving process

parent e809f2ee
......@@ -410,19 +410,20 @@ begin
---------------------
-- Tie offs
l2p_dma_cyc_o <= l2p_dma_cyc_t;
l2p_dma_stb_o <= l2p_dma_stb_t; --and not addr_fifo_empty;
l2p_dma_stb_o <= l2p_dma_stb_t;
l2p_dma_sel_o <= (others => '1');
l2p_dma_adr_o <= l2p_dma_adr_t;
l2p_dma_dat_o <= (others => '0');
l2p_dma_we_o <= '0';
addr_fifo_valid <= not(addr_fifo_empty or l2p_dma_stall_i or data_fifo_full or p2l_dma_cyc_i);
l2p_dma_adr_t <= addr_fifo_dout;
l2p_dma_stb_t <= addr_fifo_rd and not addr_fifo_empty;
p_wb_master : process (l2p_dma_clk_i)
begin
if rising_edge(l2p_dma_clk_i) then
if wb_fifo_rst_n = '0' then
l2p_dma_stb_t <= '0';
l2p_dma_cyc_t <= '0';
addr_fifo_rd <= '0';
wb_read_cnt <= (others => '0');
......@@ -436,19 +437,13 @@ begin
addr_fifo_rd <= '0';
end if;
if (addr_fifo_rd = '1' and addr_fifo_empty = '0') then
l2p_dma_stb_t <= '1';
else
l2p_dma_stb_t <= '0';
end if;
if (l2p_dma_stb_t = '1' and l2p_dma_ack_i = '0' and l2p_dma_cyc_t = '1') then
if (l2p_dma_stb_t = '1' and l2p_dma_ack_i = '0') then
wb_read_cnt <= wb_read_cnt + 1;
elsif (l2p_dma_stb_t = '0' and l2p_dma_ack_i = '1' and l2p_dma_cyc_t = '1') then
elsif (l2p_dma_stb_t = '0' and l2p_dma_ack_i = '1') then
wb_read_cnt <= wb_read_cnt - 1;
end if;
if (addr_fifo_valid = '1' or l2p_dma_stb_t = '1') then
if (addr_fifo_valid = '1') then
l2p_dma_cyc_t <= '1';
elsif (wb_read_cnt = 0) then
l2p_dma_cyc_t <= '0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment