XSTester.scala (c7d010e5062a987c3e027d867e1b2c36061ec895) | XSTester.scala (195ef4a53ab54326d879e884c4e1568f424f2668) |
---|---|
1package xiangshan 2 3import chisel3._ 4import chiseltest._ 5import chiseltest.{VerilatorBackendAnnotation, WriteVcdAnnotation} 6import chiseltest.simulator.{VerilatorCFlags, VerilatorFlags} 7import test.types.AnnotationSeq 8import org.scalatest.flatspec._ 9import org.scalatest.matchers.should._ 10import top.{ArgParser, DefaultConfig} 11import xiangshan.backend.regfile.IntPregParams 12 13abstract class XSTester extends AnyFlatSpec with ChiselScalatestTester with Matchers with HasTestAnnos { 14 behavior of "XiangShan Module" 15 val defaultConfig = (new DefaultConfig) | 1package xiangshan 2 3import chisel3._ 4import chiseltest._ 5import chiseltest.{VerilatorBackendAnnotation, WriteVcdAnnotation} 6import chiseltest.simulator.{VerilatorCFlags, VerilatorFlags} 7import test.types.AnnotationSeq 8import org.scalatest.flatspec._ 9import org.scalatest.matchers.should._ 10import top.{ArgParser, DefaultConfig} 11import xiangshan.backend.regfile.IntPregParams 12 13abstract class XSTester extends AnyFlatSpec with ChiselScalatestTester with Matchers with HasTestAnnos { 14 behavior of "XiangShan Module" 15 val defaultConfig = (new DefaultConfig) |
16 implicit val config = defaultConfig.alterPartial({ | 16 implicit val config: org.chipsalliance.cde.config.Parameters = defaultConfig.alterPartial({ |
17 // Get XSCoreParams and pass it to the "small module" 18 case XSCoreParamsKey => defaultConfig(XSTileKey).head.copy( 19 // Example of how to change params 20 intPreg = IntPregParams( 21 numEntries = 64, 22 numRead = Some(14), 23 numWrite = Some(8), 24 ), --- 15 unchanged lines hidden --- | 17 // Get XSCoreParams and pass it to the "small module" 18 case XSCoreParamsKey => defaultConfig(XSTileKey).head.copy( 19 // Example of how to change params 20 intPreg = IntPregParams( 21 numEntries = 64, 22 numRead = Some(14), 23 numWrite = Some(8), 24 ), --- 15 unchanged lines hidden --- |