Skip to content

Commit

Permalink
continue assert
Browse files Browse the repository at this point in the history
  • Loading branch information
ckj119940887 committed Mar 8, 2025
1 parent 9508bb4 commit 1407405
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shared/src/main/scala/org/sireum/anvil/HwSynthesizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ object MemCopyLog {
| // reg for stack pointer
| val SP = RegInit(0.U(STACK_POINTER_WIDTH.W))
| // reg for display pointer
| val DP = RegInit(0.U(STACK_POINTER_WIDTH.W))
| val DP = RegInit(0.U(64.W))
| // reg for index in memcopy
| val Idx = RegInit(0.U(16.W))
| // reg for recording how many rounds needed for the left bytes
Expand Down Expand Up @@ -464,6 +464,10 @@ object MemCopyLog {
exprST = if(intrinsic.isSP) st"SP" else st"DP"
}
case AST.IR.Exp.Intrinsic(intrinsic: Intrinsic.Load) => {
if(MemCopyLog.currentBlock.get.label == 203) {
println(intrinsic.prettyST.render)
println(intrinsic.bytes)
}
var rhsExprST = ISZ[ST]()
val rhsExpr = processExpr(intrinsic.rhsOffset, F)
for(i <- intrinsic.bytes-1 to 0 by -1) {
Expand All @@ -477,7 +481,7 @@ object MemCopyLog {
st"""
|Cat(
| ${(rhsExprST, "\n")}
|)${if(anvil.isSigned(intrinsic.tipe)) ".asSInt" else ""}"""
|)${if(intrinsic.isSigned) ".asSInt" else ""}"""
}
case exp: AST.IR.Exp.Temp => {
exprST = st"${generalRegName}(${exp.n}.U)${if(isSignedExp(exp)) ".asSInt" else ""}"
Expand Down

0 comments on commit 1407405

Please sign in to comment.