Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

A complex number consists of a real and imaginary component and is usually written in the form a+bi where a and b

A complex number consists of a real and imaginary component and is usually written in the form a+bi where a and b

A complex number consists of a real and imaginary component and is usually written in the form a+bi where a and b

Description

Unformatted Attachment Preview

CS 461/561
Computer Architecture
Fall 2022
Optional Extra Credit Assignment (50 points)
Vector Processors and Data Level Parallelism
Introduction
A complex number consists of a real and imaginary component and is
usually written in the form ?? + ???? where ?? and ?? are either integer or
floating-point values and ?? = ??1 (the imaginary value) . Sometimes in
engineering, the letter ?? is used in place of ?? because ?? is used for other
values.
Multiplying two complex numbers is done by applying the FOIL (Firsts,
Outers, Inners and Lasts) method, similar to that of binomial multiplication.
For example, multiplying (a + bi)(c + di) is accomplished as follows:
Firsts:
Outers:
Inners:
Lasts:
a*c
a * di
bi * c
bi * di
This produces (a+bi)(c+di) = ac + adi + bci + bdi2. The terms are combined
to produce the product back in the form a + bi. Keep in mind that i2 = -1.
An example using actual values: (2.5 + 3i)(4.0 + 2i)
Firsts:
Outers:
Inners:
Lasts:
2.5 * 4.0
2.5 * 2i
3i * 4.0
3i * 2i
This produces 10 + 5i + 12i + 6i2 = 10 + 17i + 6(-1) = 4 + 17i.
Some contemporary programming languages natively support complex
numbers (Python, MATLAB). Newer revisions of some older languages (C,
FORTRAN) have added support for complex numbers. Some programming
languages have no native support for complex numbers.
Assignment Definition
Consider the following high-level language code which multiplies two vectors
that contain single-precision complex numbers:
for ( i = 0; i < 300; i++ ) {
c_re[i] = a_re[i] * b_re[i] !_im[i] * b_in[i];
}
c_im[i] = a_re[i] * b_im[i] + a_in[i] * b_re[i];
Values a, b and c are vectors; _re is the real component element and _im is
the imaginary component element in each vector.
1. Convert this loop into pseudo RV64V assembly code using strip mining
assuming the following architectural features:
Register s0 = loop counter & array index [i]
Vector registers: v0 631
MVL (maximum vector length) = 64
Instructions:
vld (vector load)
vst (vector store)
vadd (vector add)
vsub (vector subtract)
vmul (vector multiply)
bne (branch if not equal)*
blt (branch if less than)*
j (unconditional jump)*
addi (integer add immediate)*
ori (logical or immediate)*
Note: instructions with an asterisk indicate the instructions are used only for
setting initial index value and increments, and for loop control.
2. If the vector processor implements chaining with two lanes and has a
single vector load/store unit, using the pseudo assembly code from question
1, show how convoys would be constructed to execute in the vector pipeline.
How many chimes are required to execute the convoys?
3. Assume in the vector processor, the functional units have the following
startup overhead: load/store unit: 12 cycles, multiply unit: 7 cycles, and
the add/subtract unit: 6 cycles. How many clock cycles are required for
each iteration of the loop, including startup overhead?
4. How many iterations are required to complete processing the vectors?
Instruction Formats
vld (vector load):
vld
vD, vec_ref
vst (vector store):
vst
vD, vec_ref
vadd (vector add):
vadd vD, vS1, vS2
vsub (vector subtract):
vsub vD, vS1, vS2
vmul (vector multiply):
vmul vD, vS1, vS2
bne (branch if not equal):
bne x1, x2, target_label
blt (branch if less than):
blt x1, x2, target_label
j (unconditional jump):
j target_label
addi (integer add immediate):
addi xD, xS1, xS2
ori (logical or immediate):
ori xD, xS1, const
Format Definitions
vD = destination vector register
vS1 = first source vector register
vS2 = second source vector register
vec_ref = vector reference (name)
x1 = first general purpose register for comparison
x2 = second general purpose register for comparison
xS1 = first source general purpose register
xS2 = second source general purpose register
target_label = label of the target instruction for branch
const = an integer constant

Purchase answer to see full
attachment
Explanation & Answer:

4 Questions

User generated content is uploaded by users for the purposes of learning and should be used following our honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20