You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DDR primitives in Clash.Intel.DDR use the libraries key to generate the following line in the generated Verilog and SystemVerilog:
`uselib lib=altera_mf
These primitives currently appear to be the only case where such a uselib line is generated. But Quartus Prime Lite 23.1.1 errors out on it with text macro "uselib" is undefined:
Critical Warning (10191): Verilog HDL Compiler Directive warning at topEntity.v(16): text macro "uselib" is undefined
Error (10170): Verilog HDL syntax error at topEntity.v(16) near text: "="; expecting ".", or "(". Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number.
Error (10112): Ignored design unit "topEntity" at topEntity.v(6) due to previous errors
For Quartus to succesfully synthesise the DDR primitive in either Verilog or SystemVerilog, the uselib macro should just be omitted. However, if you want to simulate a design, the Questa Intel Starter FPGA Edition that is shipped with Quartus Prime Lite does require the uselib macro. Using a GUI-based flow, this means you need to omit the uselib line, let Quartus do Analysis & Elaboration, add the uselib line, click Tools -> Run Simulation Tool -> RTL Simulation, and simulate your design.
Fortunately, we can do better. It turns out Quartus defines a macro called ALTERA_RESERVED_QIS which is defined in Quartus but not in Questa. Therefore I suggest that when -fclash-hdlsyn Quartus is used, we generate the following instead:
The branch quartus-uselib allows to experiment with this issue. It fixes bugs in the DDR primitives (which will be part of a PR soon) and adds this proposed functionality with -fclash-hdlsyn Quartus. The following file is a reproducer with a test bench that works correctly in Questa:
The DDR primitives in
Clash.Intel.DDR
use thelibraries
key to generate the following line in the generated Verilog and SystemVerilog:`uselib lib=altera_mf
These primitives currently appear to be the only case where such a
uselib
line is generated. But Quartus Prime Lite 23.1.1 errors out on it withtext macro "uselib" is undefined
:For Quartus to succesfully synthesise the DDR primitive in either Verilog or SystemVerilog, the
uselib
macro should just be omitted. However, if you want to simulate a design, the Questa Intel Starter FPGA Edition that is shipped with Quartus Prime Lite does require theuselib
macro. Using a GUI-based flow, this means you need to omit theuselib
line, let Quartus do Analysis & Elaboration, add theuselib
line, click Tools -> Run Simulation Tool -> RTL Simulation, and simulate your design.Fortunately, we can do better. It turns out Quartus defines a macro called
ALTERA_RESERVED_QIS
which is defined in Quartus but not in Questa. Therefore I suggest that when-fclash-hdlsyn Quartus
is used, we generate the following instead:The branch quartus-uselib allows to experiment with this issue. It fixes bugs in the DDR primitives (which will be part of a PR soon) and adds this proposed functionality with
-fclash-hdlsyn Quartus
. The following file is a reproducer with a test bench that works correctly in Questa:Reproducer
The text was updated successfully, but these errors were encountered: