Forum Discussion
Quartus 21.1: Error (10170): Verilog HDL syntax error at ... near text: "import"; expecting ";".
module ethosu55_sb
import ethosu55_pkg::*;
import ethosu55_mac_pkg::*;
#(
parameter npu_config_t CFG = BUILD_CFG(0,0)
)
Gives this quartus error:
Error (10170): Verilog HDL syntax error at ethosu55_sb.sv(22) near text: "import"; expecting ";".
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.
Synplify has no problem with it.
How to solve this without changing the ARM RTL code?
Kind Regards,
Alex.
4 Replies
- AEsqu
Contributor
I dowload the related imported package using this in the .qsf:
set_global_assignment -name SYSTEMVERILOG_FILE -lib ethosu55_lib ${data}/ip_arm_lib/ip_hactar_256/ethosu55/logical/ethosu55/verilog/ethosu55_pkg.sv
set_global_assignment -name SYSTEMVERILOG_FILE -lib ethosu55_lib ${data}/ip_arm_lib/ip_hactar_256/ethosu55/logical/ethosu55_mac/verilog/ethosu55_mac_pkg.sv
And the RTL itself that contains the import (later in the qsf, not before the two previous files):
set_global_assignment -name SYSTEMVERILOG_FILE -lib ethosu55_lib ${data}/ip_arm_lib/ip_hactar_256/ethosu55/logical/ethosu55_sb/verilog/ethosu55_sb.sv
- AEsqu
Contributor
The header file mention this:
//-----------------------------------------------------------------------------
// SystemVerilog (IEEE Std 1800-2012)
//------------------------------------------------------------------------------ YEan
Contributor
Hi Alex,
Do you have any update on you problem?
Regards,
Ean
- sstrell
Super Contributor
I've never used this, but it looks like the import commands need to be inside your module (after the port list and semicolon), not in the module declaration, or completely outside the module.
https://verilogguide.readthedocs.io/en/latest/verilog/package.html