parameterize Hasti address and data bits
This commit is contained in:
parent
64991d3947
commit
44740cb6b2
@ -31,10 +31,14 @@ trait HastiConstants
|
|||||||
def dgate(valid: Bool, b: UInt) = Fill(b.getWidth, valid) & b
|
def dgate(valid: Bool, b: UInt) = Fill(b.getWidth, valid) & b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case class HastiParameters(dataBits: Int, addrBits: Int)
|
||||||
|
case object HastiKey extends Field[HastiParameters]
|
||||||
|
|
||||||
trait HasHastiParameters {
|
trait HasHastiParameters {
|
||||||
implicit val p: Parameters
|
implicit val p: Parameters
|
||||||
val hastiAddrBits = 32
|
val hastiParams = p(HastiKey)
|
||||||
val hastiDataBits = 32
|
val hastiAddrBits = hastiParams.addrBits
|
||||||
|
val hastiDataBits = hastiParams.dataBits
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class HastiModule(implicit val p: Parameters) extends Module
|
abstract class HastiModule(implicit val p: Parameters) extends Module
|
||||||
|
Loading…
Reference in New Issue
Block a user