-
Notifications
You must be signed in to change notification settings - Fork 29
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
New split bus interface 2 / Verilator simulation support #146
Conversation
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
==========================================
- Coverage 32.38% 31.92% -0.47%
==========================================
Files 71 72 +1
Lines 4712 4780 +68
==========================================
Hits 1526 1526
- Misses 3186 3254 +68
Continue to review full report at Codecov.
|
Any idea of how we can reduce this repeating code |
The only line that changes is in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea of how we can reduce this repeating code
tests/test_SimGpio_xxx.py
maybe something like this: https://stackoverflow.com/questions/38729007/parametrize-class-tests-with-pytest#:~:text=From%20the%20docs%3A-,%40pytest.,test%20methods%20in%20the%20class.The only line that changes is in the
setUp()
function.setUp
cannot be parametrized like this.
I tried to inherit from the main test and overridesetUp
instead. For some reason this does not work properly yet
https://stackoverflow.com/questions/28695276/how-to-parameterize-python-unittest-setup-method ?
yield RisingEdge(self.clock) | ||
self.bus.ADD <= address + 0x4000 | ||
self.bus.BUS_DATA_IN <= int(value) | ||
yield Timer(1) # This is hack for iverilog |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be not needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for sbus
it (GPIO test) runs fine without hack with iverilog. For bus
not.
|
Thank you. Let it go in. |
I can have a look |
Done @themperek |
It is suffering. Thank you! |
Continue #145
Extend
sbus
support & add modifications to run simulation with Verilator.The bus can be either fully split (use/add new modules using
sbus
)or it can be also only split in the tb module (same old modules, no other changes required).
To run with Verilator (and get .vcd output) one may currently add
mkfile += "EXTRA_ARGS += -Wno-UNSIGNED -Wno-WIDTH -Wno-WIDTHCONCAT --trace"
to the Makefile