420 likes | 608 Views
Developing. The CASPER Library. Optimization, Improvement and Creation. Hong Chen University of California, Berkeley. Simulink. 1. Overview of the Casper Library 2. Developing the Library Project ongoing Methodology, introduction to xBlock 3. Examples FFT Optimization CIC Filter
E N D
Developing The CASPER Library Optimization, Improvement and Creation Hong Chen University of California, Berkeley
Simulink • 1. Overview of the Casper Library • 2. Developing the Library • Project ongoing • Methodology, introduction to xBlock • 3. Examples • FFT Optimization • CIC Filter • Parallelizers
User Perspective The Casper Library DSP Blocks Drag-and-Drop Easy Parameterization
Repository Repository Library Library 1 Library 2 Sub-Library Sub-library 1 Sub-library 2 Sub-library Blocks Block 1 Block 2 …
mlib_devel Repository Libraries casper_library gavrt_library xps_library Sub-libraries FFTs PFBs … Complex FFT FFT_wideband_real … … … Blocks FFT_biplex … … Sub-blocks
Library Casper_library Sub-libraries FFT PFBs Reorder Scope … Complex FFT Blocks … Reorder Sub-blocks
Casper_library Library Sub-libraries FFT PFBs Reorder Scope … Complex FFT Blocks … Reorder Sub-blocks ??? ??? What’s this?
Library Casper_library Sub-libraries FFT PFBs Reorder Scope … Complex FFT Blocks … Reorder Sub-blocks
Libraries/Sub-libraries: Collection of Blocks Blocks/Sub-blocks: Parameterized Subsystems consist of lower-level Blocks (Lowest level: Xilinx Blocket/ Simulink Blocks)
Developer Perspective Algorithm Graphic Interface Resource The Casper Library
Block: Parameterized Subsystem Reduced Algorithms DSP: Algorithms can be decomposed to basic operations such as , etc.
The Best is Yet to Come…1. Optimization (resource, power consumption)2. Upgrade (add more features to a block)3. Creating New Block https://casper.berkeley.edu/wiki/DSP_Blockset_Upgrades
How to ?Tutorial 7: Implementation of a Green Block Authors: Mekhala MuleyDocumentation on Wiki page (Block documentation, Development Standarisation, Simulink Style Guide, etc.)
Overview of the Traditional Implementation Methodology1. Part I: Graphical System Design2. Part II: Scripting reuse_block() add_line() delete_lines() …
Introducing xBlock • A Xilinx product • An alternate way of implementing blocks • Completely Text-based • Corresponding Tutorial (unofficial): Tutorial 12: Implementation of a Bluish-Green BlockAuthors: Hong Chen
Overview of the xBlock Implementation Methodology • 1.Part I: Graphical System Design • 2.Part II: Scripting • xlsub2script() • + minor changes • 1. Scripting • xlnport (), xOutport(), xSignal(), xBlock() • …
xblocks_devel: an experimental alternate version of casper_library
Advantages Version Control More Sensitive to Errors Make MSSGE faster & more stable Drawing Time No Explicit Layouts Drawbacks
Example 1. FFT Optimization1. Optional Unscrambler Block (by Billy Mallard)2. DSP48E in Butterflies (by Suraj Gowda)3. Bit Growth 4. Removing the Duplicated Logic5. Using Dual-port BRAMs (by Ryan Monroe)
Example 2. Parallel CIC Filter1. A whole-new Block2. Supports Arbitrary number of Parallel Input Streams3. Supports both Recursive and Non- recursive Structures4. Polyphase Optimization Available for Non-recursive Structures 5. A new FIR? Uses adders & shifts instead of multipliers6. Other *Bonus* Blocks?
Implementing a Parallel CIC Filter • Decide the Algorithm to use • Decide the Parameters • Work out the detailed implementation of the Algorithm • Divide the CIC Filter into sub-blocks • Code • Test & Debug
Example 3. Educational Tools: ParallelizersNew Blocks Parallel Accumulator Parallel Integrator Parallel Downsampler Parallel Scope Parallelizer …
Example 3. Educational Tools: Parallelizers Parallel Downsampling (4 inputs, ↓3)
Example 3. Educational Tools: Parallelizers Parallel Downsampling (4 inputs, ↓3)