2016-11-28 01:16:37 +01:00
|
|
|
// See LICENSE.SiFive for license details.
|
2016-09-15 03:10:21 +02:00
|
|
|
|
2016-09-15 22:04:01 +02:00
|
|
|
package unittest
|
2016-09-15 03:10:21 +02:00
|
|
|
|
|
|
|
import Chisel._
|
2016-11-18 23:05:14 +01:00
|
|
|
import config._
|
2016-09-22 23:31:45 +02:00
|
|
|
import rocketchip.{BaseConfig, BasePlatformConfig}
|
2016-09-15 03:10:21 +02:00
|
|
|
|
2017-01-13 23:41:19 +01:00
|
|
|
class WithUncoreUnitTests extends Config((site, here, up) => {
|
|
|
|
case uncore.tilelink.TLId => "L1toL2"
|
|
|
|
case UnitTests => (q: Parameters) => {
|
|
|
|
implicit val p = q
|
|
|
|
Seq(
|
|
|
|
Module(new uncore.tilelink2.TLFuzzRAMTest),
|
2017-03-16 23:13:57 +01:00
|
|
|
Module(new uncore.ahb.AHBBridgeTest(true)),
|
|
|
|
Module(new uncore.ahb.AHBNativeTest(true)),
|
|
|
|
Module(new uncore.ahb.AHBNativeTest(false)),
|
2017-01-13 23:41:19 +01:00
|
|
|
Module(new uncore.apb.APBBridgeTest),
|
|
|
|
Module(new uncore.axi4.AXI4LiteFuzzRAMTest),
|
|
|
|
Module(new uncore.axi4.AXI4FullFuzzRAMTest),
|
|
|
|
Module(new uncore.axi4.AXI4BridgeTest)) }
|
|
|
|
})
|
2016-09-15 03:10:21 +02:00
|
|
|
|
2017-01-17 03:24:08 +01:00
|
|
|
class UncoreUnitTestConfig extends Config(new WithUncoreUnitTests ++ new BasePlatformConfig)
|
2016-09-29 00:11:05 +02:00
|
|
|
|
2017-01-13 23:41:19 +01:00
|
|
|
class WithTLSimpleUnitTests extends Config((site, here, up) => {
|
|
|
|
case UnitTests => (q: Parameters) => {
|
|
|
|
implicit val p = q
|
|
|
|
Seq(
|
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(1)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(4)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(16)),
|
2017-03-14 00:03:21 +01:00
|
|
|
Module(new uncore.tilelink2.TLRAMZeroDelayTest(4)),
|
2017-01-13 23:41:19 +01:00
|
|
|
Module(new uncore.tilelink2.TLRR0Test),
|
|
|
|
Module(new uncore.tilelink2.TLRR1Test),
|
2017-01-27 00:15:48 +01:00
|
|
|
Module(new uncore.tilelink2.TLRAMRationalCrossingTest),
|
2017-01-26 23:32:27 +01:00
|
|
|
Module(new uncore.tilelink2.TLRAMAsyncCrossingTest) ) }
|
2017-01-13 23:41:19 +01:00
|
|
|
})
|
2016-09-29 02:15:12 +02:00
|
|
|
|
2017-01-13 23:41:19 +01:00
|
|
|
class WithTLWidthUnitTests extends Config((site, here, up) => {
|
|
|
|
case UnitTests => (q: Parameters) => {
|
|
|
|
implicit val p = q
|
|
|
|
Seq(
|
|
|
|
Module(new uncore.tilelink2.TLRAMFragmenterTest( 4, 256)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMFragmenterTest(16, 64)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMFragmenterTest( 4, 16)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMWidthWidgetTest( 1, 1)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMWidthWidgetTest( 4, 64)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMWidthWidgetTest(64, 4)) ) }
|
|
|
|
})
|
2016-09-29 02:15:12 +02:00
|
|
|
|
2017-01-13 23:41:19 +01:00
|
|
|
class WithTLXbarUnitTests extends Config((site, here, up) => {
|
|
|
|
case UnitTests => (q: Parameters) => {
|
|
|
|
implicit val p = q
|
|
|
|
Seq(
|
|
|
|
Module(new uncore.tilelink2.TLRAMXbarTest(1)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMXbarTest(2)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMXbarTest(8)),
|
|
|
|
//Module(new uncore.tilelink2.TLMulticlientXbarTest(4,4)),
|
|
|
|
Module(new uncore.tilelink2.TLMulticlientXbarTest(1,4)) ) }
|
|
|
|
})
|
2016-09-29 00:11:05 +02:00
|
|
|
|
2016-09-29 02:15:12 +02:00
|
|
|
class TLSimpleUnitTestConfig extends Config(new WithTLSimpleUnitTests ++ new BasePlatformConfig)
|
|
|
|
class TLWidthUnitTestConfig extends Config(new WithTLWidthUnitTests ++ new BasePlatformConfig)
|
|
|
|
class TLXbarUnitTestConfig extends Config(new WithTLXbarUnitTests ++ new BasePlatformConfig)
|