Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting up VisualDSP environment Lab. 1

Similar presentations


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

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

2 ENCM515 Lab. 1 -- VisualDSP basics
Select partners -- 2 people per station and select station in ICT320 with Summit / Mountain ICE capability. Stations throughout the Department support the 20 floating licenses for VisualDSP++3.0 and the ADSP simulator Build a Visual DSP project – Looking at developing a simple IIR (Infinite duration Impulse Response filter) Test out VisualDSP software simulation environment Set up and test out VisualDSP hardware environment Develop simple IIR filter Test in stand-alone situation Test with Lab. 0 Test running LOCAL_AUDIOSOURCE program – will need ear-phones for testing 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

3 Checking that the software exists
Use lab. 0 program to test your station Remember to HOLD-DOWN control-key while activating VisualDSP++ to ensure that you can have a choice of session Make sure that you exit from VisualDSP++ before hooking up the ICE probe to the boards. Also connect the probe to the boards, then power up the boards, then activate VisualDSP++ to avoid probe damage 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

4 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 exited from Visual DSP and powered down the boards before connecting the ICE probes to the 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 ICT320 stations (Summit ICE). 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

5 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. Connect the ICE probe to the EZ-ICE JTAG socket on the board (Collection of about 14 pins in 2 rows near the processor chip) 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” and NOT to MIC to avoid destroying the mic amplifiers Power up the board. DON’T power VisualDSP up yet. 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

6 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 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

7 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 (ICT320), Select Copy Change Type to EZ-ICE -- followed by OK. You now have configured the system to accept the in-circuit emulator as one sessionfor 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. 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

8 Checking that the Hardware talks to VisualDSP++
Use lab. 0 program to test your station Remember to HOLD-DOWN control-key while activating VisualDSP++ to ensure that you can have a choice of session. You now want – Summit ICE session Make sure that you exit from VisualDSP++ before disconnect the ICE probe to the boards. Also exit from VisualDSP, power down the board and then disconnect the probe. 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

9 Test -- hard ware Reactivate VisualDSP – Hold down control key From new session list select DSP0 (ADSP-21061) Ez-kit ADSP ADSP-21xxxx Summit ICE Click OK on File could not be found window if it appears. Download lab0.prj file Activate the .tcl file We now need to display the input and output files associated with this executable Activate the 2 plot windows Activate the Run and Pause (0x7F) option Run the program -- should go a lot faster (if you are not still run the simulator by mistake (MFE -- my favourite error)). 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

10 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 “run 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 then disconnect -- the probe is “very expensive” to replace. 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

11 Main Subroutine void main(void){ int polar = BIPOLAR; // Build the left and right channels BuildSignalChannel( left_channel, LEFTCHANNELPERIOD, polar ); BuildSignalchannel( right_channel, RIGHTCHANNELPERIOD, polar ); // Pass the left and right channel through the low and high pass filter LowPassFilter( left_channel, MAXCHANNELLENGTH, low_pass_output ); HighPassFilter( right_channel, MAXCHANNELLENGTH, high_pass_output ); // Set the printing flag PrintActivation( NONWRITE ); // Print if printing is activated if( CheckPrintActivation() ) { puts( "The program runs successfully." ); fflush( stdout ); } } 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

12 Audio Channel Construction
void BuildSignalchannel( int *channel_in, const int channelPeriod, const int polar ) { int point = 0, signalValue = 0, halfChannelPeriod = 0, pointCount = 0; halfChannelPeriod = channelPeriod / 2; // divided the value channelPeriod by half pointCount = 1; // store a periodic square wave signal into the array for( point = 0; point < MAXCHANNELLENGTH; point++ ) { if( pointCount > halfChannelPeriod ) { if( signalValue == ZERO ) if( polar == BIPOLAR ) signalValue = -CHANNELPEAK; else signalValue = ZERO; } else signalValue = CHANNELPEAK; } pointCount = 1; } // save the filtered value *channel_in = signalValue; // increment pointer and counter channel_in++; pointCount++; } 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

13 (Poor) Low Pass IIR filter
#define FILTERCOEFF 0.1 #define ONEMINUSFILTERCOEFF 0.9 void LowPassFilter( int *channel_in, const int channel_in_length, int *channel_out ){ static float oldValue float newValue int point for( point < channel_in_length ) {           newValue = ( float ) channel_in(point);           channel_out(point) = ( integer ) oldValue;           oldValue = ONEMINUSFILTERCOEFF * oldValue FILTERCOEFF * newValue; } 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

14 High pass filter Try the effect of
High pass signal = signal – low pass (signal) 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

15 Simple assembly code link demo
The laboratory involves a simple example of linking to an assembly code routine Basically, check an input parameter and then do something based on that decision Examine the code put out by the “C” compiler to get an idea of the required format 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

16 If you move fast enough Cut and paste the IIR filter from Lab. 1 into the process sound .c file Change the INPUT sound options to SQUARE_WAVE and SIMPLE_IIR filter and check that the code from Lab. 0 works 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

17 For the really keen and “gifted”
Gifted – means lucky enough not to make too many mistakes  Audio-test Copy your Lab. 0 project file as “lab0.online.prj” Unlink to the offline library and relink to the “online” library. Set the compile options to “-D LOCAL_AUDIOTEST” Use ear phones and run the program Pressing switch on the board will cut out the processing so you can hear the unprocessed sound The low-pass filter will make the sound like that from a 1910 phonograph – which were unable to record the high-frequency sounds on the wax cylinders See ECE-ADI-Project web-pages – Lab.2 for more details 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --

18 ENCM515 Lab. 1 -- VisualDSP basics
Select partners -- 2 people per station and select station in ICT320 with Summit / Mountain ICE capability. Stations throughout the Department support the 20 floating licenses for VisualDSP++3.0 and the ADSP simulator Build a Visual DSP project – Looking at developing a simple IIR (Infinite duration Impulse Response filter) Test out VisualDSP software simulation environment Set up and test out VisualDSP hardware environment Develop simple IIR filter Test in stand-alone situation Test with Lab. 0 Test running LOCAL_AUDIOSOURCE program – will need ear-phones 12/10/2018 ENCM Setting up VisualDSP++3.0 Environment Copyright M. Smith --


Download ppt "Setting up VisualDSP environment Lab. 1"

Similar presentations


Ads by Google