From 68922a34d25aa18c732469a5908e82f75fc57db3 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Thu, 17 Dec 2020 18:42:52 +0300 Subject: [PATCH] Updated benchmark projects. Added 'benchmark_results.txt' that i got on my machine --- example_projects/benchmark_results.txt | 18 +++++ .../gowin_benchmark/src/dynamic_delay.sv | 77 +++++++++++++------ example_projects/gowin_benchmark/src/main.sv | 1 + .../quartus_benchmark/dynamic_delay.sv | 77 +++++++++++++------ example_projects/quartus_benchmark/main.sv | 1 + .../sources_1/dynamic_delay.sv | 77 +++++++++++++------ .../vivado_benchmark.srcs/sources_1/main.sv | 1 + 7 files changed, 177 insertions(+), 75 deletions(-) create mode 100644 example_projects/benchmark_results.txt diff --git a/example_projects/benchmark_results.txt b/example_projects/benchmark_results.txt new file mode 100644 index 0000000..55fb98a --- /dev/null +++ b/example_projects/benchmark_results.txt @@ -0,0 +1,18 @@ + + +Compilation time results for reference benchmark projects +========================================================= + + +Xeon E5-2630 v4, RAM 32GB, Windows 7 +------------------------------------ +quartus_benchmark - 4m 58s ( Quartus Lite 17 ) +vivado_benchmark - 5m 58s ( Vivado 2019.2 ) +gowin_benchmark - 4m 15s ( Gowin_V1.9.6Beta ) +ise_benchmark - 9m 10s ( ISE 12.4 ) + + +Xeon E5-2630 v4, RAM 32GB, Windows 7, project files on RamDisk +-------------------------------------------------------------- +quartus_benchmark - 4m 57s +vivado_benchmark - 5m 56s \ No newline at end of file diff --git a/example_projects/gowin_benchmark/src/dynamic_delay.sv b/example_projects/gowin_benchmark/src/dynamic_delay.sv index 4c458ef..302fe70 100644 --- a/example_projects/gowin_benchmark/src/dynamic_delay.sv +++ b/example_projects/gowin_benchmark/src/dynamic_delay.sv @@ -4,55 +4,82 @@ //-------------------------------------------------------------------------------- // INFO -------------------------------------------------------------------------------- -// Dynamic delay for arbitrary signal +// Dynamic delay for arbitrary signal. // -// CAUTION: The module intentionally does NOT implement error handling when -// LENGTH is not a multiple of 2. Please handle "out of range" -// checks externally. +// Incoming data elements have WIDTH bits each. Module does serialization of +// input data and outputs flattened bits, based on provided selector value. +// You can perform delays bit-wize, not just element-wize. +// +// CAUTION: Be careful selecting last, most-delayed "WIDTH" number of bits. +// The module intentionally does NOT implement "out of range" +// checks. Please handle them externally. + /* --- INSTANTIATION TEMPLATE BEGIN --- dynamic_delay #( - .LENGTH( 8 ) - //.SEL_W( 3 ) -) DD1 ( + .LENGTH( 3 ), + .WIDTH( 4 ) +) M ( .clk( clk ), - .nrst( 1'b1 ), + .nrst( nrst ), .ena( 1'b1 ), - .in( ), - .sel( ), - .out( ) + .in( in_data[3:0] ), + .sel( sel[3:0] ), + .out( out_data[3:0] ) ); --- INSTANTIATION TEMPLATE END ---*/ module dynamic_delay #( parameter - LENGTH = 8, // maximum delay chain width - SEL_W = $clog2(LENGTH) // output selector width + LENGTH = 63, // maximum delay chain length + WIDTH = 4, // data width + + SEL_W = $clog2( (LENGTH+1)*WIDTH ) // output selector width + // plus one is for zero delay element )( input clk, input nrst, input ena, - input in, - input [SEL_W-1:0] sel, // output selector - output logic out + input [WIDTH-1:0] in, // input data + // bit in[0] is the "oldest" one + // bit in[WIDTH] is considered the most recent + input [SEL_W-1:0] sel, // output selector + output logic [WIDTH-1:0] out // output data ); -logic [(LENGTH-1):0] data = 0; + + +logic [(LENGTH+1)-1:0][WIDTH-1:0] data = '0; + +// packed vector includes extra bits +logic [(LENGTH+1)*WIDTH-1:0] pack_data; +assign pack_data[(LENGTH+1)*WIDTH-1:0] = data; integer i; always_ff @(posedge clk) begin - if (~nrst) begin - data[(LENGTH-1):0] <= 0; - out <= 0; - end else if (ena) begin - data[0] <= in; - for (i=1; i