From 7fa6be4a8bc12ada8ee03fe7a4fe025c8709f860 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Thu, 11 May 2023 15:56:30 -0700 Subject: [PATCH] Use case class for noncoal/coal bundles don't know what they really do, but they look fancy --- src/main/scala/tilelink/Coalescing.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/tilelink/Coalescing.scala b/src/main/scala/tilelink/Coalescing.scala index 0345c8b..373337a 100644 --- a/src/main/scala/tilelink/Coalescing.scala +++ b/src/main/scala/tilelink/Coalescing.scala @@ -165,12 +165,12 @@ class Request(sourceWidth: Int, sizeWidth: Int, addressWidth: Int, dataWidth: In bits } } -class NonCoalescedRequest(config: CoalescerConfig) +case class NonCoalescedRequest(config: CoalescerConfig) extends Request(sourceWidth = log2Ceil(config.numOldSrcIds), sizeWidth = config.wordSizeWidth, addressWidth = config.addressWidth, dataWidth = config.wordSizeInBytes * 8) -class CoalescedRequest(config: CoalescerConfig) +case class CoalescedRequest(config: CoalescerConfig) extends Request(sourceWidth = log2Ceil(config.numNewSrcIds), sizeWidth = log2Ceil(config.maxCoalLogSize), addressWidth = config.addressWidth, @@ -204,11 +204,11 @@ class Response(sourceWidth: Int, sizeWidth: Int, dataWidth: Int) extends Bundle this.error := bundle.denied } } -class NonCoalescedResponse(config: CoalescerConfig) +case class NonCoalescedResponse(config: CoalescerConfig) extends Response(sourceWidth = log2Ceil(config.numOldSrcIds), sizeWidth = config.wordSizeWidth, dataWidth = config.wordSizeInBytes * 8) -class CoalescedResponse(config: CoalescerConfig) +case class CoalescedResponse(config: CoalescerConfig) extends Response(sourceWidth = log2Ceil(config.numNewSrcIds), sizeWidth = log2Ceil(config.maxCoalLogSize), dataWidth = (8 * (1 << config.maxCoalLogSize)))