Skip to content

Commit

Permalink
Merge branch 'master' into mem-ports
Browse files Browse the repository at this point in the history
  • Loading branch information
rachitnigam committed Feb 16, 2024
2 parents b8d5483 + 04ef979 commit 0f01db2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/scala/backends/calyx/Backend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,19 @@ private class CalyxBackendHelper {
)
)

<<<<<<< HEAD
// The value is generated on `read_data` and written on `write_data`.
val portName =
if (rhsInfo.isDefined) "write_data" else "read_data"
=======
val donePortName =
if (rhsInfo.isDefined) "write_done" else "read_done"

// The value is generated on `read_data` and written on `write_data`.
val portName =
if (rhsInfo.isDefined) "write_data" else "read_data"

>>>>>>> master

// The array ports change if the array is a function parameter. We want to access the
// component ports, e.g. `x_read_data`, rather than the memory ports, `x.read_data`.
Expand Down Expand Up @@ -681,9 +691,21 @@ private class CalyxBackendHelper {
con :: result.structure ++ structs
}
})
<<<<<<< HEAD

// set ContentEn to 1'd1
val contentEnStruct = List(Assign(ConstantPort(1,1), contentEnPort))
=======

val readEnPort = if (isParam) {
ThisPort(CompVar(s"${id}_read_en"))
} else {
arr.port("read_en")
}

// always assign 1 to read_en port if we want to read from seq mem
val readEnStruct = if (rhsInfo.isDefined) List() else List(Assign(ConstantPort(1,1), readEnPort))
>>>>>>> master

// Set write_en to 1'd0 for reads, to port for writes.
val writeEnStruct =
Expand Down

0 comments on commit 0f01db2

Please sign in to comment.