DecodeTest.scala (7f37d55fc418d3b4583220e634da7e459802c6d8) | DecodeTest.scala (4b0d80d87574e82ba31737496d63ac30bed0d40a) |
---|---|
1package xiangshan 2 3import chisel3._ 4import chisel3.stage._ 5import chiseltest._ 6import chiseltest.ChiselScalatestTester 7import chiseltest.VerilatorBackendAnnotation 8import chiseltest.simulator.{VerilatorFlags, VerilatorCFlags} 9import org.scalatest.flatspec.AnyFlatSpec 10import org.scalatest.matchers.must.Matchers 11import firrtl.stage.RunFirrtlTransformAnnotation 12import xstransforms.PrintModuleName 13import firrtl.options.TargetDirAnnotation 14import top.ArgParser 15import utility.FileRegisters 16import xiangshan.backend.decode.DecodeUnit | 1package xiangshan 2 3import chisel3._ 4import chisel3.stage._ 5import chiseltest._ 6import chiseltest.ChiselScalatestTester 7import chiseltest.VerilatorBackendAnnotation 8import chiseltest.simulator.{VerilatorFlags, VerilatorCFlags} 9import org.scalatest.flatspec.AnyFlatSpec 10import org.scalatest.matchers.must.Matchers 11import firrtl.stage.RunFirrtlTransformAnnotation 12import xstransforms.PrintModuleName 13import firrtl.options.TargetDirAnnotation 14import top.ArgParser 15import utility.FileRegisters 16import xiangshan.backend.decode.DecodeUnit |
17import xiangshan.backend.regfile.IntPregParams |
|
17 18object DecodeMain extends App { 19 val (config, firrtlOpts, firrtlComplier, firtoolOpts) = ArgParser.parse(args) 20 // //val soc = DisableMonitors(p => LazyModule(new XSTop()(p)))(config) 21 // If Complex Params are needed, wrap it with a Top Module to do dirty works, 22 // and use "chisel3.aop.Select.collectDeep[ModuleWanted](WrapperModule){case a: ModuleWanted => a}.head.Params" 23 val defaultConfig = config.alterPartial({ 24 // Get XSCoreParams and pass it to the "small module" 25 case XSCoreParamsKey => config(XSTileKey).head.copy( 26 // Example of how to change params | 18 19object DecodeMain extends App { 20 val (config, firrtlOpts, firrtlComplier, firtoolOpts) = ArgParser.parse(args) 21 // //val soc = DisableMonitors(p => LazyModule(new XSTop()(p)))(config) 22 // If Complex Params are needed, wrap it with a Top Module to do dirty works, 23 // and use "chisel3.aop.Select.collectDeep[ModuleWanted](WrapperModule){case a: ModuleWanted => a}.head.Params" 24 val defaultConfig = config.alterPartial({ 25 // Get XSCoreParams and pass it to the "small module" 26 case XSCoreParamsKey => config(XSTileKey).head.copy( 27 // Example of how to change params |
27 IssQueSize = 12 | 28 intPreg = IntPregParams( 29 numEntries = 64, 30 numRead = Some(14), 31 numWrite = Some(8), 32 ), |
28 ) 29 }) 30 (new ChiselStage).execute(args, Seq( 31 ChiselGeneratorAnnotation(() => new DecodeUnit()(defaultConfig) 32 ))) 33// // Generate files when compiling. Used by ChiselDB. 34// FileRegisters.write("./build") 35} --- 15 unchanged lines hidden --- | 33 ) 34 }) 35 (new ChiselStage).execute(args, Seq( 36 ChiselGeneratorAnnotation(() => new DecodeUnit()(defaultConfig) 37 ))) 38// // Generate files when compiling. Used by ChiselDB. 39// FileRegisters.write("./build") 40} --- 15 unchanged lines hidden --- |