Skip to content

Commit

Permalink
fix(LinkLayer): latch linkactive* signals before async bridge (#256)
Browse files Browse the repository at this point in the history
`txlinkactivereq` and `rxlinkactiveack` should be driven by cpu clock
and will cross NoC clock in the asynchronous bridge therefore should not
be generated by combination logics. This commit makes sure that such
signals are latched before transmitted to the asynchronous bridge.
  • Loading branch information
linjuanZ authored Sep 25, 2024
1 parent e8ebf65 commit 2f63bfe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/scala/coupledL2/tl2chi/chi/LinkLayer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,11 @@ class LinkMonitor(implicit p: Parameters) extends L2Module with HasCHIOpcodes {
LCredit2Decoupled(io.out.rx.dat, io.in.rx.dat, LinkState(rxState), rxdatDeact, Some("rxdat"))

io.out.txsactive := true.B
io.out.tx.linkactivereq := !reset.asBool
io.out.rx.linkactiveack := (RegNext(io.out.rx.linkactivereq) || !rxDeact) && !reset.asBool
io.out.tx.linkactivereq := RegNext(true.B, init = false.B)
io.out.rx.linkactiveack := RegNext(
next = RegNext(io.out.rx.linkactivereq) || !rxDeact,
init = false.B
)

io.out.syscoreq := true.B

Expand Down

0 comments on commit 2f63bfe

Please sign in to comment.