Catapult Fir Walk Through
Catapult Fir Walk Through
Catapult Fir Walk Through
This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this document may duplicate this document in whole or in part for internal business purposes only, provided that this entire notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable effort to prevent the unauthorized use and distribution of the proprietary information.
Trademarks that appear in Mentor Graphics product publications that are not owned by Mentor Graphics are trademarks of their respective owners.
6.
If you to preserve your modified settings for future Catapult C sessions, you must save the settings to disk. Choose the Tools > Save Options menu item and your options are saved in a .catapultc directory in you home directory on UNIX/Linux systems, or the system registry on Windows systems. The best way to save your options is to enable the Save Settings on Exit option (under General options). This will ensure continuity of the default options across Catapult C sessions. NOTE: The default option settings for Project Initialization are only read when a new project is started. If you modify these settings, you must start a new project in order for your changes to take effect.
Exercise 2 Analysis
Do the following: 1. Set your Working Directory. 2. Add the fir_filter.cpp input file. 3. Click on Setup Design in the Design Bar and choose your target technology and clock speed. Any technology will do, but Virtex-E and 50 MHz is a good choice for this example. 4. Click on Generate RTL in the Design Bar. This will generate all of the output files. 5. Now examine the results. Look at the DataPath schematic, reports, etc., and see what they say. In the RTL and the schematic you should be able to get a general feel for the structure that was built. You will find one multiplier that feeds into an accumulator. If you look back in the source code, youll see the line of C source code where the multiply and accumulate (in this case a +=) comes from. Youll also see an FSM and some control logic in the schematic. If you click on the DataPath schematic, the FSM and control logic will be filtered out. Its important to understand the RTL that will result from the C code, at least at a high level. Examine the schematic and compare it to the C code until you can understand how the tool generated that Schematic.
Advanced Exercises
This section covers some other things to try with this FIR design. These are more difficult exercises. 1. To get more experience with the Gantt chart and memories, try mapping the internal register to a
2.
single-port memory. Leave the inner loop rolled and then go look at it in the Gantt chart. How can you re-write the source code to get a faster design in this case? If the loop is left rolled, Catapult C cant determine the optimal bitwidth for the temp variable. Variables that are used as accumulators, like temp, cant have their bitwidths accurately analyzed. What happens when the loop is unrolled? How are the adder bitwidths different? Update the bitwidth for temp to get the optimal result when the loop is left rolled.