Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can i create a user-defined package?

Status
Not open for further replies.

sora5563

Newbie level 5
Joined
Dec 13, 2006
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,402
im trying to run a package i'd created using quartus tools but when i run the compilation, an error with the following appear in the message box.

the following is the package header of simple full adder (fulladd_package.vhd):

LIBRARY ieee ;
USE ieee.std_logic_1164.all ;

PACKAGE fulladd_package IS
COMPONENT fulladd
PORT ( Cin, x, y : IN STD_LOGIC ;
s, Cout : OUT STD_LOGIC ) ;
END COMPONENT ;
END fulladd_package ;

Error information of package


Error: Top-level design entity "fulladd_package" is undefined

Error: Quartus II Analysis & Synthesis was unsuccessful. 1 error, 0 warnings

Error: Processing ended: Wed Dec 13 20:33:50 2006


The full adder is saved in different file called fulladd.vhd.
Is it i need to compile the package header first or the full adder first in this case.
What is primary unit? sorry, im new to this kind of hierarchy design.

Did someone can help me and list out the necessary steps in creating this working library?

help plz. any expert there?:cry:
[/img]
 

I think the problem is with the declaration of the package..........

you need to declare the PACKAGE AND PACKAGE BODY compulsary.........

you tried to write a function out of it..........

just go through an example related to package
 

why do you need package for? create separate entity for the fulladder and instancite into you top level of code
 

you should use a package only if you want subprograms, constant definitions and type definitions to be used throughout one or more design units
and of course the package has a body:)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top