From: Pavel Pisa Date: Wed, 31 Dec 2014 08:19:09 +0000 (+0100) Subject: Update Tumbl and test of concurrent access. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/lx-cpu1/lx-rocon.git/commitdiff_plain/0cceb42491a7d74d0fca3bc43617b82c86c8a076 Update Tumbl and test of concurrent access. Signed-off-by: Pavel Pisa --- diff --git a/hw/tb/lx_tumbl_tb.vhd b/hw/tb/lx_tumbl_tb.vhd index 8c59fe8..dccefe1 100644 --- a/hw/tb/lx_tumbl_tb.vhd +++ b/hw/tb/lx_tumbl_tb.vhd @@ -146,15 +146,35 @@ BEGIN end process; - events_process: process(cycle_cnt, xmemb_sel_s, delay_access_r, delay_access_r2) + --events_process: process(cycle_cnt, xmemb_sel_s, delay_access_r, delay_access_r2) + --begin + -- -- Simulate externall access to xmem bus shared with Tumbl + -- if cycle_cnt >= 46 and cycle_cnt <= 47 then + -- -- if xmemb_sel_s = '1' and (delay_access_r = '0' or delay_access_r2 = '0') then + -- delay_access_s <= '1'; + -- else + -- delay_access_s <= '0'; + -- end if; + --end process; + + events_process: process begin - -- Simulate externall access to xmem bus shared with Tumbl - if cycle_cnt >= 33 and cycle_cnt <= 33 then - -- if xmemb_sel_s = '1' and (delay_access_r = '0' or delay_access_r2 = '0') then - delay_access_s <= '1'; - else - delay_access_s <= '0'; - end if; + + wait until clk_cpu'event and clk_cpu = '1' and imem_ready_s = '1'; + + -- Simulate external master accesses to Tumbl shared xmem bus + xmem_loop: loop + wait until clk_cpu'event and clk_cpu = '1'; + wait until clk_cpu'event and clk_cpu = '1'; + wait until clk_cpu'event and clk_cpu = '1'; + wait until clk_cpu'event and clk_cpu = '1'; + wait until clk_cpu'event and clk_cpu = '1'; + delay_access_s <= transport '1' after 2 ns; + wait until clk_cpu'event and clk_cpu = '1'; + wait until clk_cpu'event and clk_cpu = '1'; + delay_access_s <= transport '0' after 2 ns; + end loop xmem_loop; + end process; -- Enable xmem clken only when bus available for Tumbl diff --git a/submodule/tumbl b/submodule/tumbl index 3d80b5c..0e360bb 160000 --- a/submodule/tumbl +++ b/submodule/tumbl @@ -1 +1 @@ -Subproject commit 3d80b5ce3a1537adda4bf6be12d6d7d94a9cc27c +Subproject commit 0e360bb03b9126943802fc74133e0e022bed48bf