--- Quote Start ---
Hi,
I am having problems simulating a QSYS design with a DDR3 controller with UniPHY.
I try to run a simulation by running the generated msim_setup.tcl. Compilation works as expected, but when i run "elab" the loading fails:
# ** Fatal: Error occurred in protected context.# Time: 0 ps Iteration: 0 Instance: /top/mem_if_ddr3_emif_0/c0/ng0/alt_mem_ddrx_controller_top_inst/controller_inst/rdata_path_inst/gen_rdata_return_inorder/genblk1/in_order_buffer_inst File: nofile# FATAL ERROR while loading design# Error loading design
If I remove the DDR3 controller from the design it loads with no errors.
Does anyone know why this error occurs and how to avoid it?
The design is generated in Quartus II 11.0sp1 with VHDL simulation model generation selected. I am running ModelSim PE 6.6d for simulation.
--- Quote End ---
The solution: After you get this no file/error in protected context in ModelSim's transcript window, go to Modelsim's main window under Tools/Tcl/Execute Macro search for the folder named <component_name>_sim/mentor and select and run the file msim_setup.tcl. Where I have assumed your instance of the megacore is <component_name>. Then, run a .do file from the modelsim transcript which only compiles your design files (not the libraries or megafunction related files) from modelsim's transcript window. You can cut and paste it into the transcript from the bottom half of the .do which created the error in the first place including the vsim, wave and run -all lines.
Apparently, there are things in the .tcl which must be used to setup modelsim before it can load all files for a certain megacores, including certain high speed phy cores like XAUI. Actually, this is vaguely inferred from table 1-5 of Altera's "Simulating Altera Designs": in www dot altera dot com/literature/hb/qts/qts_qii53025.pdf. Unfortunately, Altera did not post it as a work-around on page 15 of www dot altera dot com/literature/rn/archives/rn_qts_110sp1.pdf, where they list this as an issue for low latency phy megafunctions with 10 Gps data paths. I had this same error for a XAUI PHY. My guess is that Altera builds their interoperability fixes with various simulation tools into their .tcl setup files for those tools. It is wise to try to use them to try and resolve these issues.