Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - have some problems with Lookup Table..

 
Thread Tools Search this Thread
Old 08-28-2006, 09:33 AM   #1
Default have some problems with Lookup Table..


I need help with generating sine signal(1Hz) by lookup table as a core
(Single Port Block-Ram).

I can use D/A 8-10 bits, baudrate of 10KHz.
I working with XILINX VIRTEX-4 developing environment

wondering if someone can give some suggestions how it can be done.

THANKS in advance!
Michael.



MiP
  Reply With Quote
Old 08-28-2006, 12:07 PM   #2
Niv
 
Posts: n/a
Default Re: have some problems with Lookup Table..

MiP wrote:
> I need help with generating sine signal(1Hz) by lookup table as a core
> (Single Port Block-Ram).
>
> I can use D/A 8-10 bits, baudrate of 10KHz.
> I working with XILINX VIRTEX-4 developing environment
>
> wondering if someone can give some suggestions how it can be done.
>
> THANKS in advance!
> Michael.


If you're using a lookup table of say 10 bits, that's only 1024
entries, fairly small.
Assumingthe output is to a DAC, you only need to lookup 0 to 90
degrees;
you then start at address 0, increment address up to 1023, then back to
0 then flip the (extra) msb sign bit to the DAC and repeat. e.g. 0-90
& 90-180 are +ve, 180-270 & 270-360 are -ve sines.

Also, you could use CORDIC (I've just beem inroduced to them myself)
Xilinx do a free cordic in corgen, so might be useful, assuming you
have a faster clock to do the cordic calcs.



Niv
  Reply With Quote
Old 08-29-2006, 07:58 AM   #3
MiP
 
Posts: n/a
Default Re: have some problems with Lookup Table..
> If you're using a lookup table of say 10 bits, that's only 1024
> entries, fairly small.
> Assumingthe output is to a DAC, you only need to lookup 0 to 90
> degrees;
> you then start at address 0, increment address up to 1023, then back to
> 0 then flip the (extra) msb sign bit to the DAC and repeat. e.g. 0-90
> & 90-180 are +ve, 180-270 & 270-360 are -ve sines.
>
> Also, you could use CORDIC (I've just beem inroduced to them myself)
> Xilinx do a free cordic in corgen, so might be useful, assuming you
> have a faster clock to do the cordic calcs.


Sorry but I didn't understand you clearly what do you mean.
May I get an example of this implementation?

Again thanks a lot
for support.



MiP
  Reply With Quote
Old 08-29-2006, 08:15 AM   #4
Niv
 
Posts: n/a
Default Re: have some problems with Lookup Table..

MiP wrote:
> > If you're using a lookup table of say 10 bits, that's only 1024
> > entries, fairly small.
> > Assumingthe output is to a DAC, you only need to lookup 0 to 90
> > degrees;
> > you then start at address 0, increment address up to 1023, then back to
> > 0 then flip the (extra) msb sign bit to the DAC and repeat. e.g. 0-90
> > & 90-180 are +ve, 180-270 & 270-360 are -ve sines.
> >
> > Also, you could use CORDIC (I've just beem inroduced to them myself)
> > Xilinx do a free cordic in corgen, so might be useful, assuming you
> > have a faster clock to do the cordic calcs.

>
> Sorry but I didn't understand you clearly what do you mean.
> May I get an example of this implementation?
>
> Again thanks a lot
> for support.


Sin(0) = 0 or ~ 0000000000 for 10 bit lookup table (LUT)
Sin(90) = 1 or ~ 1111111111 for 10 bit LUT.
Sin (30) = 0.5 or ~ 1000000000 for 10 bit LUT
Sin (75) = 0.9659 or ~ 1111011101 for LUT

e.g. calculate sin(x), answer will be between 0 & 1.
multiply by 2 to power 'N', for N bits, so times 1024 for your 10 bit
example.

Now put all the binary values into your lookup table (Xilinx block
ram).
Index through the LUT addresses with a bottom 10 bits of a 12 bit
counter.
bit(10) is used to invert the addresses to the LUT.
bit(11) is used as a sign bit to the DAC, so if 0 then o/p is +ve & if
1 then o/p is -ve.



Niv
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Pioneer DVR-105 and Nero Problems grams@oldtown.com DVD Video 1 08-12-2003 04:17 AM
Re: Pioneer DVR-105 and Nero Problems Ron DVD Video 1 08-08-2003 06:33 PM
Re: Pioneer DVR-105 and Nero Problems Flossie DVD Video 0 08-07-2003 02:25 PM
Re: Pioneer DVR-105 and Nero Problems Flossie DVD Video 0 08-07-2003 08:11 AM
Re: Pioneer DVR-105 and Nero Problems CAM DVD Video 0 08-07-2003 02:30 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46