Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

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 );
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,045
Helped
2,069
Reputation
4,155
Reaction score
2,023
Trophy points
1,393
Activity points
38,828
you cannot. Entities can only be instantiated inside an architecture.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top