1
1
package coupledL2
2
2
3
3
import chisel3 ._
4
+ import circt .stage .{ChiselStage , FirtoolOption }
4
5
import chisel3 .util ._
5
6
import org .chipsalliance .cde .config ._
6
- import chisel3 .stage .{ ChiselGeneratorAnnotation , ChiselStage }
7
+ import chisel3 .stage .ChiselGeneratorAnnotation
7
8
import freechips .rocketchip .diplomacy ._
8
9
import freechips .rocketchip .tile .MaxHartIdBits
9
10
import freechips .rocketchip .tilelink ._
@@ -655,6 +656,15 @@ class TestTop_fullSys()(implicit p: Parameters) extends LazyModule {
655
656
}
656
657
}
657
658
659
+ private [coupledL2] object TestTopFirtoolOptions {
660
+ def apply () = Seq (
661
+ FirtoolOption (" --disable-annotation-unknown" ),
662
+ FirtoolOption (" --repl-seq-mem" ),
663
+ FirtoolOption (" --repl-seq-mem-file=TestTop.sv.conf" ),
664
+ FirtoolOption (" --lowering-options=explicitBitcast" )
665
+ )
666
+ }
667
+
658
668
object TestTop_L2 extends App {
659
669
val config = baseConfig(1 ).alterPartial({
660
670
case L2ParamKey => L2Param (
@@ -665,9 +675,9 @@ object TestTop_L2 extends App {
665
675
ChiselDB .init(false )
666
676
667
677
val top = DisableMonitors (p => LazyModule (new TestTop_L2 ()(p)) )(config)
668
- (new ChiselStage ).execute(args, Seq (
669
- ChiselGeneratorAnnotation (() => top.module)
670
- ))
678
+ (new ChiselStage ).execute(args,
679
+ ChiselGeneratorAnnotation (() => top.module) +: TestTopFirtoolOptions ()
680
+ )
671
681
672
682
ChiselDB .addToFileRegisters
673
683
FileRegisters .write(" ./build" )
@@ -683,9 +693,9 @@ object TestTop_L2_Standalone extends App {
683
693
ChiselDB .init(false )
684
694
685
695
val top = DisableMonitors (p => LazyModule (new TestTop_L2_Standalone ()(p)) )(config)
686
- (new ChiselStage ).execute(args, Seq (
687
- ChiselGeneratorAnnotation (() => top.module)
688
- ))
696
+ (new ChiselStage ).execute(args,
697
+ ChiselGeneratorAnnotation (() => top.module) +: TestTopFirtoolOptions ()
698
+ )
689
699
690
700
ChiselDB .addToFileRegisters
691
701
FileRegisters .write(" ./build" )
@@ -705,9 +715,9 @@ object TestTop_L2L3 extends App {
705
715
Constantin .init(false )
706
716
707
717
val top = DisableMonitors (p => LazyModule (new TestTop_L2L3 ()(p)) )(config)
708
- (new ChiselStage ).execute(args, Seq (
709
- ChiselGeneratorAnnotation (() => top.module)
710
- ))
718
+ (new ChiselStage ).execute(args,
719
+ ChiselGeneratorAnnotation (() => top.module) +: TestTopFirtoolOptions ()
720
+ )
711
721
712
722
ChiselDB .addToFileRegisters
713
723
Constantin .addToFileRegisters
@@ -728,9 +738,9 @@ object TestTop_L2L3L2 extends App {
728
738
Constantin .init(false )
729
739
730
740
val top = DisableMonitors (p => LazyModule (new TestTop_L2L3L2 ()(p)))(config)
731
- (new ChiselStage ).execute(args, Seq (
732
- ChiselGeneratorAnnotation (() => top.module)
733
- ))
741
+ (new ChiselStage ).execute(args,
742
+ ChiselGeneratorAnnotation (() => top.module) +: TestTopFirtoolOptions ()
743
+ )
734
744
735
745
ChiselDB .addToFileRegisters
736
746
Constantin .addToFileRegisters
@@ -750,9 +760,9 @@ object TestTop_fullSys extends App {
750
760
ChiselDB .init(false )
751
761
752
762
val top = DisableMonitors (p => LazyModule (new TestTop_fullSys ()(p)))(config)
753
- (new ChiselStage ).execute(args, Seq (
754
- ChiselGeneratorAnnotation (() => top.module)
755
- ))
763
+ (new ChiselStage ).execute(args,
764
+ ChiselGeneratorAnnotation (() => top.module) +: TestTopFirtoolOptions ()
765
+ )
756
766
757
767
ChiselDB .addToFileRegisters
758
768
FileRegisters .write(" ./build" )
0 commit comments