Honor RTL_LIBRARY choice in ghdl run stage
Without this, files are elaborated in RTL_LIBRARY library, but the top
file in run stage is searched in "work" library. As result, specifying a
RTL_LIBRARY different from "work" raises errors.
@@ -68,7 +68,7 @@ results.xml: analyse $(COCOTB_LIBS) $(COCOTB_VPI_LIB)
cd $(SIM_BUILD); \
PYTHONPATH=$(LIB_DIR):$(PWD):$(PYTHONPATH) LD_LIBRARY_PATH=$(LIB_DIR):$(LD_LIBRARY_PATH) MODULE=$(MODULE) \
TESTCASE=$(TESTCASE) TOPLEVEL=$(TOPLEVEL) TOPLEVEL_LANG=$(TOPLEVEL_LANG) COCOTB_SIM=1 \
- $(CMD) -r $(GHDL_ARGS) $(TOPLEVEL) --vpi=$(LIB_DIR)/libvpi.$(LIB_EXT) $(SIM_ARGS) $(PLUSARGS)
+ $(CMD) -r $(GHDL_ARGS) --work=$(RTL_LIBRARY) $(TOPLEVEL) --vpi=$(LIB_DIR)/libvpi.$(LIB_EXT) $(SIM_ARGS) $(PLUSARGS)
clean::
-@rm -rf $(SIM_BUILD)
