Custom Logic Tutorial - Using the Accumulator

Frozen Content

Now the design has been programmed into the physical FPGA device, we can 'play' with our simple accumulator design and test that it works!

  1. In the Devices view, double-click on the icon for the Custom Instrument, located in the Soft Devices chain. The associated instrument panel – the custom GUI – will appear in the Instrument Rack - Soft Devices panel.
     

    Figure 1. Accessing the customized GUI.
     
  2. Use the lower Numeric Panel control to enter the value that you wish to add. Click on a digit to increment it. Repeatedly click on a digit to cycle through the range 0-9.
     
  3. Once you have entered the value, click the Add button. The upper Numeric Panel display will reflect the accumulated total.
     
  4. Repeat steps 2 and 3 to satisfy yourself that the displayed total is indeed the accumulated total in each case.
     

    Figure 2. Example of the accumulator in action!

That concludes this tutorial. This simple example has introduced you to how you can develop your own custom FPGA logic using the C programming language and hook that logic into a design by way of C Code Symbols and C Code Entries. Armed with this basic understanding, you can now embark on more complex designs.

The following example projects demonstrating further, the use of C-based custom logic in FPGA designs:

  • CHC_Accumulator.PrjFpg
  • CHC_Calculator.PrjFpg

Both projects can be found in correspondingly named folders, in the \Examples\NB2DSK1 Examples folder of your Altium Designer installation. The Accumulator project is a variation of the simple accumulator design we have created in this tutorial, but demonstrating how the custom logic is interfaced to a 32-bit processor, using a Custom Wishbone Interface component.

You are reporting an issue with the following selected text and/or image within the active document: