Build a Logic Analyzer / Oscilloscope with VisualApplets - Function Generators, Digital IOs, Visualization, Trigger, Text Overlay - No additional Software required

  • Hello VisualApplets community


    Today I like to present one of the most complex VisualApplets implementations ever made: A Logic Analyzer fully programmed in VisualApplets using graphical output visualization and text overlays. The applet can be fully used in microDisplay without the use of any extra software or hardware. The implementation is open source so you can include it into your projects or if you are keen for it go and understand and modify it.


    Quick Start: Download the attached HAP file and load it to a marathon VCL. Done!


    Table of Content:

    1. Features
    2. Application Areas
    3. Installation, Usage and Requirements
    4. Implementation

    1. Features

    The following screenshot shows the usage in microDisplay:

    pasted-from-clipboard.png


    The applet has the following functions:

    • latching of digital signals at the frame grabber IOs or internal sources
    • Function generators
      • define the period
      • sequence length
      • downscale
      • delays
    • output of the signals to the frame grabber IOs
    • Logic Analyzer functionality - The usage is style of any other soft- or hardware logic analyzer -> ease of use
      • edge sensitive trigger
      • resolution in the range of 16ns to 32sec
      • 8 channels with arbitrary selection of signals
      • text output for settings and cursor positions
    • statistics module to count signals and measure min/max periods

    2. Application Areas

    Debugging of applets and system setups require logic analyzers to answer questions like

    • How does my signal look like?
    • Is there an encoder jitter?
    • Is my trigger output correct?
    • Is the number of trigger inputs the same as the outputs? Is there a frame response for every trigger?

    You have two options to use the logic analyzer:

    1. Use the ready-made applet and connect the frame grabber IOs to your encoder or use a crosslink cable to monitor the signals of a second frame grabber. The following pictures show example of crosslink cables. We can send you instructions on how to make them on request.
      LoopbackFrontIO.pngLoopbackInternal.png
    2. Use the logic analyzer as a VisualApplets hierarchical box and integrate it into you own design.

    Application Example 1: Emulate an Encoder Signal and monitor the Behavior of an AcquisitionApplets

    One possible application is the emulation of encoder signals. The generators in the applet can emulate an encoder signal with two traces A and B. Moreover an image trigger signal can be emulated.

    Using the crosslink cables you can then send the emulated signals to your device under test e.g. an AcquisitionApplets. Configure the applet to your requirements.

    Next monitor the applets LVAL and FVAL signals to see if the triggering works correct.

    Application1_encoderEmulation.png


    Application Example 2: Monitor the Correct Function of the Light Controller Applet

    In the following screenshot you can see the output of an applet I made recently. The applets intention is to control 3 different lights from one trigger and use different exposure times. By monitoring the signals it could be ensured that the applet works correct.

    pasted-from-clipboard.png

    3. Installation, Usage and Requirements

    Attached you can find a HAP file "HardwareTest_LA_V32.hap" for mE5 marathon VCL frame grabbers. You can directly copy the file into your runtime %SISODIR5%\Hardware Applets\mE5-MA-VCL directory, flash it to the frame grabber and load it in microDisplay.


    The apple is extensively using the operators from the Parameters library. So the applet can be easily used.

    All relevant parameters to setup the applet are in the parameter tree category "Parameters". Do not change any of the implementation parameters.

    pasted-from-clipboard.png


    In the following a short explanation of the parameters is listed:

    • Parameters -> Logic_Analzer
      In this category all relevant parameters to setup the logic analyzer are included. The values are very similar to soft- and hardware logic analyzers so usage is easy.
      • TriggerMode
        Start = Continous Grab for each trigger. After a time out of no triggers the applet will run in untriggered free run mode
        Stop = Stop of the triggering. No more signals are captured
        Single Shot = The logic analyzer will wait for the next trigger condition. As soon as it recorded the sequence after the condition the recording will be stopped. You need to stop and restart the trigger mode.
      • TriggerTimeout
        Time after the logic analyzer switches to FreeRun mode . Only available in TriggerMode = Start
      • TriggerEdge
        Rising or falling edge.
      • Trigger Channel
        Select the trigger channel. Each trigger condition is marked with the white arrow in the waveform window.
      • xDiv
        Scale the time of a x-division i.e. the time of the one of the 10 waveform areas
      • Cursor 1 and Cursor 2
        Positons of the two blue lines and measured times.
      • Shift
        Shift the trigger position to the beginning or end of the waveform window
      • Channels
        for all of the 8 channels you can arbitrarily select a source. Explanation of the sources can be found below.
    • Parameters -> Inputs
      Define the polarity of the digital inputs and set a debounce time.
    • Parameters -> Generators
      The generators are used for internal signal generation. You can use up to four independent frequency generators. Define the period and sequence length for each generator.
    • Parameters -> Pulse_Form
      The generated signals can get a pulse width, delay and downscaling.
    • Parameters -> Outputs
      Arbitrary mapping of the generated signals or digital inputs to the digital frame grabber outputs is possibl
    • Parameters -> Statistics
      The applet includes 8 statistic modules which can count the pulses, measure the current, min and max period as well as signal width. This is for example a very good source to detect encoder jitters.
    • Other Parameters
      The logic analyzer was added to the existing frame grabber test applet. For a description of this applet check the applet documentation in http://www.siliconsoftware.de/…es%20hardware%20test.html

    If you want to include the H-Box into your own designs simply copy it and connect signal sources. The output needs to be directly connected to a DMA channel.

    pasted-from-clipboard.png

    It has all parameters of the logic analyzer category explained above.


    Note the following requirements:

    • At minimum Runtime 5.6.1 is required. In Runtime 5.6 microDisplay will not be fast enough.
    • If you want to build the HAP file on your own you need
      • VisualApplets 3.1 or higher (use VisualApplets 3.2 to set units in the parameter translates and references)
      • Parameters library extension

    4. Implementation

    Attached you can find the VisualApplets files. As mentioned it is one of the most advanced applets ever made with VisualApplets. And for sure VisualApplets was not made for this type of FPGA implementations. However, it shows you the great unlimited possibilities with VisualApplets.


    Even though it is one of the most complex VisualApplets design (2272 modules) the resource consumption is low. The H-Box LogicAnalyzer only requires 6300 LUTs 37BRAMs and 2 ALU.