|
|
@ -56,58 +56,74 @@ begin
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
test_runner_setup(runner, runner_cfg);
|
|
|
|
test_runner_setup(runner, runner_cfg);
|
|
|
|
|
|
|
|
|
|
|
|
wait for 4*clk_period;
|
|
|
|
wait for 8*clk_period;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info("reset state:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 1:");
|
|
|
|
info("accessing 1:");
|
|
|
|
acc <= "001";
|
|
|
|
acc <= "001";
|
|
|
|
acc_en <= '1';
|
|
|
|
acc_en <= '1';
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 4, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 2:");
|
|
|
|
info("accessing 2:");
|
|
|
|
acc <= "010";
|
|
|
|
acc <= "010";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 4, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 7:");
|
|
|
|
info("accessing 7:");
|
|
|
|
acc <= "111";
|
|
|
|
acc <= "111";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 4:");
|
|
|
|
info("accessing 4:");
|
|
|
|
acc <= "100";
|
|
|
|
acc <= "100";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 3:");
|
|
|
|
info("accessing 3:");
|
|
|
|
acc <= "011";
|
|
|
|
acc <= "011";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 6, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 5:");
|
|
|
|
info("accessing 5:");
|
|
|
|
acc <= "101";
|
|
|
|
acc <= "101";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 3:");
|
|
|
|
info("accessing 3:");
|
|
|
|
acc <= "011";
|
|
|
|
acc <= "011";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 6, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 5:");
|
|
|
|
info("accessing 5:");
|
|
|
|
acc <= "101";
|
|
|
|
acc <= "101";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 6:");
|
|
|
|
info("accessing 6:");
|
|
|
|
acc <= "110";
|
|
|
|
acc <= "110";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 0, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
info("accessing 0:");
|
|
|
|
info("accessing 0:");
|
|
|
|
acc <= "000";
|
|
|
|
acc <= "000";
|
|
|
|
wait for clk_period;
|
|
|
|
wait for clk_period;
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
info("lru:" & to_hstring(lru));
|
|
|
|
|
|
|
|
check_equal(lru, 4, result("LRU"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wait for clk_period;
|
|
|
|
|
|
|
|
wait for clk_period;
|
|
|
|
|
|
|
|
|
|
|
|
test_runner_cleanup(runner);
|
|
|
|
test_runner_cleanup(runner);
|
|
|
|
end process;
|
|
|
|
end process;
|
|
|
|