Forum Discussion

AEsqu's avatar
AEsqu
Icon for Contributor rankContributor
4 years ago

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's avatar
    AEsqu
    Icon for Contributor rankContributor

    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's avatar
    AEsqu
    Icon for Contributor rankContributor

    The header file mention this:

    //-----------------------------------------------------------------------------
    // SystemVerilog (IEEE Std 1800-2012)
    //-----------------------------------------------------------------------------

    • YEan's avatar
      YEan
      Icon for Contributor rankContributor

      Hi Alex,

      Do you have any update on you problem?

      Regards,

      Ean