Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sigma Delta ADC #2617

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

Sigma Delta ADC #2617

wants to merge 17 commits into from

Conversation

FloriaanB
Copy link

Added a Sigma Delta ADC to Clash Cores

Still TODO:

  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files

@DigitalBrains1
Copy link
Member

@kloonbot run_ci a86a4ec

Copy link
Contributor

@lmbollen lmbollen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I really like the clarity of the code + the documentation.
However, I do think we could do with less one time use functions, we could move some functionality to the respective components. I'll discuss more irl

clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
)
=> SNat n0
-- ^ ADC width
-> SNat (n0 + n1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I determine this number?

-- ^ Accumulator width
-- Has to be larger or equal to the ADC width,
-- the OSR is equal to 2^(AccumulatorWidth - ADCwidth)
-> SNat n2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I determine this number?

clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
clash-cores/src/Clash/Cores/SigmaDeltaADC.hs Outdated Show resolved Hide resolved
Comment on lines 249 to 252
-- 1. feedback to the RC network:
-- The R and C of the low pass network need to be chosen such that:
-- RC inbetween 200 and 1000 x clk, where clk is the frequency of
-- output
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this too, should be at module level or function level.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an optimal value? if so, how do we choose it?

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.

None yet

3 participants