Sin table and verilog

  • Thread starter david90
  • Start date
  • #1
305
1
How do I use two 8-bit sine table to make one 16-bit sine table?

Here is my 8-bit sine table in verilog

char sintable[256]
for(int i=0;i<256;i++)
sintable=sin(2*pi*i/256)*128


I know I have to somehow use: sin(theta+ delta*theta)

theta would be the first 8-bit and delta*theta would be the last 8 bit. Combine and u get 16-bit.
 

Answers and Replies

  • #2
305
1
also, how do you convert a sine table to a cosine table? I want to instaniate a sine table module and then somehow convert it into a cosine.
 
  • #3
berkeman
Mentor
59,699
9,850
david90 said:
How do I use two 8-bit sine table to make one 16-bit sine table?
What are you trying to do? You can't make a 16-bit resolution something out of two 8-bit somethings. Two 8-bit somethings makes a 9-bit something.
 
  • #4
NateTG
Science Advisor
Homework Helper
2,450
6
Well, in radians:
[tex]\sin(\theta)=\cos(\theta-\frac{\pi}{2})[/tex]
So switching between the two isn't that hard.
Of course, you'll have to adjust that to compensate for how many tics you'll be using per quarter arc.
 

Related Threads on Sin table and verilog

  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
9
Views
6K
  • Last Post
Replies
6
Views
3K
  • Last Post
Replies
9
Views
4K
  • Last Post
Replies
2
Views
11K
  • Last Post
Replies
11
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
Top