Skip to content

Commit

Permalink
Make SRAMInterface parameters publicly available (#3826)
Browse files Browse the repository at this point in the history
  • Loading branch information
debs-sifive committed Feb 16, 2024
1 parent 935febe commit 8f0196f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/main/scala/chisel3/util/SRAM.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,18 @@ class MemoryReadWritePort[T <: Data](tpe: T, addrWidth: Int, masked: Boolean) ex
* @param masked Whether the memory is write masked
*/
class SRAMInterface[T <: Data](
memSize: BigInt,
tpe: T,
numReadPorts: Int,
numWritePorts: Int,
numReadwritePorts: Int,
masked: Boolean = false)
val memSize: BigInt,
// tpe can't be directly made public as it will become a Bundle field
tpe: T,
val numReadPorts: Int,
val numWritePorts: Int,
val numReadwritePorts: Int,
val masked: Boolean = false)
extends Bundle {

/** Public accessor for data type of this interface. */
def dataType: T = tpe

if (masked) {
require(
tpe.isInstanceOf[Vec[_]],
Expand Down

0 comments on commit 8f0196f

Please sign in to comment.