lib updated

This commit is contained in:
​laraibkhan119 2020-09-24 12:07:12 +05:00
parent 4ab72523c7
commit 4a560e881a
1 changed files with 8 additions and 1 deletions

View File

@ -189,7 +189,14 @@ trait el2_lib extends param{
case(true,false) => 68*ICACHE_NUM_WAYS case(true,false) => 68*ICACHE_NUM_WAYS
case(true,true) => 71*ICACHE_NUM_WAYS case(true,true) => 71*ICACHE_NUM_WAYS
} }
def rvmaskandmatch(mask:UInt, data:UInt, masken:Bool):UInt={
val matchvec = Wire(Vec(data.getWidth,UInt(1.W)))
val masken_or_fullmask = masken & ~mask.andR
matchvec(0) := masken_or_fullmask | (mask(0) === data(0)).asUInt
for(i <- 1 to data.getWidth-1)
matchvec(i) := Mux(mask(i-1,0).andR & masken_or_fullmask,"b1".U,(mask(i) === data(i)).asUInt)
matchvec.asUInt
}
val data_mem_size : Int = memory_cal val data_mem_size : Int = memory_cal
// Move rvecc_encode to a proper trait // Move rvecc_encode to a proper trait
def rvecc_encode(din:UInt) = { //Done for verification and testing def rvecc_encode(din:UInt) = { //Done for verification and testing