PriorityEncoder apply() no longer has recursive depth param
This commit is contained in:
		| @@ -259,10 +259,11 @@ class LockingArbiter[T <: Data](n: Int)(data: => T) extends Component { | ||||
|  | ||||
| object PriorityEncoder | ||||
| { | ||||
|   def apply(in: Bits, n: Int = 0): UFix = { | ||||
|   def apply(in: Bits): UFix = doApply(in, 0) | ||||
|   def doApply(in: Bits, n: Int = 0): UFix = { | ||||
|     if (n >= in.getWidth-1) | ||||
|       UFix(n) | ||||
|     else | ||||
|       Mux(in(n), UFix(n), PriorityEncoder(in, n+1)) | ||||
|       Mux(in(n), UFix(n), doApply(in, n+1)) | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user