Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17249 Discussions

16 bit vhdl multiplication

Altera_Forum
Honored Contributor II
6,846 Views

I am doing my engineering project based on 16-bit FIXED POINT ARITHMETIC USING VHDL,so i need a VHDL code for 16 bit vhdl binary multiplication..? 

please anyone post me the vhdl code for the above topic..,
0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
3,848 Views

Here you go: 

 

signal a : unsigned(31 downto 0); signal b,c : unsigned(15 downto 0); a <= b *c;
0 Kudos
Altera_Forum
Honored Contributor II
3,848 Views

sir can you please post the full program for 16 BIT MULTIPLICATION IN VHDL, i find it tough creating the code comparing to verilog ..please sir ..i am eagerly waiting for your post ..,need to complete this task as early as possible,

0 Kudos
Altera_Forum
Honored Contributor II
3,849 Views

This is the full program. the * operator is a perfectly valid way of doing a multiplication in VHDL.

0 Kudos
Altera_Forum
Honored Contributor II
3,849 Views

here you go - a 16 bit multiplier module: 

 

library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; entity mult_16 is port ( a,b : in unsigned(15 downto 0); c : out unsigned(31 downto 0) ); end entity mult_16 architecture rtl of mult_16 is begin c <= a * b; end architecture rtl;
0 Kudos
Altera_Forum
Honored Contributor II
3,849 Views

sir the one you hav posted is a simple code..,i expect a 16 bit BINARY MULTIPLICATION code..,plzz help me sir

0 Kudos
Altera_Forum
Honored Contributor II
3,849 Views

But this code does do 16 bit multiplication. Why would I do anything else? Its worked fine for me for over 8 years (and for many other people for many years before that).

0 Kudos
Altera_Forum
Honored Contributor II
3,849 Views

@pop parithi - I'm only a VHDL newbie but I assure you that the answer really is as simple as shown above. 

 

Two 16 bit unsigned values, "b" and "c", are multiplied and stored into a 32 bit unsigned value, "a".  

 

Perhaps if you could explain what it is that you believe is missing from the answers above, the Gurus could help you further. Is it that the values are defined as integers, and you are looking for fixed point reals? If so, some lateral thinking and your favourite search engine might be useful.
0 Kudos
Reply