Skip to content

Commit

Permalink
rework non-working partial assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
schoeberl committed Nov 16, 2024
1 parent 404f9ff commit f32fa41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/scala/spi/BitBang.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class BitBang(frequ: Int) extends Module {
dbg.io.rx := io.rx
io.tx := dbg.io.tx

dbg.io.din := 0.U


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

io.flash.sclk := valReg(4)
io.flash.mosi := valReg(5)
Expand All @@ -50,6 +49,8 @@ class BitBang(frequ: Int) extends Module {
io.sram.sclk := valReg(8)
io.sram.mosi := valReg(9)
io.sram.ncs := valReg(10)

dbg.io.din := io.sram.miso ## 0.U(3.W) ## io.flash.miso ## 0.U(3.W) ## io.accell.miso ## 0.U(3.W)
}

// generate Verilog
Expand Down

0 comments on commit f32fa41

Please sign in to comment.