Electronics > FPGA

Quartus II PLL megawizard usage confusion

(1/1)

lintweaker:
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.rom16k
port map( ....
);

--- End code ---
So I created a PLL 'mypll' and tried to instantiate it:

--- Code: ---mypll: entity work.mypll

--- End code ---
Quartus reports:

--- Code: ---Info (12021): Found 2 design units, including 1 entities, in source file cyc5_test.vhd
Info (12022): Found design unit 1: cyc5_test-rtl
Info (12023): Found entity 1: cyc5_test
Info (12021): Found 2 design units, including 1 entities, in source file addons/pll/mypll.vhd
Info (12022): Found design unit 1: mypll-rtl
Info (12023): Found entity 1: mypll
Info (12021): Found 1 design units, including 1 entities, in source file addons/pll/mypll/mypll_0002.v
Info (12023): Found entity 1: mypll_0002

Error (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.

--- End code ---
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.1
if 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.

Daixiwen:
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.

lintweaker:

--- Quote from: Daixiwen on October 13, 2020, 06:46:24 am ---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.

--- End quote ---
Thanks, 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...

Daixiwen:
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;
--- End code ---

and to instantiate your pll:

--- Code: ---mypll_0: entity mypll.mypll;
--- End code ---
(I tend to use different names for the instance name and the component, but using mypll for both should work too)

lintweaker:
Thanks, that worked. Funny thing is, now I can still not re-launch the IP manager to adjust the parameters...

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod