Merge pull request #410 from MrJake222/fix-expose-mask

Exposed write mask on default iBus
This commit is contained in:
Dolu1990 2024-06-05 15:44:25 +02:00 committed by GitHub
commit 3ee790d25c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import scala.collection.mutable.ArrayBuffer
case class DBusSimpleCmd() extends Bundle{
val wr = Bool
val mask = Bits(4 bit)
val address = UInt(32 bits)
val data = Bits(32 bit)
val size = UInt(2 bit)
@ -441,6 +442,7 @@ class DBusSimplePlugin(catchAddressMisaligned : Boolean = false,
//formal
val formalMask = dBus.genMask(dBus.cmd)
dBus.cmd.mask := formalMask
insert(FORMAL_MEM_ADDR) := dBus.cmd.address & U"xFFFFFFFC"
insert(FORMAL_MEM_WMASK) := (dBus.cmd.valid && dBus.cmd.wr) ? formalMask | B"0000"