# Re: VHDL and Sin

Discussion in 'VHDL' started by Oliver Mattos, Feb 3, 2011.

1. ### Oliver MattosGuest

What resolution/performance do you need?

I'd start with some kind of ROM as a lookup table. To do better than that you'll need to do lots of maths to come up with an iterative algorithm that can come up with the exact result using only basic functions (* + -).

Oliver Mattos, Feb 3, 2011

2. ### Gerhard HoffmannGuest

Am 03.02.2011 18:20, schrieb Oliver Mattos:
> What resolution/performance do you need?
>
> I'd start with some kind of ROM as a lookup table. To do better than that you'll need to do lots of maths to come up with an iterative algorithm that can come up with the exact result using only basic functions (* + -).

I just have confessed my sin at opencores.org under arith/sincos.
If you can afford the block ram/rom you can use that as a starter.
Filling the table is in a function and is done in Pascal/C style
with floats.

regards, Gerhard

btw:
Is ISE12.4 able to synthesize sfixed/ufixed or are there surprises?

Gerhard Hoffmann, Feb 8, 2011

3. ### Gerhard HoffmannGuest

Ich mach mal die Ingrid:

<http://opencores.org/project,sincos>

Gerhard Hoffmann, Feb 8, 2011
4. ### Mike TreselerGuest

On 2/8/2011 3:57 AM, Gerhard Hoffmann wrote:
> Am 03.02.2011 18:20, schrieb Oliver Mattos:
>> What resolution/performance do you need?
>>
>> I'd start with some kind of ROM as a lookup table. To do better than
>> that you'll need to do lots of maths to come up with an iterative
>> algorithm that can come up with the exact result using only basic
>> functions (* + -).

>
>
> I just have confessed my sin at opencores.org under arith/sincos.
> If you can afford the block ram/rom you can use that as a starter.
> Filling the table is in a function and is done in Pascal/C style
> with floats.

Nice example. Thanks for the link.
The opencores site is much improved since my last visit.

-- Mike Treseler

Mike Treseler, Feb 9, 2011