<< Chapter < Page Chapter >> Page >

Buffer sizes

In the program file is a macro that is used to define the size of the buffers that are in the inStream and outStream buffers. The macro is

#define CHANLEN 256 // Number of samples per channel

The CCS project uses TI's device drivers described in SPRA846. In the TI document SPRA846 it states that "If buffers are placed in external memory for use with this device driver they should be aligned to a 128 bytes boundary. In addition the buffers should be of a size multiple of 128 bytes as well for the cache to work optimally." If the SIO streams inStream and outStream are in external memory then the buffer sizes need to adhere to this requirement. If the streams are placed in internal memory then they can be any size desired as long as there is enough memory.

Suppose you want to keep the buffers in external memory but change the size. As an example, you want to change the length of each channel to 512 (multiple of 128). Then change CHANLEN to 512 and then open the configuration file DSK6713_audio.tcf and examine the properties for inStream .

DSP/BIOS SIO object inStream properties

Notice that the buffer size is 1024. This was for a channel length of 256. In the C6713 a Minimum Addressable Data Unit (MADU) is an 8-bit byte. The buffer size is in MADUs. Since each sample from the codec is 16-bits (2 MADUs) and there is a right channel and a left channel, the channel length is multiplied by 4 to get the total buffer size needed in MADUs. 256*4 = 1024. If you want to change the channel length to 512 then the buffer size needs to be 512*4 = 2048. Simply change the buffer size entry to 2048. Leave the alignment on 128. The same change must be made to the outStream object so that the buffers have the same size so change the buffer size in the properties for the outStream object also.

Suppose you have an algorithm that processes a block of data at a time and the buffer size is not a multiple of 128. To make the processing easier, you could make the stream buffer sizes the size you need for your algorithm. In this case, the stream objects must be placed in internal memory. As an example suppose you want a channel length of 94. Set the CHANLEN macro to 94 and then open the configuration file DSK6713_audio.tcf and examine and modify the properties for inStream and outStream . The buffer size will now be 94*4 = 376 and the buffer memory segment must be change from external RAM (SDRAM) to the internal RAM (IRAM).

DSP/BIOS SIO object inStream properties showing IRAM

Chip support library

CCS v3.3 comes with the chip support library (CSL). If for some reason you don't have it or it needs to be updated, download it from the TI website and install it.

Project setup

Make an empty dsp/bios project

To create a CCS project select Project->New… . This will bring up a window where you can enter the name of the project. The location selected is the default location for project files. Note that it is in the install directory for CCS v3.3. Select the Target type as TMS320C67xx . Press Finish .

CCS Project name and location

Copy files from the zip file to project directory. When they are copied to the project directory the files need to be added to the project. Right click on the project name and select Add Files To Project… . There should be 4 files added to the project as well as a header file and a couple of automatically generated files.

Project view after adding files

Set up the csl

Some options in the project need to be changed in order to use the CSL. To get to the project properties select Project->Build Options . Under Preprocessor enter the chip that we are using, in this case CHIP_6713 .

Preprocessor setting for CSL

The library file for the CSL also needs to be added to the project. Right click on the project or where it says Libraries and search for the CSL library file named csl6713.lib . It should be located in the directory C:\CCStudio_v3.3\C6000\csl\lib .

Add command file

The configuration file, DSK6713_audio.tcf , generates several files, one of them being a command file titled DSK6713_audio.cmd . Add this file to the project. If it is not there, you may need to attempt to build the project so that the file gets generated.

Using ccs with the dsk

Startup ccs with dsk connected to pc

After installing CCS v3.3 the C6713 DSK drivers need to be installed also. If they are not already installed then download them from Spectrum Digital, manufacturer of the DSK, or install them from the install disk that comes with the DSK.

Add power to the DSK board and then plug the USB connector into the PC you are using. Start up CCS. As the splash screen comes, under Windows XP, there should be a little window that pops up in the bottom right corner of the screen.

Popup window when CCS starts and DSK is connected

Connect to target

CCS v3.3 must first be connected to the target before the executable can be loaded onto the board. Select Debug->Connect . This will cause CCS to connect to the board and the board status should be in the lower left corner of the CCS window.

Target status

Debug/test the project

In order to debug and run the program you need to build it and then load it onto the DSK board. To build the project, click the Incremental Build button.

Incremental Build button

After the project builds successfully, load the .out file to the DSK board but selecting File->Load Program... and selecting the file. Or, if you want it loaded automatically, select Options- >Customize and then on the Project/Program/CIO tab select the checkmark next to Load Program After Build . When you load the program you will see a status window like the following figure.

Load Program status window

Once the program is loaded it is ready to be used. The following figure shows the final project with the main program file.

Final project view

Questions & Answers

what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
What would be the best educational aid(s) for gifted kids/savants?
Heidi Reply
treat them normal, if they want help then give them. that will make everyone happy
Saurabh
What are the treatment for autism?
Magret Reply
hello. autism is a umbrella term. autistic kids have different disorder overlapping. for example. a kid may show symptoms of ADHD and also learning disabilities. before treatment please make sure the kid doesn't have physical disabilities like hearing..vision..speech problem. sometimes these
Jharna
continue.. sometimes due to these physical problems..the diagnosis may be misdiagnosed. treatment for autism. well it depends on the severity. since autistic kids have problems in communicating and adopting to the environment.. it's best to expose the child in situations where the child
Jharna
child interact with other kids under doc supervision. play therapy. speech therapy. Engaging in different activities that activate most parts of the brain.. like drawing..painting. matching color board game. string and beads game. the more you interact with the child the more effective
Jharna
results you'll get.. please consult a therapist to know what suits best on your child. and last as a parent. I know sometimes it's overwhelming to guide a special kid. but trust the process and be strong and patient as a parent.
Jharna
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Dsp lab with ti c6x dsp and c6713 dsk. OpenStax CNX. Feb 18, 2013 Download for free at http://cnx.org/content/col11264/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Dsp lab with ti c6x dsp and c6713 dsk' conversation and receive update notifications?

Ask