Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SRAMInterface parameters publicly available (backport #3826) #3828

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading