Skip to content

Commit

Permalink
Merge pull request #410 from MrJake222/fix-expose-mask
Browse files Browse the repository at this point in the history
Exposed write mask on default iBus
  • Loading branch information
Dolu1990 authored Jun 5, 2024
2 parents 457ae5c + 1175f19 commit 3ee790d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/scala/vexriscv/plugin/DBusSimplePlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 3ee790d

Please sign in to comment.