1
0

Add cover properties to Core CSRs (#1212)

This commit is contained in:
Jacob Chang 2018-01-30 00:01:19 -08:00 committed by GitHub
parent b5ff853e86
commit f4853c4f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -609,6 +609,11 @@ class CSRFile(perfEventSets: EventSets = new EventSets(Seq()))(implicit p: Param
io.rw.rdata := Mux1H(for ((k, v) <- read_mapping) yield decoded_addr(k) -> v)
// cover access to register
read_mapping.foreach( {case (k, v) => {
cover(io.rw.cmd.isOneOf(CSR.W, CSR.S, CSR.C, CSR.R) && io.rw.addr===k, "CSR_access_"+k.toString, "Cover Accessing Core CSR field")
}})
io.fcsr_rm := reg_frm
when (io.fcsr_flags.valid) {
reg_fflags := reg_fflags | io.fcsr_flags.bits