@@ -189,16 +156,17 @@ class NewSbuffer extends XSModule with HasSbufferConst {
...
@@ -189,16 +156,17 @@ class NewSbuffer extends XSModule with HasSbufferConst {
for(i<-0untilStorePipelineWidth){
for(i<-0untilStorePipelineWidth){
mergeMask(i):=widthMap(j=>
mergeMask(i):=widthMap(j=>
intags(i)===tag(j)&&isValid(stateVec(j))
intags(i)===tag(j)&&validMask(j)
)
)
}
}
// insert confition
// insert condition
// firstInsert: the first invalid entry
// firstInsert: the first invalid entry
// if first entry canMerge or second entry has the same tag with the first entry , secondInsert equal the first invalid entry, otherwise, the second invalid entry
// if first entry canMerge or second entry has the same tag with the first entry,
valinvalidMask=stateVec.map(s=>isInvalid(s))
// secondInsert equal the first invalid entry, otherwise, the second invalid entry