Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20704 Discussions

vhdl code for hamming window

Altera_Forum
Honored Contributor II
1,600 Views

plz help me to write vhdl code for hamming window.:cry:

0 Kudos
7 Replies
Altera_Forum
Honored Contributor II
828 Views

You just need LUT and multiplier(s) to scale down your target (filter coefficients, fft output ...etc). It is normally pre-applied but if you want to apply it in vhdl code then you need to think of it as a set of scale factors. You need to decide how many taps you want and how to apply them (e.g. fully parallel). 

 

To get 31 hamming set in Matlab: 

w = hamming(31); 

 

then scale up, round and insert in a LUT to be applied to target.
0 Kudos
Altera_Forum
Honored Contributor II
828 Views

thank u very much for ur reply,but sir if i generate sine-cosine lut and multiplier then call it as a function in main hamming window code then will it be possible to generate vhdl code for hamming window?:confused: 

2) sir i don't know how scale a program from matlab to vhdl. can plz give some link of referencec? thnaking you again.........:)
0 Kudos
Altera_Forum
Honored Contributor II
828 Views

Hi, 

 

I never said sin/cos LUT but LUT for your hamming figures. 

 

It will help to know what actually you are upto when referring to hamming window. A window is just a set of scale factors that usually goes up then comes down. 

It is used to modify filter response by scaling coeffs accordingly. It is also used to scale signals e.g. fft signal.  

 

Matlab can give you values for various windows in the range 0~ 1. You need to decide how many taps you want. To scale your figures onto 16 bits(16,14): 

 

winscaled = round(win*2^14/max(win)); 

 

after multiplication discard 14 LSBs from result.
0 Kudos
Altera_Forum
Honored Contributor II
828 Views

sir can u plz tell me how do i implement logarithm in vhdl???:confused:

0 Kudos
Altera_Forum
Honored Contributor II
828 Views

how cani write vhdl code for bartlett window? is the procedure is same as hamming?? plz help.:cry:

0 Kudos
Altera_Forum
Honored Contributor II
828 Views

All window types are same in principle i.e. scale factors for various signal stages. As long as they are same length then you can just replace the values of window.

0 Kudos
Altera_Forum
Honored Contributor II
828 Views

@kaz sir, 

 

thank u sir for your information.
0 Kudos
Reply