12-10-2020, 11:14 AM (This post was last modified: 12-10-2020, 11:16 AM by andrea.spitale.)
Hi there!
I'm posting here as I am having some trouble with setting up PULPissimo to be behaviourally simulated (i.e. pre synthesis) on Vivado. In order to do so, I've cloned the PULPissimo repository, then run the update ips script and finally loaded all files from ips and rtl folders into vivado project. I'll list the issues I've encountered, together with vivado logs describing the errors and warning the software detected, considering I am running a fully licensed 2020.2 version under Linux.
1) i've a huge issue with "include" files, that is the files referred by `include directives. The vivado log referring to this issue is the one named "vivado_include.log".
1.1) Initially I managed to fix some of these errors by adding the paths to the folders containing those files in "Verilog Include Files Search Paths", which is a setting that can be found by going through Project Manager -> Settings -> General(and Simulation) -> Verilog Options, but this means adding one path for every "include" error the compiler detects, so it requires a lot of work. Moreover it doesn't seem to be always working, as it didn't fix the problem when I created a new project and the log content was the same as "vivado_include.log".
2) I created another project, this time copying and including all .sv, .svh, .v files from ips and rtl PULPissimo folders, so all files are in the same folder. I had to modify the `include directives of "fpnew" IP files in order to have correct `include paths. Moreover I had to comment out the "`ifdef synthesis" directive in hwpe_ctrl_interfaces.sv, as the compiler was not able to recognize "timeunit" and "timeprecision" keywords, although it should. Then, using xilinx related scripts inside "fpga/zcu102" folder as a guideline, I created the Xilinx IPs PULPissimo requires, that is two BRAMs and two clock generators, named xilinx_clk_mngr, xilinx_slow_clk_mngr, xilinx_private_ram and xilinx_interleaved_ram. Once I ran the behavioural simulation process, the compile phase went fine, but then the elaborate one was stopped with errors listed in "vivado_elaborate.log" file. I have to say I also read some warnings during compile phase, which details are again listed in "vivado_elaborate.log".
3) I created a new project, importing all files from ip and rtl folders. I've set some of the files referred by `include directives as "verilog header" from the files properties. Then I copied the registers.svh file inside "common_cells" folder of FPNEW ip, as the compiler was not able to find it. Moreover I had to comment out the "`ifdef synthesis" directive in hwpe_ctrl_interfaces.sv. However I still encountered errors after running behavioural simulation process, one of them referring to file riscv_alu.sv, with compiler indicating that "riscv_defines" packanot being declared.ge has not been declared. The log of this operation is inside "vivado_third_attempt.log".
All .log files are inside the attached "vivado_error_logs.zip" file.
Hope everything is clear. Thank you for your time!
(12-10-2020, 11:14 AM)andrea.spitale Wrote: Hi there!
I'm posting here as I am having some trouble with setting up PULPissimo to be behaviourally simulated (i.e. pre synthesis) on Vivado. In order to do so, I've cloned the PULPissimo repository, then run the update ips script and finally loaded all files from ips and rtl folders into vivado project. I'll list the issues I've encountered, together with vivado logs describing the errors and warning the software detected, considering I am running a fully licensed 2020.2 version under Linux.
1) i've a huge issue with "include" files, that is the files referred by `include directives. The vivado log referring to this issue is the one named "vivado_include.log".
1.1) Initially I managed to fix some of these errors by adding the paths to the folders containing those files in "Verilog Include Files Search Paths", which is a setting that can be found by going through Project Manager -> Settings -> General(and Simulation) -> Verilog Options, but this means adding one path for every "include" error the compiler detects, so it requires a lot of work. Moreover it doesn't seem to be always working, as it didn't fix the problem when I created a new project and the log content was the same as "vivado_include.log".
2) I created another project, this time copying and including all .sv, .svh, .v files from ips and rtl PULPissimo folders, so all files are in the same folder. I had to modify the `include directives of "fpnew" IP files in order to have correct `include paths. Moreover I had to comment out the "`ifdef synthesis" directive in hwpe_ctrl_interfaces.sv, as the compiler was not able to recognize "timeunit" and "timeprecision" keywords, although it should. Then, using xilinx related scripts inside "fpga/zcu102" folder as a guideline, I created the Xilinx IPs PULPissimo requires, that is two BRAMs and two clock generators, named xilinx_clk_mngr, xilinx_slow_clk_mngr, xilinx_private_ram and xilinx_interleaved_ram. Once I ran the behavioural simulation process, the compile phase went fine, but then the elaborate one was stopped with errors listed in "vivado_elaborate.log" file. I have to say I also read some warnings during compile phase, which details are again listed in "vivado_elaborate.log".
3) I created a new project, importing all files from ip and rtl folders. I've set some of the files referred by `include directives as "verilog header" from the files properties. Then I copied the registers.svh file inside "common_cells" folder of FPNEW ip, as the compiler was not able to find it. Moreover I had to comment out the "`ifdef synthesis" directive in hwpe_ctrl_interfaces.sv. However I still encountered errors after running behavioural simulation process, one of them referring to file riscv_alu.sv, with compiler indicating that "riscv_defines" packanot being declared.ge has not been declared. The log of this operation is inside "vivado_third_attempt.log".
All .log files are inside the attached "vivado_error_logs.zip" file.
Hope everything is clear. Thank you for your time!
Hi Andrea,
There are already working FPGA ports for many FPGA boards availabe in the repository. Instead of trying to manually add all files to the projects, you should do it the same way as the existing ports handle this: They source a couple of autogenerated (as a side-effect of ./update-ips or ./generate-scripts) tcl scripts in fpga/pulpissimo/tcl that contain the correct paths and include paths for the whole project. Trying to do this manually is extremely error-prone and should be avoided. If your goal is to port PULPissimo to a new fpga board I would suggest you to copy one of the existing board specific subdirectories in the fpga folder (e.g. pulpissimo-genesys2) and start from there. However, I never tried to simulate the RTL with Vivado since we normally use a dedicated RTL simulator (Mentor Questasim) to do this. So if we really want to use Vivado for simulation you will have to modify the existing scripts to also add some testbench environment to vivado. The relevant verification source code we usually use with Questasim you can find in rtl/tb. However, I have some doubts that this code will work in Vivado straight out-of-the-box so you probably have to manually modify a couple of things.
12-10-2020, 03:41 PM (This post was last modified: 12-10-2020, 03:42 PM by andrea.spitale.)
Hi Manuel,
thank you for your response. Ye, I didn't see there were scripts for the ZCU 102 board, my bad. So I used the provided makefile, but I get the following errors in vivado as soon as the process seems to finish:
Code:
ERROR: [Synth 8-1587] an enum variable may only be assigned to same enum typed variable or one of its values [/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv:445]
INFO: [Synth 8-2350] module riscv_ex_stage ignored due to previous errors [/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv:40]
Failed to read verilog '/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv'
2 Infos, 8 Warnings, 0 Critical Warnings and 2 Errors encountered.
synth_design failed
ERROR: [Vivado_Tcl 4-5] Elaboration failed - please see the console for details
(12-10-2020, 03:41 PM)andrea.spitale Wrote: Hi Manuel,
thank you for your response. Ye, I didn't see there were scripts for the ZCU 102 board, my bad. So I used the provided makefile, but I get the following errors in vivado as soon as the process seems to finish:
Code:
ERROR: [Synth 8-1587] an enum variable may only be assigned to same enum typed variable or one of its values [/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv:445]
INFO: [Synth 8-2350] module riscv_ex_stage ignored due to previous errors [/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv:40]
Failed to read verilog '/home/spitale/PULPissimo_git/ips/riscv/rtl/riscv_ex_stage.sv'
2 Infos, 8 Warnings, 0 Critical Warnings and 2 Errors encountered.
synth_design failed
ERROR: [Vivado_Tcl 4-5] Elaboration failed - please see the console for details
01-06-2021, 03:58 PM (This post was last modified: 01-06-2021, 04:00 PM by LarsKeuninckx.
Edit Reason: typo
)
I found a way around this, but it is messy and not sure what other problems this causes. In the offending file pulpissimo/ips/riscv/rtl/riscv_ex_stage.sv, change line 445 from:
'{default: C_DIV}, // DIVSQRT
to:
'{default: fpnew_pkg::MERGED}, // DIVSQRT
As far as I can tell (?) this is related to the instantation of the FP unit. Note that the error described above happened even when synthesis is done for the (non-FP) Ibex core, as described by taking the 'Core Selection' steps in https://github.com/pulp-platform/pulpiss...l-platform.
Possibly, the version of Vivado is causing this error. As described in the README.md, Vivado v2018.3 was used. Whereas, the error appeared for me with Vivado v2020.1.
(01-06-2021, 03:58 PM)LarsKeuninckx Wrote: I found a way around this, but it is messy and not sure what other problems this causes. In the offending file pulpissimo/ips/riscv/rtl/riscv_ex_stage.sv, change line 445 from:
'{default: C_DIV}, // DIVSQRT
to:
'{default: fpnew_pkg::MERGED}, // DIVSQRT
As far as I can tell (?) this is related to the instantation of the FP unit. Note that the error described above happened even when synthesis is done for the (non-FP) Ibex core, as described by taking the 'Core Selection' steps in https://github.com/pulp-platform/pulpiss...l-platform.
Possibly, the version of Vivado is causing this error. As described in the README.md, Vivado v2018.3 was used. Whereas, the error appeared for me with Vivado v2020.1.
Hi, Thank you for sharing your experience! I am using vivado 2020.1 as well. Did you find any other error after changing that line?
(01-06-2021, 03:58 PM)LarsKeuninckx Wrote: I found a way around this, but it is messy and not sure what other problems this causes. In the offending file pulpissimo/ips/riscv/rtl/riscv_ex_stage.sv, change line 445 from:
'{default: C_DIV}, // DIVSQRT
to:
'{default: fpnew_pkg::MERGED}, // DIVSQRT
As far as I can tell (?) this is related to the instantation of the FP unit. Note that the error described above happened even when synthesis is done for the (non-FP) Ibex core, as described by taking the 'Core Selection' steps in https://github.com/pulp-platform/pulpiss...l-platform.
Possibly, the version of Vivado is causing this error. As described in the README.md, Vivado v2018.3 was used. Whereas, the error appeared for me with Vivado v2020.1.
Hi, Thank you for sharing your experience! I am using vivado 2020.1 as well. Did you find any other error after changing that line?
You're welcome. After changing above line, it compiled without error, resulting in .bit and .bin files. Now I am trying to make it work for the Digilent ARTY-A7-100T board, as that is the board I have.