Shortening Verification Processes by Using DPF with MATLAB
Shortening Verification Processes by Using DPF with MATLAB Runtime Package Presenter: Shmuel Amrusi CEO Simplus Verification May 13, 2019 May 1
MATLAB: powerful tool for components with multi mathematical calculation, such as wireless, modem and others Problems (1): 1. MATLAB code is not accessible to the verification environment 2. The verification environment duplicates the effort to build the Golden Model (GM) in System-Verilog/SPECMAN/etc. 3. MATLAB test vectors for reading/comparing/driving the verification environment result in hundreds mega bytes space 4. Parsers are required for each data type 5. The effort to achieve same GM is expensive and there is no reuse for code changes May 13, 2019 2
MATLAB: powerful tool for components with multi mathematical calculation, such as wireless, modem and others Problems (2): 6. Need MATLAB license for any simulation 7. When an error is detected, the effort to understand if the problem is in MATLAB or HDL is extremely large 8. Long test is problematic • • need to restart MATLAB engine many times - expensive in terms of Runtime need a big disk space 9. The effort to return feedback from design to MATLAB, is extremely large • Such as communication channels that are influenced by history May 13, 2019 3
Bad Verification Process Texts Creation, Writing Files, Parsing and Processing Verification environment Call MATLAB Parse results Create configuration files Golden Model MATLAB Simulation MATLAB simulation results To text Files SV/E/C++ Drivers + Monitor The overhead of calling MATLAB, is around 5 -6 seconds per call, except text parsing. DUT Checkers /Coverage May 13, 2019 4 4
Solution: DPF - Digital Processing Framework Import any MATLAB capabilities to Verification Environment ü DPF: MATLAB interface library for calling MATLAB functions ü Create Shared-Library/H file (with mcc) ü M call, Becomes a C++ function. . DPF: MATLAB interface ü DPF: higher level library. C++/SV/E Interface ü C++/SV/E Objects, wrapper of object MATLAB 'mx. Array’ ü ü ü Pointer to MATLAB engine in Runtime. Transferring information from side to side. ü ü ü mx. Array: father of all MATLAB objects. Using pointer only. MATLAB & Simulator & Verification 1 CPU process. Using Runtime MAT library- No need license & Faster. May 13, 2019 5
DPF: Instead Files, Live Objects BB File PSU File BCH File LDPC File PLF File PFB File function [Bb, Psu, Bch, Ldpc, Plf, Pfb] = Ref. Modem(NFrames, Mod. Code, Frm. Siz, Pilots. On, Sym. Rate, Debug) Using MATLAB C COMPILER – export m files to C++ function mlf. Ref_modem(int nlhs, mx. Array *plhs[], int nrhs, const mx. Array *prhs[]); // Vector In / Vector Out Vector In, parameter from TB (Test Configuration). Vector Out, Stimuli and Test points results. 6 May 13, 2019 6
Performance Improvement using DPF 1. 2. 3. 4. 5. 6. 7. 8. MATLAB is run only once. • save 5 -6 seconds for each iteration (could have been hundreds) Saving 1 -2 weeks for parser building There is no need for coordination between Algorithm/Verification/Hard-Ware engineers A new code of algorithms engineers goes directly into the testing environment MATLAB project translated to 1 SO/H file, just need to include and compile. This process takes 60 seconds, done 1 time per a new MATLAB code version The simulation time for MATLAB code is very short because of ‘C’ compiled code A call to MATLAB is done without reading files, but rather by calling to function C, where parameters are living objects Restoring running results is easy - just use the same seed May 13, 2019 7
Example: Using MATLAB Result in Simulation // Main Function using MATLAB as Golden Model for (unsigned pkt. Ind = 0; pkt. Ind < m_Num. Packet; pkt. Ind ++) { m_Matlab. Modem->Call. Modem(); //Call MATLAB to simulate modem + Prepare all test point //Using result in verification environment cout<<" Start Drive packet "<<pkt. Ind<<" T: "<<Sim. Time()<<endl; Drive. BBDescriptor(pkt. Ind); Set. Pl. Header(pkt. Ind); Drive. BBFrame(pkt. Ind); //Collectors monitor Coverage working always to listen and check the design. } 8 May 13, 2019 8
Debug Simulation by Eclipse 9 May 13, 2019 9
Thank You! Shmuel@Rtl. Verification. com 10 May 13, 2019 10
- Slides: 10