Since simulation tools and FPGA tools use such vastly different inputs to feed in files (🙄 ), we want to leverage FuseSoC’s ability to let us define a “generic” file list that gets mushed into a nice intermediate format that we can then parse in Python to generate filelists for the particular tools
Ideally we’d be able to use FuseSoC’s ability to run all the way through (including simulation and FPGA builds). However, we have some quirks. Testing is cocotb or scary custom DPI based, so there aren’t great FuseSoC bindings. FPGA builds are based on Corundum’s build system, which I don’t feel like porting to FuseSoC. As a result, the quickest way is just to generate filelists.
tcp_hw also kind of arbitrarily have core fileslib subdirectories, have examples, those often symlink back to lib to get the components, but then you end up in a cyclefusesoc.conf in the directory you’ve setup to build the overall thing and then add libraries that point to directories under the root of the repo (network_tiles, apps, ect.). This way, FuseSoC will only recursively search the directories that were pointed to as librariesfusesoc run in order to acquire the EDAM file that we can parse. This resolves the dependency chains, so things at the bottom like utils and includes files come first in the filelist, and collects all the files into one file. It also runs generators to preprocess filesutil/scripts/generate_filelist.py) to parse the filelist to find include files mainly. This is because we need +incdir+ for the simulation tools and none of the include files passed as sources, but Vivado requires you to add all the include files as sources and then use some TCL to mark them as Verilog header files
target: do we want the filelist for Corundum’s FPGA flow (corundum_fpga) or do we want a flist (filst)edam_file: what EDAM file from FuseSoC are we parsing? This is probably in build/<system_name_thing>/<target>/<system_name_thing>.eda.ymloutput_file: what file should we write the output tococotb_testing/udp_echomake init_fusesoc to bring in the other libraries
fusesoc library addfusesoc core list you should see all the cores that things depend on which were found as part of the librariesmake gen_filelist to generate the filelist for cocotb testing.
COMPILE_ARG of cocotb