Forum Discussion

PhilipJ451's avatar
PhilipJ451
Icon for New Contributor rankNew Contributor
4 years ago

Force Quartus to keep a signal for SignalTap to use

Hi,

I am hoping someone may have an answer to a problem I have wrestled with for a long time.

I make a lot of use of SignalTap to analyze what is going on inside my FPGA design but so often I find that Quartus has optimized the required signal away and it cannot therefore be included as a 'node' in SignalTap.

I have tried applying the attributes 'keep' 'preserve' and 'noprune' but none of them work. This normally means that I compile the design, go to SignalTap and find the node isn't listed so I then have to write some dummy VHDL code to make use of the signal, re-compile and try again. This is really annoying if it's a big design and takes 5 - 10 minutes to compile...

The only way I have found to keep a signal is to use it to drive a pin of the chip, luckily in the design I'm working on at the moment I have a number of pins on the chip (5CEBA2F17C8N) that are not tracked to anything so I can name them as 'Hold00' to 'Holdxx' and assign signals to them, but this seems ridiculous!!

Surely there is a way to tell the optimization stage of the compilation that I want to keep a signal, even if it is not used in the internal logic?

Any help or suggestions would be gratefully received

PhilipJ

10 Replies

  • MathiasB's avatar
    MathiasB
    Icon for Occasional Contributor rankOccasional Contributor

    Hi,

    I think it may depend on how you add signals to your Signal Tap.

    First you do not need to run the whole compilation, just elaboration is enough (saves a lot of time).

    Then when you use the Signal Tap's node finder, select "Signal Tap: pre-synthesis" in the filter options.

    Save and do full compilation this time. It should work. At least this is what I do, though I do not think I have unused internal logic to monitor in my designs.

    Hope that helps

  • sstrell's avatar
    sstrell
    Icon for Super Contributor rankSuper Contributor

    I'm presuming you are using Quartus Standard because that's a Cyclone V device. Pro now has the new "preserve for debug" feature just for this issue.

    Are you trying to tap pre-synthesis or post-fit nodes? I'm presuming post-fit because if you tap pre-synthesis nodes, they should be preserved through compilation. If you can, try using the Signal Tap pre-synthesis filter in the Node Finder when you tap nodes and see if that makes a difference.

  • Hi Philip,


    There a few suggestions have been provided by MathiasB and sstrell to your query.

    Kindly try those suggestions and do let me know if the issue has been addressed.

    Please let me know if you have any further question.


    Regards,

    Pavee


    • PhilipJ451's avatar
      PhilipJ451
      Icon for New Contributor rankNew Contributor

      Hi, replying to all of you who have been kind enough to respond:

      I have tried the suggested options and none of them seem to work.

      To be clear I am using Quartus Prime Lite so is it likely that these options may be "crippled" in this free version?

      To give an example:

      I am working with serial bit streams that consist of LRCLK (96kHz square wave), an SCLK (256 * LRCLK) and a serial stream of data bits at SCLK frequency (some may recognise this as a TDM8 digital audio stream).

      SCLK is the highest frequency I have in the design (24.576 MHz) so to capture the signals in SignalTap I use a 4* PLL to give me a Global 98.304 MHz clock, SignalTap is the only part of the design that uses this Global clock.

      After compiling; this clock is not presented as an available node for SignalTap's clock configuration, I have tried every one of the available filters in the Node Selector but there's nothing.

      If I go back to the VHDL code and connect Global_98 to a device pin and then re-compile, the node is now available and I can select it in SignalTap.

      HOWEVER; if I then go back to the VHDL code and delete Global_98's connection to a pin then after compilation SignalTap now shows Global_192 in red text which I take to mean this node has been optimized out! (even though SignalTap is using it) and if I try to capture data with SignalTap is says "waiting for clock".

      This is not the only case where nodes are removed by optimization but it is probably the most frustrating.

      As I mentioned, I have been "working around" this behaviour by applying signals to device pins to force them to remain but I don't understand why my extensive use of "keep" "preserve" and "noprune" don't achieve what I expect of them.

      Thanks for you replies and interest in my problem

      regards

      PhilipJ

      • PhilipJ451's avatar
        PhilipJ451
        Icon for New Contributor rankNew Contributor

        My problems with this optimising gets worse...

        I have just been looking at some signals with SignalTap and a "write strobe" signal that I generate is designed to be active low for 1 cycle in every 128.

        I have fed this signal to a pin and examined it with an oscilloscope and it is exactly what I expect it to be ------|_|---------

        _BUT_ when I capture the same node in SignalTap it is shown upside down, ________|-|_____________

        What is SignalTap doing to show my signals incorrectly ?

        How can I check if my logic is working the way it is designed to work if I can't trust what SignalTap is showing me ?

        Please, any advise, I'm going a bit crazy here

        regards

        PhilipJ

  • MathiasB's avatar
    MathiasB
    Icon for Occasional Contributor rankOccasional Contributor

    I happen to have a design in Quartus Prime Lite 20.1 that has a PLL with multiple outputs, but only one is actually used in the design.

    I could see one of the unused clock outputs in Signal Tap node finder and select it; add a signal to monitor and recompile. I haven't seen any complain by Quartus, so I assume your case should be working too.

    I cannot test this on an actual board though, but at least I can see that an unconnected PLL output can be selected in Signal Tap.

    Could you parse the Quartus (critical) warnings for anything related to this clock when it is not connected to anything (other than Signal Tap)? Even if it doesn't seem much?

    As for the problem of the inverted signal, I don't know much more. I suppose the write_strobe signal is not connected to a differential pair and you are not monitoring two different poles? (Sorry if the question is dumb, but I have found Signal Tap to be reliable in my use cases).

    Good luck

    • PhilipJ451's avatar
      PhilipJ451
      Icon for New Contributor rankNew Contributor

      Hi MathiasB,

      thanks for your suggestions.

      I resolved the issue with the inverted signal thanks for your suggestions. I used the "pre-synthesis" filter in SignalTap's node selector and tapped the signal inside a "component" rather than in the top-entity where it is generated. This subsequently displayed it the right way up (see my reply to sstrell...).

      I will do as you suggest and look for references in the Quartus (critical) warnings.

      No question is dumb and thank you for asking them, a friend of mine's Dad used to say "the only dumb question is the one you don't ask", I appreciate your input.

      regards

      PhilipJ

  • Hi Philips,


    I’m glad that your question has been addressed, I now transition this thread to community support.

    If you have a new question, feel free to open a new thread to get the support from Intel experts.

    Otherwise, the community users will continue to help you on this thread.

    Thank you.


    Regards,

    Pavee