Forum Discussion

PVanL's avatar
PVanL
Icon for Occasional Contributor rankOccasional Contributor
6 years ago

(vlog-13006) Could not find the package (avalon_mm_pkg). See line 32, 33 in Transcript Code generated by modelsim. Where can i find this avalon_mm_pkg.sv code, and where should i put it? Thanks, PVanL

i built a PHY for the cyclone10GX. I now want to connect the LL 10G MAC to it, and as test now trying to run the alt_em_10g32_EXAMPLE_DESIGN generated by QUARTUS version 18.0.0 build 219 04/24/2018 SJ Pro Edition with Cyclone10GX libraries. Modelsim version starter edition 10.6C, revision 2017.07.

I managed to get the msim_setup.tcl script running, until i face the following issue : when it compiles avalon_driver.sv, in line 66 it wants to import avalon_mm_pkg, but this file does not exist.

Modelsim reports (after compiling a lot of cyclone stuff)

# Top level modules: 
# End time: 18:02:38 on Jun 25,2019, Elapsed time: 0:00:08 
# Errors: 0, Warnings: 584 
# Model Technology ModelSim - Intel FPGA Edition vlog 10.6c Compiler 2017.07 Jul 26 2017 
# Start time: 18:02:38 on Jun 25,2019 
# vlog -reportprogress 300 C:/intelfpga_pro/18.0/quartus/eda/sim_lib/cyclone10gx_hip_atoms.v -work cyclone10gx_hip_ver  
# -- Compiling module cyclone10gx_hssi_gen3_x8_pcie_hip 
# -- Compiling module twentynm_hssi_gen3_x8_pcie_hip 
#  
# Top level modules:
#   cyclone10gx_hssi_gen3_x8_pcie_hip 
#   twentynm_hssi_gen3_x8_pcie_hip 
# End time: 18:02:38 on Jun 25,2019, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# [exec] com 
# Model Technology ModelSim - Intel FPGA Edition vlog 10.6c Compiler 2017.07 Jul 26 2017 
# Start time: 18:02:38 on Jun 25,2019 
# vlog -reportprogress 300 -sv ../../../rtl/phy/altera_eth_10gbaser_phyaltera_xcvr_native_a10_180/sim/altera_xcvr_native_a10_functions_h.sv -work altera_common_sv_packages  
# -- Compiling package altera_xcvr_native_a10_functions_h 
#  
# Top level modules: 
#   --none-- 
# End time: 18:02:38 on Jun 25,2019, Elapsed time: 0:00:00 
# Errors: 0, Warnings: 0 
# Model Technology ModelSim - Intel FPGA Edition vlog 10.6c Compiler 2017.07 Jul 26 2017 
# Start time: 18:02:38 on Jun 25,2019 
# vlog -reportprogress 300 -sv "+incdir+../models" ../models/tb_top.sv  
# -- Compiling package eth_register_map_params_pkg 
# -- Compiling package avalon_if_params_pkt 
# -- Compiling module avalon_bfm_wrapper 
# -- Importing package avalon_if_params_pkt 
# ** Error: ** while parsing file included at ../models/tb_top.sv(19) 
# ** at ../models/avalon_driver.sv(66): (vlog-13006) Could not find the package (avalon_mm_pkg). Design read will continue, but expect a cascade of errors after this failure. Furthermore if you experience a vopt-7 error immediately before this error then please check the package names or the library search paths on the command line. 
# End time: 18:02:39 on Jun 25,2019, Elapsed time: 0:00:01 
# Errors: 1, Warnings: 0 
# ** Error: C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed. 
# Error in macro ./mentor.do line 25 
# C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed. 
#    while executing 
# "vlog -sv  {+incdir+../models} "../models/tb_top.sv" " 
#    ("eval" body line 1) 
#    invoked from within 
# "eval $file" 
#    ("foreach" body line 2) 
#    invoked from within 
# "foreach file $design_files { 
#    eval $file 
#  }" 
#    ("eval" body line 13) 
#    invoked from within 
# "com"

I then found in Quartus II software 11.1 release notes (2011!) the following:

Simulating an Avalon MM master or slave BFM with msim_setup.tcl in ModelSim leads to errors

Description

If you attempt to simulate an Altera Avalon Memory-Mapped (MM) Master bus functional model (BFM), or an Altera Avalon MM Slave BFM using the generated Model-

Sim script msim_setup.tcl, ModelSim may issue error messages similar to the following:

Error: test_module.sv(2): Could not find the package (avalon_mm_pkg).

Error: (vsim-8386) ./test_module.sv(75): An enum variable may only be assigned the same enum typed variable or one of its values.

Workaround

Perform one to the following steps:

• At a command prompt, run “ip-make-simscript --spd=<generated_spd_file>

--compile-to-work” to regenerate the ModelSim simulation script that compiles

all component into a single work library, or

• Manually modify the msim_setup.tcl script to compile all files into a single work

library.

i tried to follow this, but don't have a clue what i am doing....

“ip-make-simscript --spd=avalon_mm_pkg --compile-to-work”

# invalid command name "“ip-make-simscript"

do ip-make-simscript --spd=avalon_mm_pkg --compile-to-work

# Cannot open macro file: ip-make-simscript

3 Replies

  • PVanL's avatar
    PVanL
    Icon for Occasional Contributor rankOccasional Contributor

    How do I edit my own question?

    I found an avalon_mm_pkg.sv.

    I added avalon_mm_pkg.sv to EXAMPLE/simulation/ed_sim/models, where the other verilog code is located. (avalon_various.sv, eth_various.sv, default_test_params_pkg.sv and tb_top.sv)

    I added in tb_top.sv line 22 `include "avalon_mm_pkg.sv".

    I added in avalon_driver.sv line 20 `include "avalon_mm_pkg.sv".

    See code snippet 1

    Msim Transcript reports: see sode snippet 2.

    Line 8: In line 38 of avalon_mm_pkg.sv, a packet is called but not found. [encrypted]. There is no vopt-7 error.

    Line 10: As a result of course, the avalon_driver cannot import the avalon_mm_pkg parameters @ Line 67 import avalon_mm_pkg::*;

    Please advice

    In tb_top.sv
    18 `include "eth_register_map_params_pkg.sv"
    19 `include "avalon_driver.sv"
    20 `include "avalon_st_eth_packet_monitor.sv"
    21 `include "default_test_params_pkg.sv"
    22 `include "avalon_mm_pkg.sv"  //NEW added by pieter
     
    In avalon_driver.sv
    17`include "avalon_if_params_pkg.sv"
    18 `include "avalon_bfm_wrapper.sv"
    19 `include "eth_mac_frame.sv"
    20 `include "avalon_mm_pkg.sv" //NEW added by pieter
    # vlog -reportprogress 300 -sv "+incdir+../models" ../models/tb_top.sv 
    # -- Compiling package eth_register_map_params_pkg
    # -- Compiling package avalon_if_params_pkt
    # -- Compiling module avalon_bfm_wrapper
    # -- Importing package avalon_if_params_pkt
    # ** Error: ** while parsing file included at ../models/tb_top.sv(19)
    # ** while parsing file included at ../models/avalon_driver.sv(20)
    # ** at ../models/avalon_mm_pkg.sv(38): (vlog-13006) Could not find the package (<protected>).  Design read will continue, but expect a cascade of errors after this failure.  Furthermore if you experience a vopt-7 error immediately before this error then please check the package names or the library search paths on the command line.
    # ** Error: ** while parsing file included at ../models/tb_top.sv(19)
    # ** at ../models/avalon_driver.sv(67): (vlog-13006) Could not find the package (avalon_mm_pkg).  Design read will continue, but expect a cascade of errors after this failure.  Furthermore if you experience a vopt-7 error immediately before this error then please check the package names or the library search paths on the command line.
    # End time: 12:42:59 on Jun 26,2019, Elapsed time: 0:00:01
    # Errors: 4, Warnings: 0
    # ** Error: C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed.
    # Error in macro ./mentor.do line 25
    # C:/intelFPGA_pro/18.0/modelsim_ase/win32aloem/vlog failed.
    #     while executing
    # "vlog -sv   {+incdir+../models} "../models/tb_top.sv"  "
    #     ("eval" body line 1)
    #     invoked from within
    # "eval $file"
    #     ("foreach" body line 2)
    #     invoked from within
    # "foreach file $design_files {
    #     eval $file
    #   }"
    #     ("eval" body line 13)
    #     invoked from within
    # "com"
    • Shubhall's avatar
      Shubhall
      Icon for New Contributor rankNew Contributor

      Hi,

      I was facing the similar problem and here is the solution -

      1. Add avalon_mm_pkg.sv and verbosity_pkg.sv in the model folder where tb_top.sv is located.

      2. Compile the verbosity_pkg.sv using the command "vlog -reportprogress 300 -sv "+incdir+../../models" ../../models/verbosity_pkg.sv" .

      3. Now compile avalon_mm_pkg.sv using "vlog -reportprogress 300 -sv "+incdir+../../models" ../../models/avalon_mm_pkg.sv" .

      4. Compile the tb_top.sv file " vlog -reportprogress 300 -sv "+incdir+../../models" ../../models/tb_top.sv".

      5. Now try running again using ld_debug.

      Foe me it solved using these steps. I was using Questa (Quartus prime 22.2).

      Thank you

  • Hi Pieter,

    Apologize for idle for a while, has the issue solved? Do you need my help with your inquiry?