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

Convert OrangeCrab r0.2 ADC sense to diffpair #91

Merged
merged 2 commits into from Jul 27, 2020

Conversation

@TiltMeSenpai
Copy link
Contributor

@TiltMeSenpai TiltMeSenpai commented Jul 27, 2020

The OrangeCrab ADC utilizes the comparator in the ECP5 A/B pair to do level sensing. This requires "sense_hi"/"sense_lo" to be configured as a diff pair. Consolidate "sense_hi"/"sense_lo" into a diff pair "sense".

@@ -8,6 +8,9 @@ jobs:
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
- name: Install nmigen
run: |
pip install git+https://github.com/nmigen/nmigen
Copy link
Member

@whitequark whitequark Jul 27, 2020

Choose a reason for hiding this comment

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

Please drop this commit. I'm aware the CI is red, but the problem goes beyond CI to everyone who uses nmigen-boards, so it is a genuine issue with the repo rather than just a CI omission.

Loading

Copy link
Member

@whitequark whitequark Jul 27, 2020

Choose a reason for hiding this comment

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

I think you dropped the wrong one

Loading

Copy link
Contributor Author

@TiltMeSenpai TiltMeSenpai Jul 27, 2020

Choose a reason for hiding this comment

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

Oh, that commit wasn't supposed to be here. No clue how that happened, sorry.

Loading

@@ -66,8 +66,7 @@ class OrangeCrabR0_2Platform(LatticeECP5Platform):
Resource("adc", 0,
Subsignal("ctrl", Pins("G1 F1", dir="o")),
Subsignal("mux", Pins("F4 F3 F2 H1", dir="o")),
Subsignal("sense_hi", Pins("H3", dir="i")),
Subsignal("sense_lo", Pins("G3", dir="i")),
Subsignal("sense", Pins("H3", dir="i"), Attrs(IO_TYPE="LVCMOS33D"))
Copy link
Member

@whitequark whitequark Jul 27, 2020

Choose a reason for hiding this comment

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

That's not a diffpair!

Loading

Copy link
Contributor Author

@TiltMeSenpai TiltMeSenpai Jul 27, 2020

Choose a reason for hiding this comment

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

Should the IO_TYPE be something different? In order for the ADC to work, sense_hi and sense_low need to be connected with a comparator

Loading

Copy link
Member

@whitequark whitequark Jul 27, 2020

Choose a reason for hiding this comment

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

Should be DiffPairs("H3", "G3", dir="i") at the very least. I have no special insight about IO_TYPE, that's up to the board designer mostly.

Loading

@whitequark whitequark merged commit 1a23a4d into nmigen:master Jul 27, 2020
1 check failed
Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants