]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/commitdiff
Update Tumbl and test of concurrent access.
authorPavel Pisa <ppisa@pikron.com>
Wed, 31 Dec 2014 08:19:09 +0000 (09:19 +0100)
committerPavel Pisa <ppisa@pikron.com>
Sat, 10 Jan 2015 09:19:08 +0000 (10:19 +0100)
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
hw/tb/lx_tumbl_tb.vhd

index 65bde9fcbd82d1c81a85360487b9daa291ec4ec2..dccefe1aa66385a044187cd0bfd1ecad34e35b89 100644 (file)
@@ -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 >= 47 and cycle_cnt <= 48 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