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.

Implementing an Embedded Multiplier Using VHDL

Status
Not open for further replies.

masai_mara

Advanced Member level 4
Full Member level 1
Joined
Aug 13, 2004
Messages
118
Helped
8
Reputation
14
Reaction score
2
Trophy points
1,298
Visit site
Activity points
1,426
Xilinx multipliers

Can block multipliers be inferred in xilinx from a vhdl function code in a package or module??
 

Xilinx multipliers

I don't understant the question, do you mean that you want to refer to a multiplier inside your module or package?

In that case, the answer is yes. Based on the help file of the ISE 6.3 you can use the Multi18x18 in your code as it is described here for VHDL:

Implementing an Embedded Multiplier Using VHDL
Code:
The following VHDL code demonstrates how to instantiate a Virtex-II Pro™ 18-bit X 18-bit embedded asynchronous signed multiplier.

Insert the following between the "architecture" and "begin" keywords.

component MULT18X18

port(
               A : in std_logic_vector (17 downto 0);
               B : in std_logic_vector (17 downto 0);
               P : out std_logic_vector (35 downto 0)
);

end component;

Insert the following after the 'begin' keyword

U_MULT18X18 : MULT18X18

port map (
               A => , -- insert input signal #1
               B => , -- insert input signal #2
               P => -- insert output signal
);

I don't know if this answers to your question, but if you are more specific, I maybe able to help (I have just tarted playing with my Spartan 3 board).

BR,
/Farhad
 

Re: Xilinx multipliers

I wanted to know whether I can use func mult18x18 instead of using it as a component. And similarly can I use the core gen wizard generated multiplier(chosen with zero pipelining) as a function instead of as a component. I think it should be possible as a multiplier can be pure comb logic.

thanks
 

Xilinx multipliers

HI,
You can actually make your own function and wrap it arround the component. It makes it much easier to program and read.

BR,
/Farhad
 

Re: Xilinx multipliers

Yes, you can use * to infer multiplier. If one multiplicant is a constant, some tools infer combinatorial logic.
 

Xilinx multipliers

"Infer" means to use the * operator in your HDL. It is very convenient and fast, if you pipeline carefully.

If you explicitly place a "MULT18X18", then you are instantiating, not inferring.

The HDL compiler does the inferring. If you use XST then read the XST User Guide -> HDL Coding Techniques -> Arithmetic Operations -> Multipliers.

Also read about MULT_STYLE in the Constraints Guide.
 

Re: Xilinx multipliers

farhada said:
HI,
You can actually make your own function and wrap it arround the component. It makes it much easier to program and read.

BR,
/Farhad

You mean I can instantiate a component inside a function.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top