plugin: caches: Fix "Can't resolve the literal value of"

Both registers were initialized with unsigned integers without a value.
This triggered:

[error] Exception in thread "main" spinal.core.SpinalExit:
[error]  Can't resolve the literal value of (..._rspCounter :  UInt[32 bits])

Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
This commit is contained in:
Daniel Schultz 2022-04-20 11:16:19 +02:00
parent 3b8270b82b
commit ea7a18c7f4
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ class DBusCachedPlugin(val config : DataCacheConfig,
pipeline plug new Area{
//Memory bandwidth counter
val rspCounter = RegInit(UInt(32 bits)) init(0)
val rspCounter = Reg(UInt(32 bits)) init(0)
when(dBus.rsp.valid){
rspCounter := rspCounter + 1
}

View File

@ -141,7 +141,7 @@ class IBusCachedPlugin(resetVector : BigInt = 0x80000000l,
iBus.cmd.address.allowOverride := cache.io.mem.cmd.address
//Memory bandwidth counter
val rspCounter = RegInit(UInt(32 bits)) init(0)
val rspCounter = Reg(UInt(32 bits)) init(0)
when(iBus.rsp.valid){
rspCounter := rspCounter + 1
}