have some problems with Lookup Table..

Discussion in 'VHDL' started by MiP, Aug 28, 2006.

  1. MiP

    MiP Guest

    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, Aug 28, 2006
    #1
    1. Advertisements

  2. MiP

    Niv Guest

    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, Aug 28, 2006
    #2
    1. Advertisements

  3. MiP

    MiP Guest

    > 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, Aug 29, 2006
    #3
  4. MiP

    Niv Guest

    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, Aug 29, 2006
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    2
    Views:
    1,786
    Tommy
    Feb 13, 2004
  2. takashi
    Replies:
    1
    Views:
    574
    =?iso-8859-1?Q?Andr=E9_P=F6nitz?=
    Aug 29, 2003
  3. Vamshi

    I have some Problems.

    Vamshi, Jul 24, 2004, in forum: C Programming
    Replies:
    2
    Views:
    433
    -berlin.de
    Jul 24, 2004
  4. dolphin
    Replies:
    3
    Views:
    493
    rossum
    Mar 9, 2007
  5. Replies:
    1
    Views:
    383
    Manish Pandit
    Jul 8, 2007
  6. Jeremy
    Replies:
    2
    Views:
    478
    Jeremy
    Nov 27, 2007
  7. Replies:
    2
    Views:
    381
    Patricia Shanahan
    Jan 1, 2008
  8. Rhydian
    Replies:
    0
    Views:
    1,240
    Rhydian
    Jul 27, 2010
Loading...