Conversation
| required Logic reset, | ||
| required Logic start, | ||
| required Logic busIn, | ||
| Logic? css, |
There was a problem hiding this comment.
add documentation for what css is
| ..pairConnectIO(this, intf, PairRole.provider); | ||
|
|
||
| final isRunning = Logic(name: 'isRunning'); | ||
| final active = Logic(name: 'enable'); |
There was a problem hiding this comment.
did you mean to call this "active"?
| {required SpiInterface intf, | ||
| Logic? busIn, | ||
| Logic? reset, | ||
| bool triStateOutput = false, |
| asyncReset: true, | ||
| resetValue: busIn?[-1]); | ||
| // flop data from shift register dataOut. | ||
| final flopDataOut = FlipFlop(~intf.sclk, shiftReg.dataOut, |
There was a problem hiding this comment.
nit: why not keep it as a flop like it was?
| final int dataLength; | ||
|
|
||
| /// The number of Chip Select signals in this interface. | ||
| final int multiChipSelects; |
There was a problem hiding this comment.
why no numChipSelects or something?
|
|
||
| class SpiMultiSubTest extends Test { | ||
| late final SpiInterface intfMain; | ||
| late final SpiInterface intfSubA; |
There was a problem hiding this comment.
suggestion: might be better to make this a List<SpiInterface> to reduce the copy-paste for A,B,C,D? And List<SpiSub> etc.
|
|
||
| Simulator.injectAction(() { | ||
| intf.csb.put(1); | ||
| intf.csb[0].put(1); |
There was a problem hiding this comment.
this is incomplete on the BFM side, right? we need ways to drive different CSB's, not just always 0
| Logic? reset, | ||
| bool triStateOutput = false, | ||
| super.name = 'spiSub'}) { | ||
| // SPI Interface |
There was a problem hiding this comment.
should we add validation that the interface always has 1 CS?
There was a problem hiding this comment.
should we add validation that the interface always has 1 CS?
There was a problem hiding this comment.
does the SPI checker need updating as well?
Description & Motivation
Add ability for main to have multiple chip selects and sub to tristate its outputs. Allowing for multidrop configurations in SPI.
Related Issue(s)
#158
Testing
Unit tests for multiple sub configurations.
Backwards-compatibility
Documentation