2016-09-15 03:10:21 +02:00
|
|
|
// See LICENSE for license details.
|
|
|
|
|
2016-09-15 22:04:01 +02:00
|
|
|
package unittest
|
2016-09-15 03:10:21 +02:00
|
|
|
|
|
|
|
import Chisel._
|
2016-09-15 23:25:47 +02:00
|
|
|
import cde.{Parameters, Config, CDEMatchError}
|
2016-09-22 23:31:45 +02:00
|
|
|
import rocketchip.{BaseConfig, BasePlatformConfig}
|
2016-09-15 03:10:21 +02:00
|
|
|
|
2016-09-20 23:14:30 +02:00
|
|
|
class WithJunctionsUnitTests extends Config(
|
2016-09-15 03:10:21 +02:00
|
|
|
(pname, site, here) => pname match {
|
2016-09-22 23:31:45 +02:00
|
|
|
case junctions.PAddrBits => 32
|
|
|
|
case rocket.XLen => 64
|
|
|
|
case UnitTests => (p: Parameters) => Seq(
|
|
|
|
Module(new junctions.MultiWidthFifoTest),
|
|
|
|
Module(new junctions.HastiTest()(p)))
|
2016-09-20 23:14:30 +02:00
|
|
|
case _ => throw new CDEMatchError
|
|
|
|
})
|
|
|
|
|
2016-09-22 23:31:45 +02:00
|
|
|
class JunctionsUnitTestConfig extends Config(new WithJunctionsUnitTests ++ new BasePlatformConfig)
|
|
|
|
|
2016-09-20 23:14:30 +02:00
|
|
|
class WithUncoreUnitTests extends Config(
|
|
|
|
(pname, site, here) => pname match {
|
|
|
|
case uncore.tilelink.TLId => "L1toL2"
|
2016-09-22 23:31:45 +02:00
|
|
|
case UnitTests => (p: Parameters) => Seq(
|
|
|
|
Module(new uncore.devices.ROMSlaveTest()(p)),
|
|
|
|
Module(new uncore.devices.TileLinkRAMTest()(p)),
|
2016-10-24 22:07:00 +02:00
|
|
|
Module(new uncore.converters.TileLinkWidthAdapterTest()(p)),
|
2016-10-12 07:27:01 +02:00
|
|
|
Module(new uncore.tilelink2.TLFuzzRAMTest),
|
|
|
|
Module(new uncore.axi4.AXI4LiteFuzzRAMTest),
|
2016-10-17 05:18:49 +02:00
|
|
|
Module(new uncore.axi4.AXI4FullFuzzRAMTest),
|
|
|
|
Module(new uncore.axi4.AXI4BridgeTest))
|
2016-09-15 03:10:21 +02:00
|
|
|
case _ => throw new CDEMatchError
|
2016-09-22 02:11:57 +02:00
|
|
|
}
|
|
|
|
)
|
2016-09-15 03:10:21 +02:00
|
|
|
|
2016-09-22 23:31:45 +02:00
|
|
|
class UncoreUnitTestConfig extends Config(new WithUncoreUnitTests ++ new BaseConfig)
|
2016-09-29 00:11:05 +02:00
|
|
|
|
2016-09-29 02:15:12 +02:00
|
|
|
class WithTLSimpleUnitTests extends Config(
|
2016-09-29 00:11:05 +02:00
|
|
|
(pname, site, here) => pname match {
|
|
|
|
case UnitTests => (p: Parameters) => {
|
|
|
|
Seq(
|
2016-09-29 02:15:12 +02:00
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(1)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(4)),
|
|
|
|
Module(new uncore.tilelink2.TLRAMSimpleTest(16)),
|
|
|
|
Module(new uncore.tilelink2.TLRR0Test),
|
|
|
|
Module(new uncore.tilelink2.TLRR1Test),
|
|
|
|
Module(new uncore.tilelink2.TLRAMCrossingTest) ) }
|
|
|
|
case _ => throw new CDEMatchError })
|
|
|
|
|
|
|
|
class WithTLWidthUnitTests extends Config(
|
|
|
|
(pname, site, here) => pname match {
|
|
|
|
case UnitTests => (p: Parameters) => { 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)) ) }
|
|
|
|
case _ => throw new CDEMatchError })
|
|
|
|
|
|
|
|
class WithTLXbarUnitTests extends Config(
|
|
|
|
(pname, site, here) => pname match {
|
|
|
|
case UnitTests => (p: Parameters) => { Seq(
|
2016-09-29 00:11:05 +02:00
|
|
|
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)),
|
2016-09-29 02:15:12 +02:00
|
|
|
Module(new uncore.tilelink2.TLMulticlientXbarTest(1,4)) ) }
|
|
|
|
case _ => throw new CDEMatchError })
|
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)
|