-
Notifications
You must be signed in to change notification settings - Fork 24
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
Serial Peripheral Interface #148
base: main
Are you sure you want to change the base?
Conversation
updated shiftReg needed in spi
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.
Great work!
Be sure to update the description etc. in the template for the PR
final count = Counter.simple( | ||
clk: intf.sclk, | ||
enable: ~intf.csb, | ||
reset: reset ?? Const(0, width: 1), |
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.
Hmm, if there's no reset, then maybe this whole counter shouldn't be here, actually. That would mean the done
signal is dependent on a reset
being provided.
}); | ||
|
||
// checking prev value at negedge | ||
intf.sclk.negedge.listen((event) { |
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.
why is this check happening on negedge? I think you can just compare previousValue
and value
on sclk.posedge
directly?
// checking prev value at negedge | ||
intf.sclk.negedge.listen((event) { | ||
if (misoVal != null && misoVal != intf.miso.previousValue) { | ||
logger.severe('Data on MISO is changing on posedge of sclk'); |
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.
Add a test that causes the checker to fail
Description & Motivation
Adding Serial Peripheral Interface to ROHD-HCL. Contains BFM's and hardware gaskets for Main and Sub components in a SPI.
SPI is a commonly used interface and adding "drop in" components for SPI allows for easier use in designs.
Related Issue(s)
N/A
Testing
Testing included BFM unit tests, component unit tests, and BFM/ component cross testing.
Backwards-compatibility
No.
Documentation
Documentation added to doc/components/. Local API docs generated.