Skip to content

Commit 8980f48

Browse files
committed
Added benchmark project for Gowin FPGAs
1 parent 303665d commit 8980f48

File tree

7 files changed

+235
-0
lines changed

7 files changed

+235
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1" encoding="UTF-8"?>
2+
<!DOCTYPE gowin-fpga-project>
3+
<Project>
4+
<Template>FPGA</Template>
5+
<Version>5</Version>
6+
<Device name="GW2A-55C" pn="GW2A-LV55PG1156C7/I6">gw2a55c-009</Device>
7+
<FileList>
8+
<File path="src/dynamic_delay.sv" type="file.verilog" enable="1"/>
9+
<File path="src/main.sv" type="file.verilog" enable="1"/>
10+
<File path="src/timing.sdc" type="file.sdc" enable="1"/>
11+
</FileList>
12+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1" encoding="UTF-8"?>
2+
<!DOCTYPE ProjectUserData>
3+
<UserConfig>
4+
<Version>1.0</Version>
5+
<FlowState>
6+
<Process ID="Synthesis" State="2"/>
7+
<Process ID="Pnr" State="2"/>
8+
<Process ID="Gao" State="2"/>
9+
<Process ID="Rtl_Gao" State="2"/>
10+
</FlowState>
11+
<ResultFileList>
12+
<ResultFile ResultFileType="RES.netlist" ResultFilePath="impl/gwsynthesis/gowin_benchmark.vg"/>
13+
<ResultFile ResultFileType="RES.pnr.bitstream" ResultFilePath="impl/pnr/gowin_benchmark.fs"/>
14+
<ResultFile ResultFileType="RES.pnr.pin.rpt" ResultFilePath="impl/pnr/gowin_benchmark.pin.html"/>
15+
<ResultFile ResultFileType="RES.pnr.pwr.rpt" ResultFilePath="impl/pnr/gowin_benchmark.power.html"/>
16+
<ResultFile ResultFileType="RES.pnr.report" ResultFilePath="impl/pnr/gowin_benchmark.rpt.html"/>
17+
<ResultFile ResultFileType="RES.pnr.timing.rpt" ResultFilePath="impl/pnr/gowin_benchmark.tr.html"/>
18+
<ResultFile ResultFileType="RES.syn.report" ResultFilePath="impl/gwsynthesis/gowin_benchmark_syn.rpt.html"/>
19+
<ResultFile ResultFileType="RES.syn.resource" ResultFilePath="impl/gwsynthesis/gowin_benchmark_syn_rsc.xml"/>
20+
</ResultFileList>
21+
<Ui>000000ff00000001fd00000002000000000000010000000282fc0200000001fc00000035000002820000000000fffffffaffffffff0200000003fb00000030004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00440065007300690067006e0100000000ffffffff0000000000000000fb00000032004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00500072006f00630065007300730100000000ffffffff0000000000000000fb00000036004600700067006100500072006f006a006500630074002e00500061006e0065006c002e0048006900650072006100720063006800790100000000ffffffff0000000000000000000000030000078000000140fc0100000001fc00000000000007800000000000fffffffaffffffff0100000002fb00000032004600700067006100500072006f006a006500630074002e00500061006e0065006c002e00470065006e006500720061006c0100000000ffffffff0000000000000000fb0000002e004600700067006100500072006f006a006500630074002e00500061006e0065006c002e004900730073007500650100000000ffffffff00000000000000000000067c0000028200000004000000040000000800000008fc000000010000000200000003000000220043006f00720065002e0054006f006f006c006200610072002e00460069006c00650100000000ffffffff0000000000000000000000220043006f00720065002e0054006f006f006c006200610072002e004500640069007401000000adffffffff0000000000000000000000240043006f00720065002e0054006f006f006c006200610072002e0054006f006f006c0073010000017fffffffff0000000000000000</Ui>
22+
</UserConfig>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"Allow_Duplicate_Modules" : false,
3+
"Annotated_Properties_for_Analyst" : true,
4+
"BACKGROUND_PROGRAMMING" : false,
5+
"COMPRESS" : false,
6+
"CRC_CHECK" : true,
7+
"Clock_Conversion" : true,
8+
"DONE" : false,
9+
"DOWNLOAD_SPEED" : "default",
10+
"Default_Enum_Encoding" : "default",
11+
"Disable_Insert_Pad" : false,
12+
"ENCRYPTION_KEY" : false,
13+
"ENCRYPTION_KEY_TEXT" : "00000000000000000000000000000000",
14+
"FORMAT" : "binary",
15+
"FSM Compiler" : true,
16+
"Fanout_Guide" : 10000,
17+
"Frequency" : "Auto",
18+
"Generate_Constraint_File_of_Ports" : false,
19+
"Generate_IBIS_File" : false,
20+
"Generate_Plain_Text_Timing_Report" : false,
21+
"Generate_Post_PNR_Simulation_Model_File" : false,
22+
"Generate_Post_Place_File" : false,
23+
"Generate_SDF_File" : false,
24+
"GwSyn_Loop_Limit" : 2000,
25+
"Implicit_Initial_Value_Support" : false,
26+
"IncludePath" : [
27+
28+
],
29+
"Initialize_Primitives" : false,
30+
"JTAG" : false,
31+
"MODE_IO" : false,
32+
"MSPI" : false,
33+
"Multiple_File_Compilation_Unit" : true,
34+
"Number_of_Critical_Paths" : "",
35+
"Number_of_Start/End_Points" : "",
36+
"OUTPUT_BASE_NAME" : "gowin_benchmark",
37+
"PRINT_BSRAM_VALUE" : true,
38+
"Pipelining" : true,
39+
"Place_Option" : "0",
40+
"Place_register_to_IOB" : true,
41+
"Process_Configuration_Verion" : "1.0",
42+
"Promote_Physical_Constraint_Warning_to_Error" : false,
43+
"Push_Tristates" : true,
44+
"READY" : false,
45+
"RECONFIG_N" : false,
46+
"Ram_RW_Check" : true,
47+
"Report_Auto-Placed_Io_Information" : false,
48+
"Resolve_Mixed_Drivers" : false,
49+
"Resource_Sharing" : true,
50+
"Retiming" : false,
51+
"Route_Option" : "0",
52+
"Run_Timing_Driven" : true,
53+
"SECURE_MODE" : false,
54+
"SECURITY_BIT" : true,
55+
"SPI_FLASH_ADDR" : "00000000",
56+
"SSPI" : false,
57+
"Show_All_Warnings" : false,
58+
"Synthesis On/Off Implemented as Translate On/Off" : false,
59+
"Synthesize_tool" : "GowinSyn",
60+
"TopModule" : "main",
61+
"USERCODE" : "default",
62+
"Unused_Pin" : "As_input_tri_stated_with_pull_up",
63+
"Update_Compile_Point_Timing_Data" : false,
64+
"Use_Clock_Period_for_Unconstrainted IO" : false,
65+
"Use_SCF" : false,
66+
"VHDL_Standard" : "VHDL_Std_1993",
67+
"Verilog_Standard" : "Vlg_Std_Sysv2017",
68+
"WAKE_UP" : "0",
69+
"Write_Vendor_Constraint_File" : true,
70+
"dsp_balance" : false
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
Gowin benchmark project
3+
=========================
4+
5+
6+
Konstantin Pavlov, [email protected]
7+
8+
9+
This project uses dynamic_delay.sv module to model both high-register count and
10+
combinational-intensive design.
11+
12+
To see total time spent for the compilation please use some sort of external
13+
timer. This will give you some quantitive charachteristic of
14+
your environment processing power.
15+
16+
You can also compare how different machines and environments deal with this
17+
typical design when compiling for FPGAs. I use only pure RTL code here with
18+
intention to leave an opportunity to compare compilation time across all
19+
possible IDE`s and even across all FPGA vendors.
20+
21+
"quartus_benchmark" is a similar project for Altera / Intel devices
22+
"vivado_benchmark" is a similar project for Xilinx / AMD devices
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//--------------------------------------------------------------------------------
2+
// dynamic_delay.v
3+
// Konstantin Pavlov, [email protected]
4+
//--------------------------------------------------------------------------------
5+
6+
// INFO --------------------------------------------------------------------------------
7+
// Dynamic delay for arbitrary signal
8+
//
9+
// CAUTION: The module intentionally does NOT implement error handling when
10+
// LENGTH is not a multiple of 2. Please handle "out of range"
11+
// checks externally.
12+
13+
14+
/* --- INSTANTIATION TEMPLATE BEGIN ---
15+
16+
dynamic_delay #(
17+
.LENGTH( 8 )
18+
//.SEL_W( 3 )
19+
) DD1 (
20+
.clk( clk ),
21+
.nrst( 1'b1 ),
22+
.ena( 1'b1 ),
23+
.in( ),
24+
.sel( ),
25+
.out( )
26+
);
27+
28+
--- INSTANTIATION TEMPLATE END ---*/
29+
30+
31+
module dynamic_delay #( parameter
32+
LENGTH = 8, // maximum delay chain width
33+
SEL_W = $clog2(LENGTH) // output selector width
34+
)(
35+
input clk,
36+
input nrst,
37+
input ena,
38+
input in,
39+
input [SEL_W-1:0] sel, // output selector
40+
output logic out
41+
);
42+
43+
logic [(LENGTH-1):0] data = 0;
44+
45+
integer i;
46+
always_ff @(posedge clk) begin
47+
if (~nrst) begin
48+
data[(LENGTH-1):0] <= 0;
49+
out <= 0;
50+
end else if (ena) begin
51+
data[0] <= in;
52+
for (i=1; i<LENGTH; i=i+1) begin
53+
data[i] <= data[i-1];
54+
end
55+
out <= data[sel[SEL_W-1:0]];
56+
end
57+
end
58+
59+
endmodule
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//------------------------------------------------------------------------------
2+
// main.sv
3+
// Konstantin Pavlov, [email protected]
4+
//------------------------------------------------------------------------------
5+
6+
// INFO ------------------------------------------------------------------------
7+
// Vivado benchmark project
8+
//
9+
// This project uses dynamic_delay.sv module to model both high-register count and
10+
// combinational-intensive design. See "Messages" tab for TOTAL time
11+
// spent for compilation. This will give you some quantitive charachteristic
12+
// of your environment processing power
13+
14+
`define WIDTH 16
15+
`define LENGTH 1024
16+
`define SEL_W $clog2(`LENGTH)
17+
18+
19+
module main(
20+
21+
input clk,
22+
input nrst,
23+
24+
input [`WIDTH-1:0] id,
25+
input [`SEL_W-1:0] sel,
26+
output [`WIDTH-1:0] od
27+
);
28+
29+
dynamic_delay #(
30+
.LENGTH( `LENGTH ),
31+
.SEL_W( `SEL_W )
32+
) dd [`WIDTH-1:0] (
33+
.clk( {`WIDTH{clk}} ),
34+
.nrst( {`WIDTH{nrst}} ),
35+
.ena( {`WIDTH{1'b1}} ),
36+
.in( id[`WIDTH-1:0] ),
37+
.sel( {`WIDTH{sel[`SEL_W-1:0]}} ),
38+
.out( od[`WIDTH-1:0] )
39+
);
40+
41+
endmodule
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#------------------------------------------------------------------------------
2+
# timing.sdc
3+
# Konstantin Pavlov, [email protected]
4+
#------------------------------------------------------------------------------
5+
6+
create_clock -period 10.000 -name clk [get_ports {clk}]
7+

0 commit comments

Comments
 (0)