<< Chapter < Page Chapter >> Page >

The answer is YES. Thus, the CPU can execute maximum 8 instructions in each clock cycle. The instructions executedin the same clock cycle are called parallel instructions . Then, what instructions can be executed in parallel? A short answer is: as far as the parallelinstructions do not use the same resource of the CPU, they can be put in parallel. For example, the following twoinstructions do not use the same CPU resource and they can be executed in parallel.

1 ADD .L1 A0,A1,A2 2 || ADD .L2 B0,B1,B2

Resource constraints

Then, what are the constraints on the parallel instructions? Let's look at the resource constraints in more detail.

Functional unit constraints

This is simple. Each functional unit can execute only one instruction per each clock cycle. In other words,instructions using the same functional unit cannot be put in parallel.

Cross paths constraints

If you look at the data path diagram of the C62x CPU, there exists only one cross path from B register file to the L1 , M1 and S1 functional units. This means the cross path can be used only once per each clock cycle.Thus, the following parallel instructions are invalid because the 1x cross path is used for both instructions.

1 ADD .L1x A0,B1,A2 2 || MPY .M1x A5,B0,A3

The same rule holds for the 2x cross path from the A register file to the L2 , M2 and S2 functional units.

Loads and stores constraints

The D units are used for load and store instructions. If you examine the C62x data pathdiagram, the addresses for load/store can be obtained fromeither A or B side using the multiplexers connecting crisscross to generate the addresses DA1 and DA2 . Thus, the instructions such as

1 LDW .D2 *B0, A1

is valid. The functional unit must be on the same side as the address source register (address index in B0 and therefore D2 above), because D1 and D2 units must receive the addresses from A and B sides,respectively.

Another constraint is that while loading a register in one register file from memory, you cannot simultaneously storea register in the same register file to memory. For example, the following parallel instructions are invalid:

1 LDW .D1 *A0, A1 2 || STW .D2 A2, *B0

Constraints on register reads

You cannot have more than four reads from the same register in each clock cycle. Thus, thefollowing is invalid:

1 ADD .L1 A1, A1, A2 2 || MPY .M1 A1, A1, A33 || SUB .D1 A1, A4, A5

Constraints on register writes

A register cannot be written to more than once in a single clock cycle. However, note that the actual writing toregisters may not occur in the same clock cycle during which the instruction is executed. For example, the MPY instruction writes to the destination register in the next clock cycle. Thus, thefollowing is valid:

1 ADD .L1 A1, A1, A2 2 || MPY .M1 A1, A1, A2

The following two instructions (not parallel) are invalid (why?):

1 MPY .M1 A1, A1, A2 2 ADD .L1 A3, A4, A2

Some of these write conflicts are very hard to detect and not detected by the assembler. Extra caution should beexercised with the instructions having nonzero delay slots.

Ad-hoc software pipelining

At this point, you might have wondered why the C6x CPU allows parallel instructions and generate so much headachewith the resource constraints, especially with the instructions with delay slots. And, why not just make the MPY instruction take 2 clock cycles to execute so that we can always use the multiplied resultafter issuing it?

The reason is that by executing instructions in parallel, we can reduce the total execution time of the program. Awell-written assembly program executes as many instructions as possible in each clock cycle to implement the desiredalgorithm.

The reason for allowing delay slots is that although it takes 2 clock cycles for an MPY instruction generate the result, we can execute another instruction while waiting for the result. This way, you canreduce the clock cycles wasted while waiting for the result from slow instructions, thus increasing the overallexecution speed.

However, how can we put instructions in parallel? Although there's a systematic way of doing it (we will learn a bitlater), at this point you can try to restructure your assembly code to execute as many instructions as possible inparallel. And, you should try to execute other instructions in the delay slots of those instructions such as MPY , LDW , etc. , instead of inserting NOP s to wait the instructions produce the results.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
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