Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

how to compile a package in quartusII

Altera_Forum
Honored Contributor II
1,637 Views

Hi, 

I want to build a project named "adder". And I would like to use two of my previous projects to built it,which I have been compiled before. Here I assumed the two named "h_adder.vhd" and "or_2.vhd". Then a problem comes to me. How to create a package using these two projects?And then how to add this package into my "adder" project? Need I compile the package? 

Tks for replying 

P.E.
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
961 Views

You have to build a new project named "adder". You can use the New Project Wizard and follow the hints. I suggest you to use a folder named "adder" and put the vhd files in this folder. 

During the new project wizard you have to add all the vhdl files in the file list. 

Then you have to create a top-level design file (can be a bdf schematic or a top-level vhdl file) which will specify the connections between the two modules that you have designed before. 

After that you will have to compile the new project "adder" and you will have the desired result.
0 Kudos
Altera_Forum
Honored Contributor II
961 Views

Logic from external sources can be used in a package only, if it's a VHDL subprogram, either procedure or function. Component code has to be added to the project as VHDL source.

0 Kudos
Altera_Forum
Honored Contributor II
961 Views

 

--- Quote Start ---  

You have to build a new project named "adder". You can use the New Project Wizard and follow the hints. I suggest you to use a folder named "adder" and put the vhd files in this folder. 

During the new project wizard you have to add all the vhdl files in the file list. 

Then you have to create a top-level design file (can be a bdf schematic or a top-level vhdl file) which will specify the connections between the two modules that you have designed before. 

After that you will have to compile the new project "adder" and you will have the desired result. 

--- Quote End ---  

 

Tks for your reply.I think I can get your idea.However,I would like to use a package to specify the connections between the two rather than a top-level design file.If that,what I need to do is just to state the package in my design file. 

So,could tell me how to create a package,specify the connection in the package,compile it and then make use of it in my file. 

Tks.
0 Kudos
Altera_Forum
Honored Contributor II
961 Views

You may have a look at 

http://www.gexin.com.cn/uploadfile/document2007620132345.pdf 

there are many examples on packages creation. I hope it is a good guide to help you in your job.
0 Kudos
Altera_Forum
Honored Contributor II
961 Views

If your files "h_adder.vhd" and "or_2.vhd" contain components then, as FvM says, they cannot be included in a package. 

 

You cannot use a package to specify connections between components, you must use a VHDL source file component
0 Kudos
Altera_Forum
Honored Contributor II
961 Views

Thank you for your help. 

The problem has been solved.
0 Kudos
Reply