clarification of AddressRange arguments

This commit is contained in:
Howard Mao
2019-09-08 16:19:21 -07:00
parent 334e443003
commit e9bce0fc3d

View File

@@ -29,7 +29,7 @@ object from testchipip like so:
name = "my-client", name = "my-client",
sourceId = IdRange(0, 4), sourceId = IdRange(0, 4),
requestFifo = true, requestFifo = true,
visibility = Seq(AddressSet(0, 0xffff)))) visibility = Seq(AddressSet(0x10000, 0xffff))))
lazy val module = new LazyModuleImp(this) { lazy val module = new LazyModuleImp(this) {
val (tl, edge) = node.out(0) val (tl, edge) = node.out(0)
@@ -53,13 +53,13 @@ If it is set to true, the client will request that downstream managers that
support it send responses in FIFO order (that is, in the same order the support it send responses in FIFO order (that is, in the same order the
corresponding requests were sent). corresponding requests were sent).
The ``visibility`` argument specifies the address ranges that the client The ``visibility`` argument specifies the address ranges that the client will
will access. By default it is set to include all addresses. In this example, access. By default it is set to include all addresses. In this example, we set
we set it to contain a single address range ``AddressSet(0, 0xffff)``, which it to contain a single address range ``AddressSet(0x10000, 0xffff)``, which
means that the client will only access addresses in this range. Clients means that the client will only be able to access addresses from 0x10000 to
normally do not specify this, but it can help downstream crossbar generators 0x1ffff. normally do not specify this, but it can help downstream crossbar
optimize the hardware by not arbitrating the client to managers with address generators optimize the hardware by not arbitrating the client to managers with
ranges that don't overlap with its visibility. address ranges that don't overlap with its visibility.
Inside your lazy module implementation, you can call ``node.out`` to get a Inside your lazy module implementation, you can call ``node.out`` to get a
list of bundle/edge pairs. If you used the TLHelper, you only specified a list of bundle/edge pairs. If you used the TLHelper, you only specified a
@@ -116,7 +116,11 @@ is a TLManagerParameters object.
The only required argument for ``TLManagerParameters`` is the ``address``, The only required argument for ``TLManagerParameters`` is the ``address``,
which is the set of address ranges that this manager will serve. which is the set of address ranges that this manager will serve.
This information is used to route requests from the clients. This information is used to route requests from the clients. In this example,
the manager will only take requests for addresses from 0x20000 to 0x20fff.
The second argument in ``AddressSet`` is a mask, not a size.
You should generally set it to be one less than a power of two. Otherwise,
the addressing behavior may not be what you expect.
The second argument is ``resources``, which is usually retrieved from a The second argument is ``resources``, which is usually retrieved from a
``Device`` object. In this case, we use a ``SimpleDevice`` object. ``Device`` object. In this case, we use a ``SimpleDevice`` object.