L.Adham
L.Adham

Reputation: 35

How to Compile VHDL Package

I am writing a code that is using an external package, but it is not finding the Types that i have declared in the package.

I've tried adding the package as a file using the import wizard and tried adding it as a library. No error is happening on the package name but on the instruction where i use the type declared in the package.

USE X.ALL;

ENTITY Y IS
PORT (I : IN packagetype;
O : OUT packagetype);
END Y;

ARCHITECTURE ArchX OF Y IS
BEGIN
O <= function(I);
END ArchX;

the following error appears: object packagetype is used but not declared

Upvotes: 0

Views: 1167

Answers (2)

user1818839
user1818839

Reputation:

If you have compiled package X into library work, then you can make it visible to a client (entity/arch or even another package) by

USE work.X.all;

Upvotes: 0

risk9283
risk9283

Reputation: 63

try to click-right on the project name, then import the package as existing source

Upvotes: 0

Related Questions