Compare commits
13 Commits
2e0897fd55
...
b2f97692db
Author | SHA1 | Date |
---|---|---|
|
b2f97692db | |
|
f9ed852fb2 | |
|
99a48a761c | |
|
cd450e3243 | |
|
51ad03b0f6 | |
|
d7dd2491d4 | |
|
be3685ffd1 | |
|
b5c820f608 | |
|
3aa632ec4e | |
|
ce78e60ca4 | |
|
dccbba583f | |
|
d69a82861a | |
|
d99b8b8145 |
|
@ -1 +1 @@
|
|||
Subproject commit 6608dc16ec944800d39200e2fad5924d0968b42b
|
||||
Subproject commit eacee874c515eadfe197cd6b66a52799c30332c1
|
|
@ -1 +1 @@
|
|||
Subproject commit c22a4b2e81d97680380c38cb1ccc7cc2028f01fa
|
||||
Subproject commit 2b60fc5edf50f519a4310dc41620e9a204b4aacb
|
|
@ -71,38 +71,38 @@
|
|||
<!-- always add a space after `//` or `/*` before comments -->
|
||||
<check enabled="true" class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker" level="warning"/>
|
||||
<!-- check space around operators, ref: https://github.com/scala-ide/scalariform/blob/master/scalariform/src/main/scala/scalariform/lexer/Tokens.scala -->
|
||||
<check enabled="true" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- (, ~, ! -->
|
||||
<parameter name="tokens">LPAREN, TILDE, EXCLAMATION</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :, ,, ) -->
|
||||
<parameter name="tokens">COLON, COMMA, RPAREN</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- if, match, case, for, while, =>, <-, {, <:, <%:, >:, +, -, *, |, = -->
|
||||
<parameter name="tokens">IF, MATCH, CASE, FOR, WHILE, ARROW, LARROW, LBRACE, SUBTYPE, VIEWBOUND, SUPERTYPE, PLUS, MINUS, STAR, PIPE, EQUAL</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- =>, <-, }, <:, <%, >:, +, -, *, |, = -->
|
||||
<parameter name="tokens">ARROW, LARROW, RBRACE, SUBTYPE, VIEWBOUND, SUPERTYPE, PLUS, MINUS, STAR, PIPE, EQUAL</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :=, :<=, :>=, :<>=, :#=, <>, ===, =/=, <<, >>, <=, >= -->
|
||||
<parameter name="regex"><]]></parameter>
|
||||
</parameters>
|
||||
<customMessage>No space before operators</customMessage>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :=, :<=, :>=, :<>=, :#=, <>, ===, =/=, <<, >>, <=, >= -->
|
||||
<parameter name="regex"><![CDATA[(:<?#?>?=|<>|=[=/]=|<<|>>|[<>]=)[^ \n]]]></parameter>
|
||||
|
|
|
@ -71,43 +71,43 @@
|
|||
<!-- always add a space after `//` or `/*` before comments -->
|
||||
<check enabled="true" class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker" level="warning"/>
|
||||
<!-- check space around operators, ref: https://github.com/scala-ide/scalariform/blob/master/scalariform/src/main/scala/scalariform/lexer/Tokens.scala -->
|
||||
<check enabled="true" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- (, ~, ! -->
|
||||
<parameter name="tokens">LPAREN, TILDE, EXCLAMATION</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :, ,, ) -->
|
||||
<parameter name="tokens">COLON, COMMA, RPAREN</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- if, match, case, for, while, =>, <-, {, <:, <%:, >:, +, -, *, |, = -->
|
||||
<parameter name="tokens">IF, MATCH, CASE, FOR, WHILE, ARROW, LARROW, LBRACE, SUBTYPE, VIEWBOUND, SUPERTYPE, PLUS, MINUS, STAR, PIPE, EQUAL</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- =>, <-, }, <:, <%, >:, +, -, *, |, = -->
|
||||
<parameter name="tokens">ARROW, LARROW, RBRACE, SUBTYPE, VIEWBOUND, SUPERTYPE, PLUS, MINUS, STAR, PIPE, EQUAL</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :=, :<=, :>=, :<>=, :#=, <>, ===, =/=, <<, >>, <=, >= -->
|
||||
<parameter name="regex"><]]></parameter>
|
||||
</parameters>
|
||||
<customMessage>No space before operators</customMessage>
|
||||
</check>
|
||||
<check enabled="true" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<check enabled="false" class="org.scalastyle.file.RegexChecker" level="warning">
|
||||
<parameters>
|
||||
<!-- :=, :<=, :>=, :<>=, :#=, <>, ===, =/=, <<, >>, <=, >= -->
|
||||
<parameter name="regex"><![CDATA[(:<?#?>?=|<>|=[=/]=|<<|>>|[<>]=)[^ ]]]></parameter>
|
||||
<parameter name="regex"><![CDATA[(:<?#?>?=|<>|=[=/]=|<<|>>|[<>]=)[^ \n]]]></parameter>
|
||||
</parameters>
|
||||
<customMessage>No space after operators</customMessage>
|
||||
<customMessage>No space or newline after operators</customMessage>
|
||||
</check>
|
||||
|
||||
<!-- ===== imports ===== -->
|
||||
|
@ -158,7 +158,7 @@
|
|||
<!-- pure lower cases for package names -->
|
||||
<check enabled="true" class="org.scalastyle.scalariform.PackageNamesChecker" level="warning">
|
||||
<parameters>
|
||||
<parameter name="regex">^[a-z]*$</parameter>
|
||||
<parameter name="regex">^[a-z0-9]*$</parameter>
|
||||
</parameters>
|
||||
</check>
|
||||
|
||||
|
|
|
@ -222,8 +222,9 @@ class XSNoCTop()(implicit p: Parameters) extends BaseXSSoc with HasSoCParameter
|
|||
val seip = plic.last(0)
|
||||
val nmi_31 = nmi.head(0)
|
||||
val nmi_43 = nmi.head(1)
|
||||
val debugIntr = debug.head(0)
|
||||
val msi_info_vld = core_with_l2.module.io.msiInfo.valid
|
||||
val intSrc = Cat(msip, mtip, meip, seip, nmi_31, nmi_43, msi_info_vld)
|
||||
val intSrc = Cat(msip, mtip, meip, seip, nmi_31, nmi_43, debugIntr, msi_info_vld)
|
||||
|
||||
/*
|
||||
* CPU Low Power State:
|
||||
|
|
|
@ -204,11 +204,11 @@ class ISelectField(final val maxValue: Int, reserved: Seq[Range]) extends CSREnu
|
|||
}
|
||||
|
||||
object VSISelectField extends ISelectField(
|
||||
0x1FF,
|
||||
0xFFF,
|
||||
reserved = Seq(
|
||||
Range.inclusive(0x000, 0x02F),
|
||||
Range.inclusive(0x040, 0x06F),
|
||||
Range.inclusive(0x100, 0x1FF),
|
||||
Range.inclusive(0x100, 0xFFF),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -221,15 +221,16 @@ object MISelectField extends ISelectField(
|
|||
)
|
||||
|
||||
object SISelectField extends ISelectField(
|
||||
maxValue = 0xFF,
|
||||
maxValue = 0xFFF,
|
||||
reserved = Seq(
|
||||
Range.inclusive(0x00, 0x2F),
|
||||
Range.inclusive(0x40, 0x6F),
|
||||
Range.inclusive(0x000, 0x02F),
|
||||
Range.inclusive(0x040, 0x06F),
|
||||
Range.inclusive(0x100, 0xFFF),
|
||||
),
|
||||
)
|
||||
|
||||
class VSISelectBundle extends CSRBundle {
|
||||
val ALL = VSISelectField(log2Up(0x1FF), 0, null).withReset(0.U)
|
||||
val ALL = VSISelectField(log2Up(0xFFF), 0, null).withReset(0.U)
|
||||
}
|
||||
|
||||
class MISelectBundle extends CSRBundle {
|
||||
|
@ -237,7 +238,7 @@ class MISelectBundle extends CSRBundle {
|
|||
}
|
||||
|
||||
class SISelectBundle extends CSRBundle {
|
||||
val ALL = SISelectField(log2Up(0xFF), 0, null).withReset(0.U)
|
||||
val ALL = SISelectField(log2Up(0xFFF), 0, null).withReset(0.U)
|
||||
}
|
||||
|
||||
class TopIBundle extends CSRBundle {
|
||||
|
|
|
@ -2,7 +2,7 @@ package xiangshan.backend.fu.fpu
|
|||
|
||||
import chisel3._
|
||||
import chisel3.util._
|
||||
import fudian.FloatPoint
|
||||
import floatPoint.FloatPoint
|
||||
|
||||
object FPU {
|
||||
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
package xiangshan.backend.fu.fpu
|
||||
|
||||
import chisel3._
|
||||
import chisel3.util._
|
||||
|
||||
package object floatPoint {
|
||||
|
||||
def RNE: UInt = 0.U(3.W)
|
||||
def RTZ: UInt = 1.U(3.W)
|
||||
def RDN: UInt = 2.U(3.W)
|
||||
def RUP: UInt = 3.U(3.W)
|
||||
def RMM: UInt = 4.U(3.W)
|
||||
|
||||
class FPDecodeBundle extends Bundle {
|
||||
val expNotZero = Bool()
|
||||
val expIsZero = Bool()
|
||||
val expIsOnes = Bool()
|
||||
val sigNotZero = Bool()
|
||||
val sigIsZero = Bool()
|
||||
val isSubnormal = Bool()
|
||||
val isInf = Bool()
|
||||
val isZero = Bool()
|
||||
val isNaN = Bool()
|
||||
val isSNaN = Bool()
|
||||
val isQNaN = Bool()
|
||||
}
|
||||
|
||||
class FloatPoint(val expWidth: Int, val precision: Int) extends Bundle {
|
||||
def sigWidth = precision - 1
|
||||
val sign = Bool()
|
||||
val exp = UInt(expWidth.W)
|
||||
val sig = UInt(sigWidth.W)
|
||||
def decode: FPDecodeBundle = {
|
||||
val expNotZero = exp.orR
|
||||
val expIsOnes = exp.andR
|
||||
val sigNotZero = sig.orR
|
||||
val bundle = Wire(new FPDecodeBundle)
|
||||
bundle.expNotZero := expNotZero
|
||||
bundle.expIsZero := !expNotZero
|
||||
bundle.expIsOnes := expIsOnes
|
||||
bundle.sigNotZero := sigNotZero
|
||||
bundle.sigIsZero := !sigNotZero
|
||||
bundle.isSubnormal := bundle.expIsZero && sigNotZero
|
||||
bundle.isInf := bundle.expIsOnes && bundle.sigIsZero
|
||||
bundle.isZero := bundle.expIsZero && bundle.sigIsZero
|
||||
bundle.isNaN := bundle.expIsOnes && bundle.sigNotZero
|
||||
bundle.isSNaN := bundle.isNaN && !sig.head(1).asBool
|
||||
bundle.isQNaN := bundle.isNaN && sig.head(1).asBool
|
||||
bundle
|
||||
}
|
||||
}
|
||||
object FloatPoint {
|
||||
def expBias(expWidth: Int): BigInt = {
|
||||
(BigInt(1) << (expWidth - 1)) - 1
|
||||
}
|
||||
def maxNormExp(expWidth: Int): BigInt = {
|
||||
(BigInt(1) << expWidth) - 2
|
||||
}
|
||||
def fromUInt(x: UInt, expWidth: Int, pc: Int): FloatPoint = {
|
||||
val fp = Wire(new FloatPoint(expWidth, pc))
|
||||
fp.sign := x(expWidth + pc - 1)
|
||||
fp.exp := x(expWidth + pc - 2, pc - 1)
|
||||
fp.sig := x(pc - 2, 0)
|
||||
fp
|
||||
}
|
||||
def defaultNaNUInt(expWidth: Int, pc: Int): UInt = {
|
||||
Cat(0.U(1.W), Fill(expWidth + 1, 1.U(1.W)), 0.U((pc - 2).W))
|
||||
}
|
||||
def defaultNaN(expWidth: Int, pc: Int): FloatPoint = {
|
||||
fromUInt(defaultNaNUInt(expWidth, pc), expWidth, pc)
|
||||
}
|
||||
}
|
||||
|
||||
class RawFloat(val expWidth: Int, val precision: Int) extends Bundle {
|
||||
val sign = Bool()
|
||||
val exp = UInt(expWidth.W)
|
||||
val sig = UInt(precision.W)
|
||||
}
|
||||
|
||||
object RawFloat {
|
||||
def fromFP(fp: FloatPoint, expNotZero: Option[Bool] = None): RawFloat = {
|
||||
val inner = Wire(new RawFloat(fp.expWidth, fp.precision))
|
||||
val nz = if (expNotZero.isDefined) expNotZero.get else fp.exp.orR
|
||||
inner.sign := fp.sign
|
||||
inner.exp := fp.exp | !nz
|
||||
inner.sig := Cat(nz, fp.sig)
|
||||
inner
|
||||
}
|
||||
|
||||
def fromUInt(x: UInt, expWidth: Int, precision: Int): RawFloat = {
|
||||
val fp = FloatPoint.fromUInt(x, expWidth, precision)
|
||||
val raw = fromFP(fp)
|
||||
raw
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@ package xiangshan.backend.fu.wrapper
|
|||
|
||||
import org.chipsalliance.cde.config.Parameters
|
||||
import chisel3._
|
||||
import fudian.SignExt
|
||||
import utility.SignExt
|
||||
import xiangshan.RedirectLevel
|
||||
import xiangshan.backend.fu.{FuConfig, FuncUnit, JumpDataModule, PipedFuncUnit}
|
||||
import xiangshan.backend.datapath.DataConfig.VAddrData
|
||||
|
|
|
@ -2,7 +2,7 @@ package xiangshan.backend.issue
|
|||
|
||||
import chisel3._
|
||||
import chisel3.util._
|
||||
import fudian.utils.SignExt
|
||||
import utility.SignExt
|
||||
import xiangshan.SelImm
|
||||
import xiangshan.backend.decode.ImmUnion
|
||||
import xiangshan.backend.datapath.DataConfig._
|
||||
|
|
|
@ -206,8 +206,8 @@ class Rename(implicit p: Parameters) extends XSModule with HasCircularQueuePtrHe
|
|||
private val inst = Wire(Vec(RenameWidth, new XSInstBitFields))
|
||||
private val isCsr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val isCsrr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val isWaitForwardCsrr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val isBlockBackwardCsrr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val isNotWaitForwardCsrr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val isNotBlockBackwardCsrr = Wire(Vec(RenameWidth, Bool()))
|
||||
private val fuType = uops.map(_.fuType)
|
||||
private val fuOpType = uops.map(_.fuOpType)
|
||||
private val vtype = uops.map(_.vpu.vtype)
|
||||
|
@ -291,9 +291,9 @@ class Rename(implicit p: Parameters) extends XSModule with HasCircularQueuePtrHe
|
|||
inst(i) := uops(i).instr.asTypeOf(new XSInstBitFields)
|
||||
isCsr(i) := inst(i).OPCODE5Bit === OPCODE5Bit.SYSTEM && inst(i).FUNCT3(1, 0) =/= 0.U
|
||||
isCsrr(i) := isCsr(i) && inst(i).FUNCT3 === BitPat("b?1?") && inst(i).RS1 === 0.U
|
||||
isWaitForwardCsrr(i) := isCsrr(i) && LookupTreeDefault(
|
||||
isNotWaitForwardCsrr(i) := isCsrr(i) && LookupTreeDefault(
|
||||
inst(i).CSRIDX, true.B, CSROoORead.waitForwardInOrderCsrReadList.map(_.U -> false.B))
|
||||
isBlockBackwardCsrr(i) := isCsrr(i) && LookupTreeDefault(
|
||||
isNotBlockBackwardCsrr(i) := isCsrr(i) && LookupTreeDefault(
|
||||
inst(i).CSRIDX, true.B, CSROoORead.blockBackwardInOrderCsrReadList.map(_.U -> false.B))
|
||||
|
||||
/*
|
||||
|
@ -303,8 +303,8 @@ class Rename(implicit p: Parameters) extends XSModule with HasCircularQueuePtrHe
|
|||
*
|
||||
* Signal "isCsrr" contains not only "CSRR", but also other CSR instructions that do not require writing to CSR.
|
||||
*/
|
||||
uops(i).waitForward := io.in(i).bits.waitForward && !isWaitForwardCsrr(i)
|
||||
uops(i).blockBackward := io.in(i).bits.blockBackward && !isBlockBackwardCsrr(i)
|
||||
uops(i).waitForward := io.in(i).bits.waitForward && !isNotWaitForwardCsrr(i)
|
||||
uops(i).blockBackward := io.in(i).bits.blockBackward && !isNotBlockBackwardCsrr(i)
|
||||
|
||||
// update cf according to ssit result
|
||||
uops(i).storeSetHit := io.ssit(i).valid
|
||||
|
|
|
@ -378,11 +378,9 @@ class MainPipe(implicit p: Parameters) extends DCacheModule with HasPerfEvents w
|
|||
val s1_need_replacement = s1_req.miss && !s1_tag_match
|
||||
val s1_need_eviction = s1_req.miss && !s1_tag_match && s1_repl_coh.state =/= ClientStates.Nothing
|
||||
|
||||
val s1_way_en = Mux(
|
||||
RegEnable(io.pseudo_error.valid, false.B, s0_fire),
|
||||
Mux(ParallelORR(s1_real_tag_match_way), s1_real_tag_match_way, s1_repl_way_en),
|
||||
Mux(s1_need_replacement, s1_repl_way_en, s1_real_tag_match_way)
|
||||
)
|
||||
val s1_no_error_way_en = Mux(s1_need_replacement, s1_repl_way_en, s1_real_tag_match_way)
|
||||
val s1_error_way_en = Mux(ParallelORR(s1_real_tag_match_way), s1_real_tag_match_way, s1_repl_way_en)
|
||||
val s1_way_en = Mux(io.pseudo_error.valid, s1_error_way_en, s1_no_error_way_en)
|
||||
assert(!RegNext(s1_fire && PopCount(s1_way_en) > 1.U))
|
||||
|
||||
val s1_tag = s1_hit_tag
|
||||
|
@ -413,7 +411,6 @@ class MainPipe(implicit p: Parameters) extends DCacheModule with HasPerfEvents w
|
|||
val s2_need_tag = RegEnable(s1_need_tag, s1_fire)
|
||||
val s2_idx = get_idx(s2_req.vaddr)
|
||||
|
||||
|
||||
val s2_way_en = RegEnable(s1_way_en, s1_fire)
|
||||
val s2_tag = Mux(s2_need_replacement, s2_repl_tag, RegEnable(s1_tag, s1_fire))
|
||||
val s2_coh = Mux(s2_need_replacement, s2_repl_coh, RegEnable(s1_coh, s1_fire))
|
||||
|
@ -427,8 +424,10 @@ class MainPipe(implicit p: Parameters) extends DCacheModule with HasPerfEvents w
|
|||
|
||||
val s2_hit = s2_tag_match && s2_has_permission
|
||||
val s2_sc = s2_req.cmd === M_XSC
|
||||
val s2_lr = s2_req.cmd === M_XLR
|
||||
val s2_amo_hit = s2_hit && !s2_req.probe && !s2_req.miss && s2_req.isAMO
|
||||
val s2_store_hit = s2_hit && !s2_req.probe && !s2_req.miss && s2_req.isStore
|
||||
val s2_should_not_report_ecc_error = !s2_req.miss && (s2_req.isAMO && !s2_lr || s2_req.isStore)
|
||||
|
||||
if(EnableTagEcc) {
|
||||
s2_tag_error := s2_tag_errors.orR && s2_need_tag
|
||||
|
@ -978,7 +977,7 @@ class MainPipe(implicit p: Parameters) extends DCacheModule with HasPerfEvents w
|
|||
s.s1.bits.way_en := s1_way_en
|
||||
s.s2.valid := s2_valid && !RegEnable(s1_req.replace, s1_fire)
|
||||
s.s2.bits.set := RegEnable(get_idx(s1_req.vaddr), s1_fire)
|
||||
s.s2.bits.way_en := RegEnable(s1_way_en, s1_fire)
|
||||
s.s2.bits.way_en := s2_way_en
|
||||
s.s3.valid := s3_valid && !RegEnable(s2_req.replace, s2_fire_to_s3)
|
||||
s.s3.bits.set := RegEnable(get_idx(s2_req.vaddr), s2_fire_to_s3)
|
||||
s.s3.bits.way_en := RegEnable(s2_way_en, s2_fire_to_s3)
|
||||
|
@ -995,7 +994,7 @@ class MainPipe(implicit p: Parameters) extends DCacheModule with HasPerfEvents w
|
|||
// report error to beu and csr, 1 cycle after read data resp
|
||||
io.error := 0.U.asTypeOf(ValidIO(new L1CacheErrorInfo))
|
||||
// report error, update error csr
|
||||
io.error.valid := s3_error && GatedValidRegNext(s2_fire && !(s2_req.isAMO || s2_req.isStore))
|
||||
io.error.valid := s3_error && GatedValidRegNext(s2_fire && !s2_should_not_report_ecc_error)
|
||||
// only tag_error and data_error will be reported to beu
|
||||
// l2_error should not be reported (l2 will report that)
|
||||
io.error.bits.report_to_beu := (s3_tag_error || s3_data_error) && RegNext(s2_fire)
|
||||
|
|
|
@ -300,7 +300,7 @@ class LoadQueue(implicit p: Parameters) extends XSModule
|
|||
for ((buff, w) <- uncacheBuffer.io.req.zipWithIndex) {
|
||||
// from load_s3
|
||||
val ldinBits = io.ldu.ldin(w).bits
|
||||
buff.valid := io.ldu.ldin(w).valid && (ldinBits.nc || ldinBits.mmio) && !ldinBits.rep_info.need_rep && !ldinBits.nc_with_data
|
||||
buff.valid := io.ldu.ldin(w).valid && !ldinBits.nc_with_data
|
||||
buff.bits := ldinBits
|
||||
}
|
||||
|
||||
|
|
|
@ -939,6 +939,7 @@ class StoreQueue(implicit p: Parameters) extends XSModule
|
|||
val cboZeroFlushSb = GatedRegNext(cboZeroToSb)
|
||||
|
||||
val cboZeroUop = RegEnable(PriorityMux(isCboZeroToSbVec, deqPtrExt.map(x=>uop(x.value))), cboZeroToSb)
|
||||
val cboZeroSqIdx = RegEnable(PriorityMux(isCboZeroToSbVec, deqPtrExt), cboZeroToSb)
|
||||
val cboZeroValid = RegInit(false.B)
|
||||
val cboZeroWaitFlushSb = RegInit(false.B)
|
||||
|
||||
|
@ -1014,6 +1015,7 @@ class StoreQueue(implicit p: Parameters) extends XSModule
|
|||
// cbo Zero writeback to ROB
|
||||
io.cboZeroStout.valid := cboZeroValid && !cboZeroWaitFlushSb
|
||||
io.cboZeroStout.bits.uop := cboZeroUop
|
||||
io.cboZeroStout.bits.uop.sqIdx := cboZeroSqIdx
|
||||
io.cboZeroStout.bits.data := DontCare
|
||||
io.cboZeroStout.bits.isFromLoadUnit := DontCare
|
||||
io.cboZeroStout.bits.debug.isMMIO := false.B
|
||||
|
|
|
@ -114,7 +114,7 @@ class StoreUnit(implicit p: Parameters) extends XSModule
|
|||
val s0_rob_idx = Mux(s0_use_non_prf_flow, s0_uop.robIdx, 0.U.asTypeOf(s0_uop.robIdx))
|
||||
val s0_pc = Mux(s0_use_non_prf_flow, s0_uop.pc, 0.U)
|
||||
val s0_instr_type = Mux(s0_use_non_prf_flow, STORE_SOURCE.U, DCACHE_PREFETCH_SOURCE.U)
|
||||
val s0_wlineflag = Mux(s0_use_flow_rs, s0_uop.fuOpType === LSUOpType.cbo_zero, false.B)
|
||||
val s0_wlineflag = Mux(s0_use_flow_rs, LSUOpType.isCboAll(s0_uop.fuOpType), false.B)
|
||||
val s0_out = Wire(new LsPipelineBundle)
|
||||
val s0_kill = s0_uop.robIdx.needFlush(io.redirect)
|
||||
val s0_can_go = s1_ready
|
||||
|
|
Loading…
Reference in New Issue