Closed qianxu1998 closed 3 months ago
@Carmine50, @qianxu1998
I was fixing an issue today (that you had reported to me) in the RTL exporter and took the opportunity to integrate a clean solution to the Verilog port-mapping issues discussed above in this PR (with a lot of refactoring around it to make the exporter cleaner overall, even in VHDL).
What this means is that you should be able to untrack your changes to the export-rtl.cpp
and RTL.h/cpp
from this branch, check that everything works fine (it should, lmk if it does not), and then we can merge this.
Apologies for seemingly creating merge conflicts every 2 minutes; I'm trying to make all of these core features super robust before I stop supporting the project professionally.
Over the weekend I have also removed the old backend and moved the "experimental" one to the non-experimental part of the repository, creating more conflicts again, sorry :cry:
Resolving them and making your files non-experimentl should be a matter of
Verilog
folder and new RTL config to data/
(from data/experimental
), taking care of adjusting paths in the config (deleting every occurence of experimental/
should do the trick), andwrite-hdl
script.I just resolved the conflicts, but I still have some problems with the Verilog generation flow.
Besides that, I noticed a problem. When testing the fir.dyn
script, I got the following errors:
dynamatic> set-dynamatic-path .
dynamatic> set-src integration-test/fir/fir.c
dynamatic> compile
In file included from /home/jianliu/Projects/Dynamatic_adds_on/Verilog/dynamatic/integration-test/fir/fir.c:10:
/usr/include/stdlib.h:32:10: fatal error: 'stddef.h' file not found
32 | #include <stddef.h>
| ^~~~~~~~~~
[FATAL] Failed to compile source to affine
dynamatic> write-hdl
/home/jianliu/Projects/Dynamatic_adds_on/Verilog/dynamatic/./bin/export-rtl: could not open input file '/home/jianliu/Projects/Dynamatic_adds_on/Verilog/dynamatic/integration-test/fir/out/comp/hw.mlir': No such file or directory
[FATAL] Failed to export RTL (vhdl)
dynamatic> simulate
I just resolved the conflicts, but I still have some problems with the Verilog generation flow.
Anything I should look at? Do you want to send me steps to reproduce?
Besides that, I noticed a problem. When testing the fir.dyn script, I got the following errors:
This seems like an issue with the Polygeist path. Did you check that the compile script's Polygeist include folder path is pointing to a correct location?
I just resolved the conflicts, but I still have some problems with the Verilog generation flow.
Anything I should look at? Do you want to send me steps to reproduce?
Besides that, I noticed a problem. When testing the fir.dyn script, I got the following errors:
This seems like an issue with the Polygeist path. Did you check that the compile script's Polygeist include folder path is pointing to a correct location?
Thank you! =D I have solved the Verilog generation problem, will let you know if I find anything weird.
Now it looks good on my side, please let me know if anything else needs to be changed =D
All good on my side! Thanks so much for the huge contribution and apologies for the constant changes of everything :sweat_smile:
This pull request adds the following things:
experimental/data/verilog
. Allmodule_name
,ports_name
, andfile_name
are kept the same.rtl-config-verilog.json
file that contains all the configuration info for Verilog implementations.write_hdl.sh
script to select config file based on the hdl specified by the user.export-rtl
to satisfy Verilog syntax.rtl-cmpi-generator.cpp
to support Verilog syntax when generatingcmpi
unit for Verilog.The results for regression_test are the same as the VHDL backend. Details can be found here: Link.