Allow rwReg to pass name and description to RegField for documentation.
This commit is contained in:
parent
7385c99435
commit
8425086f98
@ -100,12 +100,12 @@ object RegField
|
|||||||
|
|
||||||
// This RegField wraps an explicit register
|
// This RegField wraps an explicit register
|
||||||
// (e.g. Black-Boxed Register) to create a R/W register.
|
// (e.g. Black-Boxed Register) to create a R/W register.
|
||||||
def rwReg(n: Int, bb: SimpleRegIO) : RegField =
|
def rwReg(n: Int, bb: SimpleRegIO, name: String = "", description: String = "") : RegField =
|
||||||
RegField(n, bb.q, RegWriteFn((valid, data) => {
|
RegField(n, bb.q, RegWriteFn((valid, data) => {
|
||||||
bb.en := valid
|
bb.en := valid
|
||||||
bb.d := data
|
bb.d := data
|
||||||
Bool(true)
|
Bool(true)
|
||||||
}))
|
}), name, description)
|
||||||
|
|
||||||
// Create byte-sized read-write RegFields out of a large UInt register.
|
// Create byte-sized read-write RegFields out of a large UInt register.
|
||||||
// It is updated when any of the bytes are written. Because the RegFields
|
// It is updated when any of the bytes are written. Because the RegFields
|
||||||
|
Loading…
Reference in New Issue
Block a user