Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > regarding look up table

Reply
Thread Tools

regarding look up table

 
 
onkarkk@gmail.com
Guest
Posts: n/a
 
      01-08-2006
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

 
Reply With Quote
 
 
 
 
charles.elias@wpafb.af.mil
Guest
Posts: n/a
 
      01-10-2006

http://www.velocityreviews.com/forums/(E-Mail Removed) 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

 
Reply With Quote
 
 
 
 
Duane Clark
Guest
Posts: n/a
 
      01-10-2006
(E-Mail Removed) 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,
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use a look-ahead and a look-behind at the same time? dan.j.weber@gmail.com Perl Misc 4 04-09-2008 10:25 PM
CSS table don't look like html TABLE vitay HTML 8 11-09-2006 05:56 PM
Why do look-ahead and look-behind have to be fixed-width patterns? inhahe Python 3 01-28-2005 12:50 PM
<tr> with a 1x1 image as a filler on a table with padding of 2 look thicker in netscape but they look ok in IE. Serial # 19781010 HTML 1 08-10-2003 09:05 PM



Advertisments