1
0

tilelink2 RegisterRouter: allow sub-4k devices in order to make useful unit tests

This commit is contained in:
Wesley W. Terpstra 2016-09-11 15:43:04 -07:00
parent 26f9e2dfbd
commit 9560df537c

View File

@ -105,9 +105,8 @@ class TLRegisterRouter[B <: TLRegBundleBase, M <: LazyModuleImp]
(moduleBuilder: (=> B, TLRegisterRouterBase) => M) (moduleBuilder: (=> B, TLRegisterRouterBase) => M)
extends TLRegisterRouterBase(AddressSet(base, size-1), interrupts, concurrency, beatBytes) extends TLRegisterRouterBase(AddressSet(base, size-1), interrupts, concurrency, beatBytes)
{ {
require (size % 4096 == 0) // devices should be 4K aligned
require (isPow2(size)) require (isPow2(size))
require (size >= 4096) // require (size >= 4096) ... not absolutely required, but highly recommended
lazy val module = moduleBuilder(bundleBuilder(TLRegBundleArg(intnode.bundleOut, node.bundleIn)), this) lazy val module = moduleBuilder(bundleBuilder(TLRegBundleArg(intnode.bundleOut, node.bundleIn)), this)
} }