@@ -309,6 +309,133 @@ class WithL1DCacheWays(ways: Int) extends Config((site, here, up) => {
309
309
}
310
310
})
311
311
312
+ class WithL1ICacheECC (dataECC : String , tagECC : String ) extends Config ((site, here, up) => {
313
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
314
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
315
+ icache = tp.tileParams.icache.map(_.copy(dataECC = Some (dataECC), tagECC = Some (tagECC)))))
316
+ case t => t
317
+ }
318
+ })
319
+
320
+ class WithL1DCacheECC (dataECC : String , tagECC : String ) extends Config ((site, here, up) => {
321
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
322
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
323
+ dcache = tp.tileParams.dcache.map(_.copy(dataECC = Some (dataECC), tagECC = Some (tagECC), dataECCBytes= 8 ))))
324
+ case t => t
325
+ }
326
+ })
327
+
328
+ class WithL1ICacheTLBSets (tlbsets : Int ) extends Config ((site, here, up) => {
329
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
330
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
331
+ icache = tp.tileParams.icache.map(_.copy(nTLBSets = tlbsets))))
332
+ case t => t
333
+ }
334
+ })
335
+
336
+ class WithL1DCacheTLBSets (tlbsets : Int ) extends Config ((site, here, up) => {
337
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
338
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
339
+ dcache = tp.tileParams.dcache.map(_.copy(nTLBSets = tlbsets))))
340
+ case t => t
341
+ }
342
+ })
343
+
344
+ class WithL1ICacheTLBWays (tlbways : Int ) extends Config ((site, here, up) => {
345
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
346
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
347
+ icache = tp.tileParams.icache.map(_.copy(nTLBWays = tlbways))))
348
+ case t => t
349
+ }
350
+ })
351
+
352
+ class WithL1DCacheTLBWays (tlbways : Int ) extends Config ((site, here, up) => {
353
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
354
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
355
+ dcache = tp.tileParams.dcache.map(_.copy(nTLBWays = tlbways))))
356
+ case t => t
357
+ }
358
+ })
359
+
360
+ class WithL1ICacheTLBBasePageSectors (pagesectors : Int ) extends Config ((site, here, up) => {
361
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
362
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
363
+ icache = tp.tileParams.icache.map(_.copy(nTLBBasePageSectors = pagesectors))))
364
+ case t => t
365
+ }
366
+ })
367
+
368
+ class WithL1DCacheTLBBasePageSectors (pagesectors : Int ) extends Config ((site, here, up) => {
369
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
370
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
371
+ dcache = tp.tileParams.dcache.map(_.copy(nTLBBasePageSectors = pagesectors))))
372
+ case t => t
373
+ }
374
+ })
375
+
376
+ class WithL1ICacheTLBSuperpages (superpages : Int ) extends Config ((site, here, up) => {
377
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
378
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
379
+ icache = tp.tileParams.icache.map(_.copy(nTLBSuperpages = superpages))))
380
+ case t => t
381
+ }
382
+ })
383
+
384
+ class WithL1DCacheTLBSuperpages (superpages : Int ) extends Config ((site, here, up) => {
385
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
386
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
387
+ dcache = tp.tileParams.dcache.map(_.copy(nTLBSuperpages = superpages))))
388
+ case t => t
389
+ }
390
+ })
391
+
392
+ class WithRocketICacheRowBits (n : Int ) extends Config ((site, here, up) => {
393
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
394
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
395
+ icache = tp.tileParams.icache.map(_.copy(rowBits = n))))
396
+ case t => t
397
+ }
398
+ })
399
+
400
+ class WithRocketDCacheRowBits (n : Int ) extends Config ((site, here, up) => {
401
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
402
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
403
+ dcache = tp.tileParams.dcache.map(_.copy(rowBits = n))))
404
+ case t => t
405
+ }
406
+ })
407
+
408
+ class WithL1ICacheBlockBytes (bytes : Int = 64 ) extends Config ((site, here, up) => {
409
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
410
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
411
+ icache = tp.tileParams.icache.map(_.copy(blockBytes = bytes))))
412
+ case t => t
413
+ }
414
+ })
415
+
416
+ class WithL1DCacheBlockBytes (bytes : Int = 64 ) extends Config ((site, here, up) => {
417
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
418
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
419
+ dcache = tp.tileParams.dcache.map(_.copy(blockBytes = bytes))))
420
+ case t => t
421
+ }
422
+ })
423
+
424
+ class WithoutVM extends Config ((site, here, up) => {
425
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
426
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
427
+ core = tp.tileParams.core.copy(useVM = false )))
428
+ case t => t
429
+ }
430
+ })
431
+
432
+ class WithCFlushEnabled extends Config ((site, here, up) => {
433
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
434
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
435
+ core = tp.tileParams.core.copy(haveCFlush = true )))
436
+ case t => t
437
+ }
438
+ })
312
439
313
440
class WithRocketCacheRowBits (n : Int ) extends Config ((site, here, up) => {
314
441
case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
@@ -427,6 +554,14 @@ class WithDefaultBtb extends Config((site, here, up) => {
427
554
}
428
555
})
429
556
557
+ class WithNoBtb extends Config ((site, here, up) => {
558
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
559
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
560
+ btb = None ))
561
+ case t => t
562
+ }
563
+ })
564
+
430
565
class WithFastMulDiv extends Config ((site, here, up) => {
431
566
case TilesLocated (location) => up(TilesLocated (location), site) map {
432
567
case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
@@ -436,6 +571,15 @@ class WithFastMulDiv extends Config((site, here, up) => {
436
571
}
437
572
})
438
573
574
+ class WithCustomFastMulDiv (mUnroll : Int = 8 , mEarlyOut : Boolean = true , dUnroll : Int = 1 , dEarlyOut : Boolean = true , dEarlyOutGranularity : Int = 1 ) extends Config ((site, here, up) => {
575
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
576
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
577
+ core = tp.tileParams.core.copy(mulDiv = Some (
578
+ MulDivParams (mulUnroll = mUnroll, mulEarlyOut = mEarlyOut, divUnroll = dUnroll, divEarlyOut = dEarlyOut, divEarlyOutGranularity = dEarlyOutGranularity)))))
579
+ case t => t
580
+ }
581
+ })
582
+
439
583
class WithoutMulDiv extends Config ((site, here, up) => {
440
584
case TilesLocated (location) => up(TilesLocated (location), site) map {
441
585
case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
@@ -460,6 +604,32 @@ class WithFPUWithoutDivSqrt extends Config((site, here, up) => {
460
604
}
461
605
})
462
606
607
+ class WithBEU (addr : BigInt ) extends Config ((site, here, up) => {
608
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
609
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(beuAddr = Some (addr)))
610
+ case t => t
611
+ }
612
+ })
613
+
614
+ class WithRocketTileCDC (crossingType : ClockCrossingType = SynchronousCrossing ()) extends Config ((site, here, up) => {
615
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
616
+ case tp : RocketTileAttachParams => tp.copy(crossingParams = tp.crossingParams.copy(
617
+ crossingType = crossingType
618
+ ))
619
+ case other => other
620
+ }
621
+ })
622
+
623
+ class WithSeperateClockReset extends Config ((site, here, up) => {
624
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
625
+ case tp : RocketTileAttachParams => tp.copy(crossingParams = tp.crossingParams.copy(
626
+ forceSeparateClockReset = true
627
+ ))
628
+ case other => other
629
+ }
630
+ })
631
+
632
+
463
633
class WithRocketDebugROB (enable : Boolean = true , size : Int = 0 ) extends Config ((site, here, up) => {
464
634
case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
465
635
case tp : RocketTileAttachParams if (enable) =>
@@ -477,6 +647,23 @@ class WithRocketCease(enable: Boolean = true) extends Config((site, here, up) =>
477
647
}
478
648
})
479
649
650
+ class WithCoreClockGatingEnabled extends Config ((site, here, up) => {
651
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
652
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
653
+ core = tp.tileParams.core.copy(clockGate = true )
654
+ ))
655
+ case t => t
656
+ }
657
+ })
658
+
659
+ class WithDCacheClockGatingEnabled extends Config ((site, here, up) => {
660
+ case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
661
+ case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
662
+ dcache = tp.tileParams.dcache.map(_.copy(clockGate = true ))))
663
+ case t => t
664
+ }
665
+ })
666
+
480
667
class WithNoSimulationTimeout extends Config ((site, here, up) => {
481
668
case TilesLocated (InSubsystem ) => up(TilesLocated (InSubsystem ), site) map {
482
669
case tp : RocketTileAttachParams => tp.copy(tileParams = tp.tileParams.copy(
@@ -576,6 +763,15 @@ class WithDefaultMemPort extends Config((site, here, up) => {
576
763
idBits = 4 ), 1 ))
577
764
})
578
765
766
+ class WithCustomMemPort (base_addr : BigInt , base_size : BigInt , data_width : Int , id_bits : Int , maxXferBytes : Int ) extends Config ((site, here, up) => {
767
+ case ExtMem => Some (MemoryPortParams (MasterPortParams (
768
+ base = base_addr,
769
+ size = base_size,
770
+ beatBytes = data_width/ 8 ,
771
+ idBits = id_bits,
772
+ maxXferBytes = maxXferBytes), 1 ))
773
+ })
774
+
579
775
class WithNoMemPort extends Config ((site, here, up) => {
580
776
case ExtMem => None
581
777
})
@@ -588,6 +784,15 @@ class WithDefaultMMIOPort extends Config((site, here, up) => {
588
784
idBits = 4 ))
589
785
})
590
786
787
+ class WithCustomMMIOPort (base_addr : BigInt , base_size : BigInt , data_width : Int , id_bits : Int , maxXferBytes : Int ) extends Config ((site, here, up) => {
788
+ case ExtBus => Some (MasterPortParams (
789
+ base = base_addr,
790
+ size = base_size,
791
+ beatBytes = data_width/ 8 ,
792
+ idBits = id_bits,
793
+ maxXferBytes = maxXferBytes))
794
+ })
795
+
591
796
class WithNoMMIOPort extends Config ((site, here, up) => {
592
797
case ExtBus => None
593
798
})
@@ -596,6 +801,10 @@ class WithDefaultSlavePort extends Config((site, here, up) => {
596
801
case ExtIn => Some (SlavePortParams (beatBytes = 8 , idBits = 8 , sourceBits = 4 ))
597
802
})
598
803
804
+ class WithCustomSlavePort (data_width : Int , id_bits : Int ) extends Config ((site, here, up) => {
805
+ case ExtIn => Some (SlavePortParams (beatBytes = data_width/ 8 , idBits = id_bits, sourceBits = 4 ))
806
+ })
807
+
599
808
class WithNoSlavePort extends Config ((site, here, up) => {
600
809
case ExtIn => None
601
810
})
0 commit comments