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.

instansiation in VHDL function

Status
Not open for further replies.

Alka Arora

Newbie level 6
Joined
Jan 30, 2009
Messages
12
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,354
Hi,

I have a multiplier in my VHDL function.Instead of using multiplier operator I want to instatiate the multiplier in a function.For example

FUNCTION xyz(xxxxxxxxxxxx)
RETURN STD_LOGIC IS
:::
:::
VARIABLE mult : STD_LOGIC_VECTOR(LENGTH DOWNTO 0);
BEGIN

I want to replace :

-- mult := x*y;

with
u_mult : mult
GENERIC MAP (
INPUT_DATA_WIDTH_A => LENGTH-1 DOWNTO 0,
INPUT_DATA_WIDTH_B => 8,
INPUT_DATA_TYPE_A => 0,
INPUT_DATA_TYPE_B => 0
)
PORT MAP (
a => x,
b => y
z => mult );
 

you cannot. Entities can only be instantiated inside an architecture.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top