Re: Tang Nano 9K - a (n almost) perfect 65(x)xx platform
Posted: Tue Oct 01, 2024 2:50 am
Command-line builds using GOWIN tools
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:
If you find that tedious, just open an IDE project like you always do, select 'console' at the bottom, and enter saveto script.tcl (use a name that would make sense, of course). It will have everything except the final run all, which you should add yourself.
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.
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.