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

fix global , and allow easy subclassing of Platform #81

Closed
wants to merge 1 commit into from

Conversation

zignig
Copy link
Contributor

@zignig zignig commented Jun 4, 2019

The global in the tinyfpga_bx board was an integer not a string. Added extend to platform to make subclassing and adding resources easier.

@codecov
Copy link

codecov bot commented Jun 4, 2019

Codecov Report

Merging #81 into master will decrease coverage by 0.02%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #81      +/-   ##
==========================================
- Coverage      81%   80.97%   -0.03%     
==========================================
  Files          31       31              
  Lines        4876     4879       +3     
  Branches     1050     1050              
==========================================
+ Hits         3950     3951       +1     
- Misses        799      801       +2     
  Partials      127      127
Impacted Files Coverage Δ
nmigen/build/plat.py 24.5% <33.33%> (+0.13%) ⬆️

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 6426b90...cdf3de0. Read the comment docs.

@whitequark
Copy link
Contributor

I fixed the typo in 45d1dc1. As for your other change, I don't think it's necessary. There is nothing wrong with using normal Python mechanisms like super(), and you could write it in even shorter way like this:

class MyOwnPlatform(TinyFPGAPlatform):
    resources = TinyFPGAPlatform.resources + [
        Resource(...)
    ]

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