1 / 27

VisualDSP++ and Test Driven Development

VisualDSP++ and Test Driven Development. Prelaboratory assignment information. Concepts. Stages in a conventional radio Stages in a software radio Goals for the “long term” project Building a VisualDSP project using TDD See web for more specific details Demo if time is available.

audra-ford
Download Presentation

VisualDSP++ and Test Driven Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VisualDSP++ and Test Driven Development Prelaboratory assignment information

  2. Concepts • Stages in a conventional radio • Stages in a software radio • Goals for the “long term” project • Building a VisualDSP project using TDD • See web for more specific details • Demo if time is available Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  3. Test Driven Development • Customer Tests – personally find these hard to do • Not clear if there is yet “a real process available” • Developer Tests – have found many advantages CUSTOMER DEVELOPER Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  4. Software “AM” radio concept RF STAGE Antenna Pickup AUDIO STAGE Low passFilter+ amplifier Low passFilter Rectifier Mixer LocalOscillator IF STAGE Audio out Most stages handled with high speed software Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  5. Rectification algorithm Choices are • C++ compiler in DEBUG mode • int *RectifyDEBUG(int initial[ ], int final, int N); • float *RectifyDEBUG (float initial[ ], float final, int N); • C++ compiler in RELEASE mode • int *RectifyRELEASE(int initial[ ], int final, int N); • float *RectifyRELEASE(float initial[ ], float final, int N); • “US” in ASSEMBLY mode • int *RectifyASM(int initial[ ], int final, int N); • float *RectifyASM(float initial[ ], float final, int N); • “US” in OPTIMIZED ASSEMBLY mode • int *RectifyOPTASM (int initial[ ], int final, int N); • float *RectifyOPTASM (float initial[ ], float final, int N); Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  6. Files and directories neededTDD and many tests files available on web ENCM515 RectifyTests HalfWaveDebugTests.cpp HalfWaveReleaseTests.cpp HalfWaveASMTests.cpp HalfWaveTimingTests.cpp TDD ActivateTestsmain.cpp Check web for updates TS201_char8_TDDLib_4Dec04.dlb TDD_include25Nov04.h TDD_Tests25Nov04.h TigerSHARC versions to come hardwareTDD.h datastoreTDD.h Rectify Rectify.h Rectifymain.cpp CustomerRectifymain.cpp TS201.ldf HalfWaveDebug.cpp Rectify.prj HalfWaveRelease.cpp HalfWaveASMint.asm HalfWaveASMfloat.asm Lab1 Lab1Tests Lab2 Lab2Tests Concepts of TDD, M. Smith, ECE, University of Calgary, Canada LabXTests LabX

  7. First unit test RectifyTests/Lab1HalfWaveDebugTests.cpp (on Web) #include “../Rectify/Rectify.h” Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  8. Running the tests or customer code • Lab1/Lab1main.cpp Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  9. Running the customer product code Rectify/CustomerRectifymain.cpp #include “Rectify.h”int CustomerRectifymain(void); Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  10. Test code –TDD/ActivateTestsmain.cpp Report all tests.Success and failures Report successes only Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  11. Build a project -- Steps 1 and 2 HolddownCTRLKey Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  12. Build a project – Steps 3, 4, 5, 6 Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  13. Build a project – Steps 8, 9, 10 Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  14. Adding files to project Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  15. Build and run commands Build ANY CHANGED files (Use most of the time for speed reasons) Build THIS file Build ALL files Run the program Halt the program Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  16. Runs “slowly” in single cycle accurate Simulator mode Run on “real board” in ICT320 using Summit ICE JTAG Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  17. Some useful project menu options About every 10 buildsor when things“just are not going right” Clean Update dependenciesRebuild ALL Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  18. RectifyTests/HalfWaveDebug.cpp “works” but contains a hidden bug #include “Rectify/Rectify.h” Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  19. Integer array tests ZERO-LENGTH ARRAY • Unspecified requirement – shown as part of test functionality • Function return pointer = NULL if error condition present Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  20. Fast generation of “Release Code/Tests” • Save a version of RectifyTests/ HalfWaveDebugTests.cpp as RectifyTests/ HalfWaveReleaseTests.cpp • Use editor to change function names from XXXDebug to XXXRelease • Save a version of Rectify/ HalfWaveDebug.cpp as Rectify/ HalfWaveRelease.cpp • Use editor to change function names from XXXDebug to XXXRelease Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  21. Fast generation of Release code/tests • Add RectifyTests/ HalfWaveReleaseTests.cpp and Rectify/ HalfWaveRelease.cpp to project • Compile and link to make sure that they work • Need to change “compile option” for Rectify/ HalfWaveRelease.cpp to optimized Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  22. Steps for changing options of “one file” to “optimized / release mode” Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  23. Float and assembly language tests-- Cut and paste versions of integer tests Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  24. Speed tests – integer code versions Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  25. Concepts covered • Stages in a conventional radio • Stages in a software radio • Goals for the “long term” project • Concept of test driven development • Digital rectification • Tests for integer array rectification • Tests for float array rectification (C++ compiler) • Tests for rectification in assembly code • More details of test driven development Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  26. Time for a demo • Need 1 student volunteer Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

  27. Concepts • Stages in a conventional radio • Stages in a software radio • Goals for the “long term” project • Building a VisualDSP project using TDD • See web for more specific details • Demo if time is available Concepts of TDD, M. Smith, ECE, University of Calgary, Canada

More Related