Skip to content

what is the number representation for sample_in and _out ? #37

Answered by vk2seb
matpalm asked this question in Q&A
Discussion options

You must be logged in to vote

For user-defined cores the representation is 14.2 fixed point by default, for 4 counts per mV. This means +8V becomes +32000 and -8V becomes -32000. The hardware actually supports a wider range than this, but this is the default configuration.

The calibrator module turns raw samples into this representation, and is basically the source of truth for this representation. See here for the implementation.

I have not tried different sample widths other than W=16 for this demo repository, but the CODEC itself is using 32-bit slots per sample (ak4619.sv), we are just clocking in the top W bits in the driver and ignoring the rest. So for different sample widths you would need to change W in the t…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vk2seb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants