Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting up VisualDSP environment Lab. 0

Similar presentations


Presentation on theme: "Setting up VisualDSP environment Lab. 0"— Presentation transcript:

1 Setting up VisualDSP++ 1.0 environment Lab. 0
M. Smith, Electrical and Computer Engineering, University of Calgary, Canada ucalgary.ca

2 ENCM515 Lab. 0 -- VisualDSP basics
Select partners -- 2 people per station and select station in ICT210 with Summit ICE capability. Some stations in A305 have ICE capability, but it is a different ICE Stations throughout the Department support the 20 floating licenses for VisualDSP++1.0 and the ADSP simulator Build a Visual DSP project -- OFF_LINE source -- your own version (in C) of a DSP Temperature conversion algorithm. This will be used later in the course to demonstrate parallelism issues Test out VisualDSP software simulation environment Set up and test out VisualDSP hardware environment Start/finish work on ‘C’ and assembly code version of FMSTEREO_DEMOD for Post-Lab 0 Quiz. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

3 Checking that the software exists
Select and run Programs | VisualDSP | Debugger from the Windows START MENU 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

4 Testing the VisualDSP++ V1.0 software and hardware environment
Links for the following files are found on the ENCM515 Lab. 0 web pages You should play the tutorial video on Visual DSP. Takes about 10 minutes. Will at least give you some familiarity with what it is you don’t understand Build a directory g:\yourname\encm515\lab0 Download the following files from ENCM515 Lab. 0 web page Either section01.c or section02.c ADSP21061ICE.ldf 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

5 Main Subroutine #define MAXSIZE 128
static dm float centigrade[MAXSIZE]; static dm float fahrenheit[MAXSIZE]; static pm float pm_fahrenheit[MAXSIZE]; void main(void) { dm float testarray[] = { -10.0, 30.0, 60.0, 70.0, -40.0, -20.0, 90.0}; dm float *in_pt = &centrigrade[0]; int count; for (count = 0; count < MAXSIZE; count++) { printf("%f\n", testarray); *in_pt++ = testarray++; } PM_ConvertUsingArrays( ); PM_ConvertUsingUnrolledLoopUsingCopies( ); 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

6 “C” for a Harvard Architecture
void PM_ConvertUsingArrays(void) { int count; dm float *in_pt = &centigrade[0]; pm float *out_pt = &pm_fahrenheit[0]; for (count = 0; count < MAXSIZE; count++) out_pt[count] = in_pt[count] * (9.0 / 5.0) + 32; } 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

7 Opportunities for DSP speed improvement
void PM_ConvertUsingUnrolledLoopUsingCopies(void) { int count; dm float *in_pt = &centigrade[0]; pm float *out_pt = &pm_fahrenheit[0]; for (count = 0; count < MAXSIZE; /* empty */) { out_pt[count] = in_pt[count] * (9.0 / 5.0) + 32; count++; } OR would this be faster? for (count = 0; count < MAXSIZE; count = count + 2) { out_pt[count + 1] = in_pt[count + 1] * (9.0 / 5.0) + 32; 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

8 VisualDSP++ 1.0 software Patch
The VisualDSP patches fix the following problems ADSP21061 simulator will not properly simulate R0 = trunc F0 instruction for all values of F0. Problem with View | Debug Windows | Plot If you accept the default value (100) and change it later (double or more) then debug environment used to crash. Problems with V yours to find and investigate 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

9 Test -- VisualDSP++ 1.0 -- 1 Windows -- Programs | Visual |Environment
VisualDSP -- File | New | Project Save as lab0VDSP1.dpj in lab0 directory. VisualDSP V2 uses a .dpj file which is not compatible with V1. Project Options -- KEY Processor ADSP-21061 Type DSP executable Configuration Debug Adjusting .dbj Project Options later Visual DSP Project window -- right click on “.dpj” file name and select “Project Options” 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

10 Test -- VisualDSP++ 1.0 -- 2 Add the files to the project
section0X.c -- “C” source code -- Make sure that you do a code review on the code. This is a problem solving approach and I want you to get into good debugging habits for the rest of the course. Expectations -- need less than 50 LOC per lab. Should not take much time to review! adsp21061ICE.ldf file -- This is the system architecture file for handling the ADSP21061 using the ICE. You will need a different .ldf file if you debug using the ADSP21061 over a serial connection (WAIL) Build the Project -- jigsaw keys For more hints see labs/02Lab0/projectbuild.htm 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

11 Test -- VisualDSP After building the project -- click the LadyBird key to activate the ADSP2106X Family Simulator This is known as “testing the code OFFLINE” -- meaning without using the boards. All labs can be testing offline in this course. This is a key issue as the ICE hardware connections are only available in ICT210 and A305. The current labs will not run using the ADSP21061 hardware over the serial connection because of an existing memory management conflict with the serial connection hardware. Run the code to test that it works. For more hints see labs/02Lab0/simulator_debugging.htm 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

12 Test -- VisualDSP Your job is to determine which data register (Rx) is being used for the loop counter determine which index register (Ix) and/or modify register (Mx) is being used to step through the access of the temparray[ ] Use the register window to follow through the changes in the variables/arrays after setting appropriate breakpoints. The concept is equivalent to ENCM415 so transfer your knowledge. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

13 Configuring ICE hardware --1
TAKE CARE -- THESE ARE VERY EXPENSIVE PROBES -- I want to use them for a number of years! Make sure that you have powered down the PC before connecting the ICE probes to be boards Use a Proper wrist grounding strap to avoid electrostatic discharge. Power down the EZ-LITE board and remove the two jumpers from the EZ-ICE socket. Place the jumpers into the electrostatic bag. Identify the ICE cable coming from the Lab. Station PC. These cables are connected to special hardware on the ICT210 stations (Summit ICE). Slightly different hardware in A305 (Mountain ICE). There are more hints available on 02labs/02Lab0/iceconfiguration.htm 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

14 Configuring ICE hardware -- 2
TAKE CARE -- THESE ARE VERY EXPENSIVE PROBES -- I want to use them for a number of years! Please use proper grounding strap. Identify the ICE cable coming from the Lab. Station PC. Connect the ICE Probe (from the lab. kit) to the ICE cable. If you are having to force the probe onto the connector then you are connecting it the wrong way. The white PULL tag should on the top side of the plug and away from the daughter board. Connect the ICE probe to the EZ-ICE socket on the board There is a right and wrong way. The correct way will have the probe cable coming in from the top of the board and NOT over the top of the SHARC processor chip. The missing pin on the EZ-ICE header corresponds to the blocked pin on the probe connector. Check that the board “input jumpers” (JP-8, JP-9) are set to “LINE” Power up the board and then the PC Check that the little yellow light on the probe IS NOT LIT. If it is lit PROCEED NO FURTHER, call me over as there is a problem with the set up. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

15 Configuring ICE hardware -- 3
TAKE CARE -- THESE ARE VERY EXPENSIVE PROBES -- I want to use them for a number of years! Please use proper grounding strap. Add your “stereo” head phones to Output Jack (J22 - jack nearest corner) -- you should hear the dreaded “Peter Gunn” Select and run Programs | VisualDSP | JTAG ICE Configurator from the Windows START MENU 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

16 Configuring ICE hardware -- 4
TAKE CARE -- THESE ARE VERY EXPENSIVE PROBES -- I want to use them for a number of years! Please use proper grounding strap. In the configuration window Select Summit ICE (A305), Mountain ICE (A305) Select Copy Change Type to EZ-ICE -- followed by OK. You now have configured the system to accept the in-circuit emulator as one option for use during debugging code. You should not have to do this configuration again if YOU come back to the same laboratory station. Use ICE Test Utility program to test out connections. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

17 To Power down ICE hardware -- 5
TAKE CARE -- THESE ARE VERY EXPENSIVE PROBES -- I want to use them for a number of years! Please use proper grounding strap. Make sure that “little yellow light” on the probe is off This means exit “debugging environment” program If you have crashed the system, you may have to reactivate the debugging program and then exit again before the light goes off. Power down the board and PC -- disconnect -- the probe is “very expensive” to replace. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

18 Test -- hard ware -- 5 Reactivate VisualDSP -- Select DEBUG button in the top menu (ladybird) From new session list select DSP0 (ADSP-21061) Ez-kit ADSP ADSP-21xxxx JTAG Emulator Click OK on File could not be found window if it appears. Download section0X.dxe file from lab0\ debug directory to the board. You may have to use the RESET option in the debug window or the RESET button on the evaluation board if the processor is “hung”. We now need to display the input and output files associated with this executable Select View | Debug Windows | Plot Browse and Add the following arrays to the Plot window using Memory DM, count 128, stride 1, data float for each array temparray, centigrade. Use Memory PM for displaying fahrenheit array Run the program -- should go a lot faster (if you are not still run the simulator by mistake (MFE -- my favourite error)). 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

19 Further hints 02labs/02Lab0/ice_debugging.htm
02labs/02Lab0/plotting.htm 02labs/02Lab0/filesneeded.htm I have not explained everything. It is your job to get familiar with the environment. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --

20 ENCM515 Lab. 0 -- VisualDSP basics
Select partners -- 2 people per station and select station in ICT210 with Summit ICE capability. Some stations in A305 have ICE capability, but it is a different ICE Stations throughout the Department support the 20 floating licenses for VisualDSP++1.0 and the ADSP simulator Build a Visual DSP project -- OFF_LINE source -- your own version (in C) of a DSP Temperature conversion algorithm. This will be used later in the course to demonstrate parallelism issues Test out VisualDSP software simulation environment Set up and test out VisualDSP hardware environment Start/finish work on ‘C’ and assembly code version of FMSTEREO_DEMOD for Post-Lab 0 Quiz. 4/24/2019 ENCM Setting up VisualDSP++1.0 Environment Copyright M. Smith --


Download ppt "Setting up VisualDSP environment Lab. 0"

Similar presentations


Ads by Google