adavare commented on a change in pull request #27:
URL: https://github.com/apache/tvm-vta/pull/27#discussion_r646844433
##########
File path: hardware/chisel/src/main/scala/core/TensorStore.scala
##########
@@ -123,24 +128,28 @@ class TensorStore(tensorType: String = "none", debug:
Boolean = false)(
state := sWriteCmd
xfer_bytes := xfer_stride_bytes
when(xsize < xfer_stride_pulses) {
- xlen := xsize
+ assert(xsize > 0.U)
+ xlen := xsize - 1.U
xrem := 0.U
}.otherwise {
xlen := xfer_stride_pulses - 1.U
+ assert(xsize >= xfer_stride_pulses)
xrem := xsize - xfer_stride_pulses
}
}
} // split
.elsewhen(xrem < xfer_split_pulses) {
state := sWriteCmd
xfer_bytes := xfer_split_bytes
- xlen := xrem
+ assert(xrem > 0.U)
+ xlen := xrem - 1.U
xrem := 0.U
}
.otherwise {
state := sWriteCmd
xfer_bytes := xfer_split_bytes
xlen := xfer_split_pulses - 1.U
+ assert(xrem >= xfer_split_pulses)
Review comment:
added prints to all asserts in state machine code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]