HW1
.pdf
keyboard_arrow_up
School
Illinois Institute Of Technology *
*We aren’t endorsed by this school
Course
530
Subject
Industrial Engineering
Date
Feb 20, 2024
Type
Pages
6
Uploaded by ProfCloverDinosaur47
ECE-530 High Performance VLSI IC Systems Illinois Institute of Technology High Performance VLSI IC Systems ECE-530 Homework 1 System‐Level Power Reduction by using WATTCH
Professor - Kyuwon Choi TA - Nader Alnatsheh Submitted By - Abhishek Varma Date - 02-01-2024
ECE-530 High Performance VLSI IC Systems A)
Sorting Algorithm Comparison 1)
In less than 50 words, describe the five sorting algorithms and explain the pros and cons of each one of them, and from your explanation, which algorithm you guess will have the best power estimation results. By estimating the power drawn by the sorting algorithms on the same buffer size of 100 it can be concluded that Shell sort algorithm is the most power effective algorithm while Selection sort is the most power intensive sorting algorithm.
Shell SA -
It is the fastest sorting algorithm among the five algorithms. Shell sort is similar to Insertion sort the main difference between these two is the gap value here we can declare a gap value which helps to compare 2 digits placed at different indexes apart with a gap value. This unique feature aids in optimizing the sorting process and conserving computational resources. Shell Sort essentially becomes equivalent to Insertion Sort when (gap = 1). Here in our code we are diving the gap size by half after every for loop execution. Pros - Consume less power among the five. Cons - Won’t be effective if gap value is not selected properly (gap!=1).
Merge SA - In Merge sort we are subdividing the unsorted array into smaller portion until we get the individual elements. Once we get the individual array elements we will start merging the array with sorted elements until we get the similar sized array with sorted elements in it (It uses divide and conquer approach). Pros - Fast. Cons - Diving and merging causes a lot of data movement and use more memory space.
Heap SA - It is an ordered binary tree where we create a max heap (parent>child) from the unsorted array. With the given unsorted array first we create a binary tree in which we place the max value on the top by doing the comparisons once we get the largest element in the tree on the top we will swap the top most element with the bottom one this is called max heap. Pros - Efficiently do deletion and insertion of new elements. Cons - Slow and complex.
Insert SA - In Insertion sort we have the sorted side (left) and unsorted side (right) here we will start with the 1 index and compare it with the 0 index if the value in the 1 index is bigger than the 0 index then we will swap both the values by using a temporary register in this way it will goes until the right most index. Pros - Simple to implement. Cons - a lot of data movement happens.
Selection SA - It is the most Power Intensive sorting algorithm it goes through every index and compare it with each other to get the smallest value and then it will swap it with the 0 index and to get the second sorted value it will again go for search and replace it with the 1 index in this way we will be getting a sorted array. Pros - Simple to implement. Cons - Consume a lot of power.
2) Sorting Algorithm Average Power Shell SA 15.4417 Merge SA 15.6744 Heap SA 15.7788 Insert SA 16.1978 Selection SA 16.3992 Table 1. Power Estimation Results
ECE-530 High Performance VLSI IC Systems 3) Did your answer in 2 matched your answer in 1 ? Yes, Shell sort is the most power effective algorithm among the 5 it will perform better when we have the data which is almost sorted in this scenario it doesn’t need to swap the values this is one of the reason why this is power effective.
4)
Comparison analysis for each algorithm (why do you have more/less power for some sorting algorithms) The reason why we are having different power consumption results on the same data for different sorting algorithms is - 1. Some of the algorithms take advantage of how the data is arranged initially if the data is spread sparsely then the algorithm will require more power to sort it like shell sort. 2. Based on how the algorithm is implementing the sorting also tells why we are getting the difference in the power for example Selection sort which draws the most power will go through the entire buf for each element means for the 0th location element it is going to search for all 99 other elements and then store it in the temporary variable which consumes a lot of power it will do the same for all other remaining elements. Algorithms that have more Comparison logic and which do a lot of swapping incurs more power.
With Loop Unrolling & Default Cache Configuration Before unrolling the loop, the power was 14.7937, and the CPI was 0.9921. After recursively implementing loop unrolling across multiple for loops, I successfully unrolled a total of five for loops, each being the innermost loop. Despite attempting to unroll the outer for loop, the weights in the output file (output.txt) remained consistent, resulting in an overall increase in power consumption. Analyzing the table below, it is evident that in the third loop, power increased due to the unrolling process. However, upon further unrolling in the fourth iteration, a significant reduction in power was observed, dropping from 14.7387 to 14.4364. This reduction in power would not have been achievable without the inclusion of the third loop in the unrolling process. After successfully implementing the loop unrolling on the given file Slack.c overall power has been reduced from 14.7937 to 14.3617 marking a 2.96%
decrease in power. Figure 1. Average Power Before Unrolling
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help