tilelink2: maxLgSize should be accurate (#332)
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							7ee79efc15
						
					
				
				
					commit
					47843d8ec1
				
			| @@ -216,12 +216,16 @@ class TLEdge( | ||||
|     x match { | ||||
|       case _: TLBundleE => UInt(0) | ||||
|       case bundle: TLDataChannel => { | ||||
|         if (maxLgSize == 0) { | ||||
|           UInt(0) | ||||
|         } else { | ||||
|           val decode = UIntToOH1(size(bundle), maxLgSize) >> log2Ceil(manager.beatBytes) | ||||
|           Mux(hasData(bundle), decode, UInt(0)) | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| class TLEdgeOut( | ||||
|   client:  TLClientPortParameters, | ||||
|   | ||||
| @@ -383,7 +383,7 @@ case class TLEdgeParameters( | ||||
|   manager: TLManagerPortParameters) | ||||
| { | ||||
|   val maxTransfer = max(client.maxTransfer, manager.maxTransfer) | ||||
|   val maxLgSize = log2Up(maxTransfer) | ||||
|   val maxLgSize = log2Ceil(maxTransfer) | ||||
|  | ||||
|   // Sanity check the link... | ||||
|   require (maxTransfer >= manager.beatBytes) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user