PUR_INST: PUR port map (PUR=>'1');
GSR_INST: GSR port map (GSR=>'1');
B. If no error due to undeclared GSR_INST and PUR_INST, the next step is to recompile simulation libraries.
The device library has to be recompiled to map it to VHDL libraries as the tool will automatically be directed to the simulation library of Verilog.
To avoid this issue, perform the following steps:
(1) Close any active Aldec Riviera/ModelSim/QuestaSim window.
(2) Locate built-in Tcl Console on Diamond Software (located on the lower left portion).
(3) Run this script into the Tcl Console: cmpl_libs -sim_path {C:/lscc/diamond/3.14/modeltech/win32loem} -device ecp5u -lang vhdl
Note: Change the device name if you are using another FPGA device.
(4) After running the script, re-run Aldec Riviera/ModelSim/QuestaSim and redo the simulation. The VHDL test bench should compile without an issue and should be able to run the simulation.