In the Quartus® II software version 11.1 when creating a testbench with Bus Functional Models (BFMs), the simulation script directs ModelSim to compile the verbosity and avalon_mm packages into a BFM library. To use these packages in your test program you must compile them into the same library as the test program. Usually this will be the work library.
Modelsim reports an error on the BFM API calls in your test program when the enumerated types defined in the avalon_mm package are used. ModelSim requires SystemVerilog packages to be compiled in only one library.
A workaround for this issue is to compile all the design code as well as thest program into the work library.
This can be accomplished by editing the msim_setup.tcl script directly or running this script from a command line:
ip-make-simscript --spd=<generated_spd_file> --compile-to-work
The ip-make-simscript executable is located in the <quartus_version>/sopc_builder/bin directory.
This issue will be addressed in the Quartus II version 12.0 software.