PLIC: simplify some scala code
This commit is contained in:
		@@ -177,12 +177,10 @@ class TLPLIC(params: PLICParams)(implicit p: Parameters) extends LazyModule
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    val claimer = Wire(init = Vec.fill(nHarts){Bool(false)})
 | 
					    val claimer = Wire(init = Vec.fill(nHarts){Bool(false)})
 | 
				
			||||||
    val claiming = Wire(init = Vec.tabulate(nHarts){i => Mux(claimer(i), UIntToOH(maxDevs(i)), UInt(0, width=log2Up(nDevices+1)))})
 | 
					    val claiming = Wire(init = Vec.tabulate(nHarts){i => Mux(claimer(i), UIntToOH(maxDevs(i)), UInt(0))})
 | 
				
			||||||
    val claimedDevs = Wire(init = Vec(claiming.reduceLeft( _ | _ ).toBools))
 | 
					    val claimedDevs = Wire(init = Vec(claiming.reduceLeft( _ | _ ).toBools))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for ((pg, c) <- (pending zip gateways) zip claimedDevs) {
 | 
					    for ((p, g), c) <- (pending zip gateways) zip claimedDevs) {
 | 
				
			||||||
      val p = pg._1
 | 
					 | 
				
			||||||
      val g = pg._2
 | 
					 | 
				
			||||||
      g.ready := !p
 | 
					      g.ready := !p
 | 
				
			||||||
      g.complete := false
 | 
					      g.complete := false
 | 
				
			||||||
      when(c) {
 | 
					      when(c) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user