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

[DRAFT] Allow PULLUP=1 as a valid int attr value to re-enable yosys 0.9 #188

Closed
wants to merge 1 commit into from

Conversation

ret
Copy link
Contributor

@ret ret commented Aug 30, 2019

I'm having trouble getting the iCEBreaker UART to work with yosys 0.9 (PULLUP="1" causes downstream issue). See this brief thread for the discussion with @daveshah1 for context. Specifically, I'm trying to change the PULLUP="1" to a numeric PULLUP=1 in the nmigen-board definition.
Easy. But, unless I make the associated change to how nMigen handles Attrs (this pull request proposal), I continue to get the string .repr, and not the numeric value in the .il file.

Would love your feedback on this change. Should make it possible to pass a numeric value for the PULLUP attribute to Yosys 0.9 and nextpnr. It may be the completely wrong place to address the challange, happy to learn!

        ...
        UARTResource(0,
            rx="6", tx="9",
            attrs=Attrs(IO_STANDARD="SB_LVTTL", PULLUP=1)
        ),
	...

This change would make 1 (int) a valid attr value, which means the test_build_dsl.test_wrong_value test, which guards against 1 being valid, would no longer be needed.

The fact that I'm rendering a known test obsolete makes be suspicious that this may not be the right way of going addressing the root cause of the problem at all ;-)

Please view this pull request as a discussion starter. Appreciate guidance on how to solve this issue and how I can best help.

@codecov
Copy link

codecov bot commented Aug 30, 2019

Codecov Report

Merging #188 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #188      +/-   ##
==========================================
- Coverage    80.4%   80.34%   -0.07%     
==========================================
  Files          34       34              
  Lines        5518     5520       +2     
  Branches     1197     1198       +1     
==========================================
- Hits         4437     4435       -2     
- Misses        936      938       +2     
- Partials      145      147       +2
Impacted Files Coverage Δ
nmigen/build/dsl.py 91.46% <0%> (-2.37%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98278a0...63e8e79. Read the comment docs.

@whitequark
Copy link
Contributor

Fixed in master.

@whitequark whitequark closed this Aug 30, 2019
@ret
Copy link
Contributor Author

ret commented Aug 30, 2019

Great! Thank you!

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

2 participants