@@ -81,16 +81,15 @@ object FromAsyncBundle {
8181 def channel (
8282 async : AsyncBundle [UInt ],
8383 params : AsyncQueueParams = AsyncQueueParams (),
84- name : Option [String ] = None ,
85- lcrdvReady : Option [Bool ]= None
84+ name : Option [String ] = None
8685 ) = {
8786 val gen = chiselTypeOf(async.mem.head)
8887 val out = Wire (new ChannelIO (gen))
8988 val sink = Module (new AsyncQueueSink (gen, params))
9089 if (name.isDefined) { sink.suggestName(" asyncQSink_" + name.get) }
9190 sink.io.async <> async
92- sink.io.deq.ready := lcrdvReady.getOrElse( true .B )
93- out.flitv := sink.io.deq.valid & sink.io.deq.ready
91+ sink.io.deq.ready := true .B
92+ out.flitv := sink.io.deq.valid
9493 out.flit := sink.io.deq.bits
9594 // flitpend and lcrdv are assigned independently
9695 out.flitpend := DontCare
@@ -188,12 +187,9 @@ class CHIAsyncBridgeSink(params: AsyncQueueParams = AsyncQueueParams())(implicit
188187 val resetFinish = Output (Bool ())
189188 })
190189
191- val txreq_lcrdvReady = Wire (Bool ())
192- val txrsp_lcrdvReady = Wire (Bool ())
193- val txdat_lcrdvReady = Wire (Bool ())
194- io.deq.tx.req <> FromAsyncBundle .channel(io.async.tx.req.flit, params, Some (" txreq_flit" ), Some (txreq_lcrdvReady))
195- io.deq.tx.rsp <> FromAsyncBundle .channel(io.async.tx.rsp.flit, params, Some (" txrsp_flit" ), Some (txrsp_lcrdvReady))
196- io.deq.tx.dat <> FromAsyncBundle .channel(io.async.tx.dat.flit, params, Some (" txdat_flit" ), Some (txdat_lcrdvReady))
190+ io.deq.tx.req <> FromAsyncBundle .channel(io.async.tx.req.flit, params, Some (" txreq_flit" ))
191+ io.deq.tx.rsp <> FromAsyncBundle .channel(io.async.tx.rsp.flit, params, Some (" txrsp_flit" ))
192+ io.deq.tx.dat <> FromAsyncBundle .channel(io.async.tx.dat.flit, params, Some (" txdat_flit" ))
197193
198194 io.async.tx.req.lcrdv <> ToAsyncBundle .bitPulse(io.deq.tx.req.lcrdv, params, Some (" txreq_lcrdv" ))
199195 io.async.tx.rsp.lcrdv <> ToAsyncBundle .bitPulse(io.deq.tx.rsp.lcrdv, params, Some (" txrsp_lcrdv" ))
@@ -244,57 +240,5 @@ class CHIAsyncBridgeSink(params: AsyncQueueParams = AsyncQueueParams())(implicit
244240 io.resetFinish := resetFinish
245241 }
246242
247-
248- /*
249- Duplicate Link Monitor tx/rx state FSM by using deq.rx deq.tx active signals which outuput to DownStream CHI
250- */
251- val txState = RegInit (LinkStates .STOP )
252- val rxState = RegInit (LinkStates .STOP )
253-
254- Seq (txState, rxState).zip(MixedVecInit (Seq (io.deq.tx, io.deq.rx))).foreach { case (state, link) =>
255- state := MuxLookup (Cat (link.linkactivereq, link.linkactiveack), LinkStates .STOP )(Seq (
256- Cat (true .B , false .B ) -> LinkStates .ACTIVATE ,
257- Cat (true .B , true .B ) -> LinkStates .RUN ,
258- Cat (false .B , true .B ) -> LinkStates .DEACTIVATE ,
259- Cat (false .B , false .B ) -> LinkStates .STOP
260- ))
261- }
262- /*
263- For rx channel, add l-credit manager module to generate lcrdv inside bridge
264- a. Try to use io.deq.rx as LCredit interface to output lcrdv right after rx flit received.
265- b. The maximum number of L-Credits that CoupledL2 can provide is 15.
266- */
267- val rxsnpDeact, rxrspDeact, rxdatDeact = Wire (Bool ())
268- val rxin = WireInit (0 .U asTypeOf(Flipped (new DecoupledPortIO ()))) // fake Decoupled IO to provide ready
269- rxin.rx.rsp.ready := true .B
270- rxin.rx.dat.ready := true .B
271- rxin.rx.snp.ready := true .B
272- LCredit2Decoupled (io.deq.rx.rsp, rxin.rx.rsp, LinkState (rxState), rxrspDeact, Some (" rxrsp" ), 15 , false )
273- LCredit2Decoupled (io.deq.rx.dat, rxin.rx.dat, LinkState (rxState), rxdatDeact, Some (" rxdat" ), 15 , false )
274- LCredit2Decoupled (io.deq.rx.snp, rxin.rx.snp, LinkState (rxState), rxsnpDeact, Some (" rxsnp" ))
275- /*
276- For tx channel, add l-credit manager module to generate 'ready' to block tx flit to DownStream CHI
277- a. The maximum number of L-Credits in tx channel is 4 inside bridge
278- b. Use L-Credits number more than 4 in CoupledL2 to cover lcrdv sync delay from DownStream CHI to CoupledL2
279- */
280- val txin = WireInit (0 .U asTypeOf(Flipped (new DecoupledPortIO ()))) // fake Decoupled IO to provide flitv
281- val txout = WireInit (0 .U asTypeOf(new PortIO ))// fake LCredit IO to provide lcrdv
282- txout.tx.req.lcrdv := io.deq.tx.req.lcrdv
283- txout.tx.rsp.lcrdv := io.deq.tx.rsp.lcrdv
284- txout.tx.dat.lcrdv := io.deq.tx.dat.lcrdv
285-
286- txin.tx.req.valid := io.deq.tx.req.flitv
287- txin.tx.rsp.valid := io.deq.tx.rsp.flitv
288- txin.tx.dat.valid := io.deq.tx.dat.flitv
289-
290- Decoupled2LCredit (txin.tx.req, txout.tx.req, LinkState (txState), Some (" txreq" ))
291- Decoupled2LCredit (txin.tx.rsp, txout.tx.rsp, LinkState (txState), Some (" txrsp" ))
292- Decoupled2LCredit (txin.tx.dat, txout.tx.dat, LinkState (txState), Some (" txdat" ))
293-
294- txreq_lcrdvReady := txin.tx.req.ready
295- txrsp_lcrdvReady := txin.tx.rsp.ready
296- txdat_lcrdvReady := txin.tx.dat.ready
297-
298243 dontTouch(io)
299-
300- }
244+ }
0 commit comments