Skip to content

add cossin LUT#197

Merged
jordens merged 2 commits into
quartiq:masterfrom
matthuszagh:trig
Dec 10, 2020
Merged

add cossin LUT#197
jordens merged 2 commits into
quartiq:masterfrom
matthuszagh:trig

Conversation

@matthuszagh

@matthuszagh matthuszagh commented Dec 9, 2020

Copy link
Copy Markdown
Contributor

Implements a fast cossin computation using an 8-bit LUT. This achieves better than 0.9LSB maximum error for 16-bit output. It uses a 20-bit integer phase input and produces 18-bit integer outputs.

Considerations

  • There appears to be a small phase offset/bias since the error produces an oscillatory pattern. However, the performance/accuracy appear to be good enough so this shouldn't present a problem. A plot of the error values as a function of phase is shown below.

err

  • It may make sense to make shift_round integer-generic. I believe the easiest way to do this would be to add a dependency on num.

Related

@jordens
jordens merged commit e592273 into quartiq:master Dec 10, 2020
@matthuszagh
matthuszagh deleted the trig branch December 10, 2020 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants