Skip to content

Commit

Permalink
CSR: remove useless sdsid custom-CSR (OpenXiangShan#2980)
Browse files Browse the repository at this point in the history
Custom-CSR sdsid is a legacy from labeled XiangShan, which is no longer
in use. Remove this Custom-CSR.

This patch fixes OpenXiangShan/NEMU#329
  • Loading branch information
cebarobot authored May 15, 2024
1 parent 7299828 commit 006b878
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions src/main/scala/xiangshan/Bundle.scala
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,6 @@ class CustomCSRCtrlIO(implicit p: Parameters) extends XSBundle {
val l2_pf_store_only = Output(Bool())
// ICache
val icache_parity_enable = Output(Bool())
// Labeled XiangShan
val dsid = Output(UInt(8.W)) // TODO: DsidWidth as parameter
// Load violation predictor
val lvpred_disable = Output(Bool())
val no_spec_load = Output(Bool())
Expand Down
5 changes: 0 additions & 5 deletions src/main/scala/xiangshan/backend/fu/CSR.scala
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,6 @@ class CSR(cfg: FuConfig)(implicit p: Parameters) extends FuncUnit(cfg)
val sfetchctl = RegInit(UInt(XLEN.W), "b0".U)
csrio.customCtrl.icache_parity_enable := sfetchctl(0)

// sdsid: Differentiated Services ID
val sdsid = RegInit(UInt(XLEN.W), 0.U)
csrio.customCtrl.dsid := sdsid

// slvpredctl: load violation predict settings
// Default reset period: 2^16
// Why this number: reset more frequently while keeping the overhead low
Expand Down Expand Up @@ -816,7 +812,6 @@ class CSR(cfg: FuConfig)(implicit p: Parameters) extends FuncUnit(cfg)
MaskedRegMap(Sbpctl, sbpctl),
MaskedRegMap(Spfctl, spfctl),
MaskedRegMap(Sfetchctl, sfetchctl),
MaskedRegMap(Sdsid, sdsid),
MaskedRegMap(Slvpredctl, slvpredctl),
MaskedRegMap(Smblockctl, smblockctl),
MaskedRegMap(Srnctl, srnctl),
Expand Down
1 change: 0 additions & 1 deletion src/main/scala/xiangshan/backend/fu/util/CSRConst.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ trait HasCSRConst {
val Scachebase = 0x5C5

// Supervisor Custom Read/Write
val Sdsid = 0x9C0
val Sfetchctl = 0x9e0

// Hypervisor Trap Setup
Expand Down

0 comments on commit 006b878

Please sign in to comment.