From e627f547cfca8a8a4f9e2bad445d66ceec18a18d Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 6 Mar 2023 11:30:30 -0600 Subject: [PATCH] spec: fix forwarding-references-upwards header org, add downwards blurb. --- spec.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/spec.md b/spec.md index 4461d712..46f6ca77 100644 --- a/spec.md +++ b/spec.md @@ -1919,7 +1919,7 @@ module RefProducer : define thereg = probe(myreg) ``` -### Forwarding References Upwards +#### Forwarding References Upwards Define statements can be used to forward a child module's reference further up the hierarchy: @@ -1951,6 +1951,26 @@ module Forward : define p = f.p[0][1] ``` +#### Forwarding References Downwards + +Define statements can also be used to forward references down the hierarchy +using input reference-type ports, which are allowed but should be used +carefully as they make it possible to express +invalid reference paths. + +See [@sec:input-references] for more details, a small example is given below: + +```firrtl +module UnusedInputRef : + input r : Probe> + +module ForwardDownwards : + input in : UInt<1> + + inst u of UnusedInputRef + define u.r = probe(in) +``` + ### Force and Release To override existing drivers for a `RWProbe`{.firrtl}, the `force`{.firrtl}