cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
6,499 Views
Registered: ‎03-11-2009

Block ROM

I use a ROM block, with initial value vector sin(pi(0:1799)/1800). The block works, but the output is equal for several consecutive positions, The output have only four significative values. For example if the sin in 0.000568974 the output in 0.0005690, if sin is 0.2546871 output is 0.2547.

 

Can I to configure the block output with a output with a fixed number of decimals?

 

Thanks.

 

I'm sorry for my english. 

Tags (2)
0 Kudos
Reply
2 Replies
Highlighted
Historian
Historian
6,491 Views
Registered: ‎02-25-2008

The ROMs store bits.

 

It is up to you to decide what those bits represent. You can certainly store fixed-point representations of fractional numbers in the ROM but you need to manage the binary point yourself.

 

-a

----------------------------Yes, I do this for a living.
0 Kudos
Reply
Highlighted
Teacher
Teacher
5,669 Views
Registered: ‎07-09-2009

Hi

 

I don't know your application, but can I point you at the coregen ,

 

http://www.xilinx.com/ipcenter/catalog/logicore/docs/trigtabl_v1_0.pdf

 

Not least of which, it only stores the first quadrant of the sin, all the other three quadrants are generated by reflection and inversion.

 

there is also the cordic and DDS functions that might be of use.

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Reply