1
0

Allow rwReg to pass name and description to RegField for documentation.

This commit is contained in:
Albert Huntington 2018-01-05 16:59:58 -08:00
parent 7385c99435
commit 8425086f98

View File

@ -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