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

Reply

VHDL - regarding look up table

 
Thread Tools Search this Thread
Old 01-08-2006, 09:51 AM   #1
Default regarding look up table


hi im krishna kishore im a student ,

i want to design a digital phase locked loop , in that first step is
the generation of reference sine wave. So that can be generated by look
up table. i couldnot able write look up table perfectly , if any body
can help me with an exampl plz i will be very much great full to them
thank u
regards
krishna



onkarkk@gmail.com
  Reply With Quote
Old 01-10-2006, 11:28 AM   #2
charles.elias@wpafb.af.mil
 
Posts: n/a
Default Re: regarding look up table

wrote:
> hi im krishna kishore im a student ,
>
> i want to design a digital phase locked loop , in that first step is
> the generation of reference sine wave. So that can be generated by look
> up table. i couldnot able write look up table perfectly , if any body
> can help me with an exampl plz i will be very much great full to them
> thank u
> regards
> krishna


One way of coding a lookup table is as an array. The elements of the
array are the table contents. In your case the array index could be
degrees or radians and the elements would be corresponding values of
the sine function.

Charles



charles.elias@wpafb.af.mil
  Reply With Quote
Old 01-10-2006, 05:09 PM   #3
Duane Clark
 
Posts: n/a
Default Re: regarding look up table
wrote:
> hi im krishna kishore im a student ,
>
> i want to design a digital phase locked loop , in that first step is
> the generation of reference sine wave. So that can be generated by look
> up table. i couldnot able write look up table perfectly , if any body
> can help me with an exampl plz i will be very much great full to them


In a similar situations, I write a C program that generates the lookup
table. Of course, that assumes you are comfortable with C. Is that a
route you are interested in? I write the C to directly generate a VHDL
package file. It is quite a bit of effort up front for the first one,
but it eliminates errors from hand entry of tables, and is very easy to
modify. For example, this snippet:

for (i=0; i<16; i++) {
printf("\n constant GFM_INIT_%02x : bit_vector(255
downto 0)\n := X\"", i);
for (j=31; j>=0; j--) {
gfaddr = i*16 + j/2;
gfresult = 0;
for (k=0; k<8; k++) {
gfbit = 0x80 >> k;
if (j%2 == 1)
gfxor = gfaddr & malpha[7-k];
else
gfxor = gfaddr & malpha6[7-k];
for (l=0; l<8; l++) {
if (gfxor & 1)
gfresult ^= gfbit;
gfxor = gfxor >> 1;
}
}
printf("%02X", gfresult);
}
printf("\";");
}
printf("\n");
}


outputs this:

constant GFM_INIT_00 : bit_vector(255 downto 0)
:= X"1BCE9B8E9C4E1C0E9249120915C995898E470E0709C78987 07C0878080400000";
constant GFM_INIT_01 : bit_vector(255 downto 0)
:= X"B65B361B31DBB19B3FDCBF9CB85C381C23D2A392A4522412 AA552A152DD5AD95";
....

Then that can be used to initialize a block ROM:

rom_d: RAMB4_S16
generic map(
INIT_00 => GFM_INIT_00,
INIT_01 => GFM_INIT_01,


Duane Clark
  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
Look Up Table In VHDL cienhui General Help Related Topics 0 10-22-2008 05:35 PM
changing Crystal report table at run time rakesh201180 Software 1 10-22-2008 10:58 AM
High-Def Playback: The Firmware Gotcha Ablang DVD Video 46 07-28-2007 07:25 AM
Uploading Excel file into sql table shalim Software 1 10-31-2006 08:57 AM
How to store dataset to a table in the database. Please be specific. Urgent fullblown General Help Related Topics 0 09-20-2006 03:55 PM




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