b429c185a336f40135979395c87c9983.ppt
- Количество слайдов: 20
Matlab as a Design Environment for Wireless ASIC Design Erik Lindskog Beceem Communications, Inc. elindskog@beceem. com June 16, 2005
Introduction to Beceem l Wireless communication system developer l Using Matlab for ASIC design Product development phase: l Algorithm development - Matlab l Algorithm and system modeling - Matlab l RTL design – Verilog l RTL verification - System. C, Verilog and Matlab l SW design – C++ l SW verification – C++ and Matlab
Advantages With Matlab l Rich support for mathematical operations and visualization l Most common tool for signal processing research l Graduates in communication and signal processing engineering are typically highly familiar with Matlab l Fewer people have experience in programming in C++ l Full fledged programming as well as scripting language l Interpretating language – Integrates well with other programs l Powerful debugging support l Not a typed language - Highly ‘moldable’
Matlab Simulator Design l Common simulator for: ¤ PHY algorithm development and studies ¤ Small network full PHY studies of ¢ ¢ ¢ Effect of co- and adjacent channel interference on PHY algorithms Synchronization and hand-over Link-adaptation ¤ Fixed point modeling ¤ RTL signal processing reference l Standalone code for ¤ Independent lower complexity studies ¤ Generation of independent references
Matlab Simulator Design, cont. l Organization ¤ Common core source code ¤ Simulation examples driving source code ¤ Single file with default parameter settings enables developers to work reasonably independently while using the common code
Open Source/Freeware Software l CVS - Concurrent Version Control system l Cygwin – Unix emulator for Windows l CVS Tortoise – File browser based CVS client ¤ Integrates external free software tools like Exam. Diff for CVS diffing l Win. CVS – GUI based CVS client
Signal Processing Design Flow l Module design ¤ In standalone code, or ¤ Direct in main simulator l Floating point system modeling ¤ Integration of modules into main simulator ¤ Floating point performance simulations
Signal Processing Design Flow, cont. l Fixed point module design ¤ In module design environment to excite corner cases ¤ Integrated in main simulator to get realistic signal levels l Fixed point system modeling ¤ Full system fixed performance simulations ¤ Ability to turn fixed point on/off per block ¤ Analysis of quantization statistics to pin-point problems
Matlab – RTL Design Flow l Matlab fixed point design handed over to RTL l Module verification ¤ File-in-file-out test vector comparison between MATLAB and Verilog ¤ Extensive testing to cover corner cases in fixed point arithmetic ¤ Random signals to guarantee fixed point equivalence
Matlab – RTL Design Flow l System testing ¤ Side-by-side testing of Verilog and MATLAB in System. C testbench ¤ MATLAB simulator compiled and linked to C-program called from System. C testbench ¤ Verilog code excited from System. C testbench ¤ Verilog simulation speed is the limiting factor l Common test for Matlab and Verilog code ¤ Directed testing for initial coverage ¤ Random testing for extensive coverage l All system tests part of Matlab automated regression testing
Matlab – SW Design Flow l Matlab fixed point design handed over to SW l Module verification ¤ File-in-file-out test vector comparison between MATLAB and C++ SW code ¤ Simulation example test cases in Matlab for C++ SW code l System testing ¤ Side-by-side testing of SW on FPGA and Matlab system simulation
Fixed Point Modeling l Currently performed in regular Matlab l Regular arithmetic operations where precision is allowed to grow l Quantization with quantization functions where precision is to be limited l Automatic fixed point statistics collection
Object Oriented Fixed Point Modeling l Simultaneous floating and fixed point l Fixed point format embedded in variable l Matlab object oriented support limited ¤ Assignment operator cannot be overloaded – Traditional quantization with assignment operation in C++ cannot be done ¤ Function overloading only sensitive to first argument l Catalytic have an object oriented fixed point modeling tool l Matlab also now have an object oriented fixed point toolbox
Fixed Point Analysis l Analysis of fixed point quantization statistics ¤ Headroom – E. g. headroom above 67 th percentile ¤ Signal to quantization noise ratio – SQNR ¤ Over- and underflow ratios ¤ Signal level histogram l Full system simulation fixed point analysis l Example Matlab implementation ¤ Fixed point analysis function ¤ Example call: fxp_stat(x, 2, 5) ¤ Store statistics in function call stack tree structure ¤ Analyze statistics after completed simulation l Block-swapping analysis ¤ Switching of fixed and floating point blocks
Lab use of Matlab Simulator l Modeling of Tx or Rx part of modem against HW Rx or Tx modem l Interoperability testing with signal generators and signal analyzers l MAC-PHY interoperability testing l Simple RF testing l Over the air transmission demonstration when combined with RF
Matlab Regression Testing l Developer regression testing ¤ To many tests to run all ¤ Directed and/or randomly selected set of tests. l Automated Regression Testing ¤ All regression tests checked for each block of commits ¤ Breaking commit identified for each failing regression test ¤ Result of testing automatically emailed to developer ¤ High SNR Tx-Rx tests ¤ Single SNR BER tests ¤ Simulation example execution tests ¤ RTL verification tests mimicing exact use in RTL test bench
Matlab Regression Testing, cont. l Automated Random Testing ¤ Script generating random traffic for testing of Matlab simulator and RTL ¤ Periodic random testing of code in repository with random Tx-Rx tests ¤ Result automatically emailed to developers ¤ Provides extensive coverage l Scripting language - Matlab
Speeding up Matlab Code l Scalar loops ¤ Loop over scalar operation are slow l Vectorization ¤ Convert scalar loops to matrix operations l Conversion to C-code l Compilation of Matlab ¤ Removes the need for other language ¤ Limits the need for vectorization of code ¤ Limits duplication of code in Matlab and C ¤ Example compiler: Catalytic Matlab Compiler
Summary Matlab l Powerful tool for signal processing design l Lessens ‘distance’ between algorithms and HW l Facilitates for algorithm designers to be closely involved in fixed point testing and RTL verification l Interacts easily with other programs and equipment l Attractive design environment for ASIC design
b429c185a336f40135979395c87c9983.ppt