<< 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

Discuss the differences between taste and flavor, including how other sensory inputs contribute to our  perception of flavor.
John Reply
taste refers to your understanding of the flavor . while flavor one The other hand is refers to sort of just a blend things.
Faith
While taste primarily relies on our taste buds, flavor involves a complex interplay between taste and aroma
Kamara
which drugs can we use for ulcers
Ummi Reply
omeprazole
Kamara
what
Renee
what is this
Renee
is a drug
Kamara
of anti-ulcer
Kamara
Omeprazole Cimetidine / Tagament For the complicated once ulcer - kit
Patrick
what is the function of lymphatic system
Nency Reply
Not really sure
Eli
to drain extracellular fluid all over the body.
asegid
The lymphatic system plays several crucial roles in the human body, functioning as a key component of the immune system and contributing to the maintenance of fluid balance. Its main functions include: 1. Immune Response: The lymphatic system produces and transports lymphocytes, which are a type of
asegid
to transport fluids fats proteins and lymphocytes to the blood stream as lymph
Adama
what is anatomy
Oyindarmola Reply
Anatomy is the identification and description of the structures of living things
Kamara
what's the difference between anatomy and physiology
Oyerinde Reply
Anatomy is the study of the structure of the body, while physiology is the study of the function of the body. Anatomy looks at the body's organs and systems, while physiology looks at how those organs and systems work together to keep the body functioning.
AI-Robot
what is enzymes all about?
Mohammed Reply
Enzymes are proteins that help speed up chemical reactions in our bodies. Enzymes are essential for digestion, liver function and much more. Too much or too little of a certain enzyme can cause health problems
Kamara
yes
Prince
how does the stomach protect itself from the damaging effects of HCl
Wulku Reply
little girl okay how does the stomach protect itself from the damaging effect of HCL
Wulku
it is because of the enzyme that the stomach produce that help the stomach from the damaging effect of HCL
Kamara
function of digestive system
Ali Reply
function of digestive
Ali
the diagram of the lungs
Adaeze Reply
what is the normal body temperature
Diya Reply
37 degrees selcius
Xolo
37°c
Stephanie
please why 37 degree selcius normal temperature
Mark
36.5
Simon
37°c
Iyogho
the normal temperature is 37°c or 98.6 °Fahrenheit is important for maintaining the homeostasis in the body the body regular this temperature through the process called thermoregulation which involves brain skin muscle and other organ working together to maintain stable internal temperature
Stephanie
37A c
Wulku
what is anaemia
Diya Reply
anaemia is the decrease in RBC count hemoglobin count and PVC count
Eniola
what is the pH of the vagina
Diya Reply
how does Lysin attack pathogens
Diya
acid
Mary
I information on anatomy position and digestive system and there enzyme
Elisha Reply
anatomy of the female external genitalia
Muhammad Reply
Organ Systems Of The Human Body (Continued) Organ Systems Of The Human Body (Continued)
Theophilus Reply
what's lochia albra
Kizito
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