From: Jean THOMAS Date: Tue, 28 Jul 2020 17:25:18 +0000 (+0200) Subject: Add speedtest_write task X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=561c0b2e5e59b910e55c81dc6745d3aeb0a13384;p=gram.git Add speedtest_write task --- diff --git a/gram/simulation/simsoctb.v b/gram/simulation/simsoctb.v index da2adaf..af1d349 100644 --- a/gram/simulation/simsoctb.v +++ b/gram/simulation/simsoctb.v @@ -309,4 +309,32 @@ module simsoctb; $display("Read speedtest: %d MB/s", 610352/(tend-tstart)); end endtask + + task speedtest_write; + begin + tstart = $time; + for (i = 0; i < 10; i = i+1) begin + wishbone_write(32'h1000000C >> 2, 32'h00BA0BAB); + wishbone_write(32'h10000008 >> 2, 32'h13374242); + wishbone_write(32'h10000004 >> 2, 32'hC0DEC0DE); + wishbone_write(32'h10000000 >> 2, 32'h01020304); + wishbone_write(32'h1000001C >> 2, 32'h00BA0BAB); + wishbone_write(32'h10000018 >> 2, 32'h13374242); + wishbone_write(32'h10000014 >> 2, 32'hC0DEC0DE); + wishbone_write(32'h10000010 >> 2, 32'h01020304); + wishbone_write(32'h1000002C >> 2, 32'h00BA0BAB); + wishbone_write(32'h10000028 >> 2, 32'h13374242); + wishbone_write(32'h10000024 >> 2, 32'hC0DEC0DE); + wishbone_write(32'h10000020 >> 2, 32'h01020304); + wishbone_write(32'h1000003C >> 2, 32'h00BA0BAB); + wishbone_write(32'h10000038 >> 2, 32'h13374242); + wishbone_write(32'h10000034 >> 2, 32'hC0DEC0DE); + wishbone_write(32'h10000030 >> 2, 32'h01020304); + end + tend = $time; + + //$display("Write speedtest: %d B/s", (10*16*4)*1000000000/(1024*1024)/(tend-tstart)); + $display("Write speedtest: %d MB/s", 610352/(tend-tstart)); + end + endtask endmodule