Quartus II PLL megawizard usage confusion - Page 1
Forum section: electronics / general

author: lintweaker
author_rank: Contributor
timestamp: October 12, 2020, 03:58:18 pm
content: For a new FPGA board with a Cyclone V I wanted to make a quick project to test the board with a simple led blink via a counter and clock provided by a PLL.I've use the megawizard function before and was always able to include the created functions with the regular '...entity work.xxxx'. But for the PLL is does not want to work.Example of 16k rom generated via Megawizard, works as expected:Code:rom: entity work.rom16kport map( ....);So I created a PLL 'mypll' and tried to instantiate it:Code:mypll: entity work.mypllQuartus reports:Code:Info (12021): Found 2 design units, including 1 entities, in source file cyc5_test.vhdInfo (12022): Found design unit 1: cyc5_test-rtlInfo (12023): Found entity 1: cyc5_testInfo (12021): Found 2 design units, including 1 entities, in source file addons/pll/mypll.vhdInfo (12022): Found design unit 1: mypll-rtlInfo (12023): Found entity 1: mypllInfo (12021): Found 1 design units, including 1 entities, in source file addons/pll/mypll/mypll_0002.vInfo (12023): Found entity 1: mypll_0002Error (10481): VHDL Use Clause error at cyc5_test.vhd(27): design library "work" does not contain primary unit "mypll". Verify that the primary unit exists in the library and has been successfully compiled.Looking at the generated .qip file it seems Quartus seems to have created a 'mypll' library. I've tried various ways to use it but to no avail.What is the proper way to instantiate a Megawizard generated PLL?this is with Quartus II 18.1if I only add the generated VHDL en Verilog files to the project I can instantiate the pll via '...work.mypll' but then the Megawizard can no longer be used to change the parameters.

author: Daixiwen
author_rank: Frequent Contributor
timestamp: October 13, 2020, 06:46:24 am
content: Try to include the generated *.qip file to your project instead of the HDL file. It will automatically add the corresponding HDL files to your project and you will still be able to open it in the megawizard.

author: lintweaker
author_rank: Contributor
timestamp: October 13, 2020, 03:40:33 pm
content: Quote from: Daixiwen on October 13, 2020, 06:46:24 amThanks, I did try that but then the issue comes how to instantiate the PLL. 'work.mypll' does not work as are the various variants I tried.it seems it created a 'mypll' library (as shown in the attached pictures in my original post).It should not be that hard but...

author: Daixiwen
author_rank: Frequent Contributor
timestamp: October 14, 2020, 06:48:19 am
content: I missed that, sorry. The older versions of Quartus just put everything in "work". If there isn't an option in the megawizard to put the IP in the work library, you can use the mypll library like this:around the beginning of the file:Code:library mypll;use mypll.all;and to instantiate your pll:Code:mypll_0: entity mypll.mypll;(I tend to use different names for the instance name and the component, but using mypll for both should work too)

author: lintweaker
author_rank: Contributor
timestamp: October 15, 2020, 08:00:36 am
content: Thanks, that worked. Funny thing is, now I can still not re-launch the IP manager to adjust the parameters...