Skip to content

Commit f32fa41

Browse files
committed
rework non-working partial assignment
1 parent 404f9ff commit f32fa41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/scala/spi/BitBang.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class BitBang(frequ: Int) extends Module {
3131
dbg.io.rx := io.rx
3232
io.tx := dbg.io.tx
3333

34-
dbg.io.din := 0.U
34+
3535

3636
val valReg = RegInit(0.U(32.W))
3737
valReg := dbg.io.dout
@@ -41,7 +41,6 @@ class BitBang(frequ: Int) extends Module {
4141
io.accell.sclk := valReg(0)
4242
io.accell.mosi := valReg(1)
4343
io.accell.ncs := valReg(2)
44-
dbg.io.din(3) := io.accell.miso
4544

4645
io.flash.sclk := valReg(4)
4746
io.flash.mosi := valReg(5)
@@ -50,6 +49,8 @@ class BitBang(frequ: Int) extends Module {
5049
io.sram.sclk := valReg(8)
5150
io.sram.mosi := valReg(9)
5251
io.sram.ncs := valReg(10)
52+
53+
dbg.io.din := io.sram.miso ## 0.U(3.W) ## io.flash.miso ## 0.U(3.W) ## io.accell.miso ## 0.U(3.W)
5354
}
5455

5556
// generate Verilog

0 commit comments

Comments
 (0)