Archive for the ‘Optimization’ category

Graphics Accelerator Chip

July 1, 2015

How often do you watch animated movies, play video games, or run graphical simulations on your computer?  Computer graphics is the science of converting 1’s and 0’s into colored pixels on your screen.  While many applications can do this work entirely on the CPU, high end real-time applications require specialized hardware.

For the final project of EE271: VLSI (Very Large Scale Integration) Systems, we had to increase the performance of a graphics chip to the requested throughput while minimizing chip area and power consumption.  One acceleration technique that we implemented that is easy to visualize is to change the rendering algorithm.  Compare different algorithms in this figure:

Screen Shot 2015-07-01 at 6.05.30 PM

Juan Pineda. 1988. A parallel algorithm for polygon rasterization.

Navigating the stages of this project was very challenging with lots of scary moments and meticulous deliberations. Whenever we attempted to optimize anything, the first step usually broke the system.  But near the end, it felt like a miracle when images rendered properly and quickly.

Screen Shot 2015-07-01 at 7.04.51 PM

One of the images we had to render. He kinda looks like Baymax from the Disney movie.

New Skills:  Graphic acceleration techniques in SystemVerilog and C++

Key Takeaway:  I was inspired when working on this graphics accelerator chip because I felt like I was treading (ok, more like ‘limping’) in the footsteps of my Filipino engineering hero, Dado Banatao.  He started a company around a similar technology.

CPU Optimization — a neverending story

July 1, 2015

EE282 Computer Systems Architecture introduced me to more complex CPUs (microprocessors are named Central Processing Units when packaged within complete computers) and to more advanced techniques for architects building CPUs.  There were two big optimization projects:

  1. Optimize Matrix Multiplication:  We had to implement optimization techniques in C to achieve faster matrix multiplication.  A very effective technique is loop unrolling which basically puts more work in each loop iteration to reduce the number of iterations. For example, a for-loop executing a single multiplication needs 100 iterations; the optimized version only need 10 iterations, but each iteration grabs a bigger chunk of data and does 10 multiplications in each loop around.
  2. Optimize Mystery Computer:  There’s a dynamic mystery computer that executes large mystery computations.  We could remotely control the computer’s number of processors, processor speed, and cache system.  We then had to explore paths to an optimal computer configuration among thousands of possibilities.  My partner and I were like Sherlock and Watson; discovering new clues, having eureka moments, and then surmising explanations afterwards.

New Skills:  C programming, performance analysis, and optimization techniques

Key Takeaway:  The official Olympic motto is Citius, Altius, Fortius which is Latin for ‘faster, higher, stronger’.  I think this motto’s underlying sentiment isn’t to celebrate the fastest, highest, strongest but to spur athletes toward continuous improvement.  If CPU development had its own motto it would be faster, smaller, less energy.

Ever since their invention, new CPUs are released that are more powerful, with smaller transistors, and more energy efficient.  And just like there’s no perfect athlete or sports team, there’s no ultimate computer because progress in one area comes at the expense of others.