Gowin tools have a built-in Tcl scripting capability. In particular, the binary gw-sh is a command-line version of the toolchain, which allows you to manually load the files, configure options, and run synthesis and/or pnr.
This would be very tedious, but you can send it a script containing something like:
Code: Select all
add_file -type verilog "/home/stack/Desktop/work/nano9k/ALUtest/src/top.v"
add_file -type cst "/home/stack/Desktop/work/nano9k/ALUtest/src/tangnano9k.cst"
set_device GW1NR-LV9QN88PC6/I5 -device_version C
set_option -synthesis_tool gowinsynthesis
set_option -output_base_name fpga_project
set_option -gen_text_timing_rpt 1
run all
See the appropriate manual (SUG100-4.1E_Gowin Software User Guide.pdf), and explore by dumping your project from the IDE, using saveto -all_options <filename>. You may have to remove some options that cause errors for some reason, but you get the idea.
For an extra credit, create a Makefile. Now you are a real power user.