From 802c11dbefd254fc02f592c6e52175c2e3057e94 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 26 Sep 2019 23:16:57 -0700 Subject: [PATCH] add some extra clarity [ci skip] --- docs/Customization/Firrtl-Transforms.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/Customization/Firrtl-Transforms.rst b/docs/Customization/Firrtl-Transforms.rst index 4e689192..f25bd43f 100644 --- a/docs/Customization/Firrtl-Transforms.rst +++ b/docs/Customization/Firrtl-Transforms.rst @@ -41,8 +41,10 @@ adding them to your Chisel source or by creating a serialized annotation ``json` Here is an example of adding a ``DontTouchAnnotation`` within the Chisel source. This annotation makes sure that a particular signal is not removed by the "Dead Code Elimination" pass in FIRRTL. -The example below shows both how to directly annotate the signal with the ``annotate`` function and the ``DontTouchAnnotation`` -class as well as the Chisel wrapper function called ``dontTouch`` that does this automatically for you (more `dontTouch `__ information): +The example below shows two ways to annotate the signal: + +* directly annotate the signal with the ``annotate`` function and the ``DontTouchAnnotation`` class if there is no Chisel API for it (note: most FIRRTL annotations have Chisel APIs for them) +* use the Chisel API/wrapper function called ``dontTouch`` that does this automatically for you (more `dontTouch `__ information): .. code-block:: scala @@ -55,13 +57,15 @@ class as well as the Chisel wrapper function called ``dontTouch`` that does this class Submodule extends Module { ... val some_signal := ... + + // how to annotate WITHOUT a Chisel API/wrapper annotate(new ChiselAnnotation { def toFirrtl = DontTouchAnnotation(some_signal.toNamed) }) - // or use the Chisel wrapper for this - + // how to annotate if there is a Chisel API/wrapper chisel3.dontTouch(some_signal) + ... }