Monday, June 3, 2013

VLSI CAD - Logic to Layout on Coursera

I recently finished this course on Coursera. It was excellent. A small review follows (I'm an electronics engineer by trade, so, y'know...)

Topics Covered

The VLSI-CAD: Logic to Layout course held the promise of enlightenment about the things that go on within a logic synthesis tool. (If you program but don't Verilog|VHDL - think of synthesis as a compiler, but a compiler that has to ultimately draw things). Although we got through a lot in the 8 weeks, it was obviously not exhaustive. Topics covered included:

  • computational boolean algebra - getting the computer to mimimise logic expressions
  • tech mapping - how to take a logic expression and map it to actual gates for a library
  • placement of logic cells - surprising algorithm
  • routing of nets - this was the best part
  • timing - how to tell if a gate network will meet your expected clock rate, and how to enumerate the bad paths if not. Included how to account for the delays in the wires between gates too. This was, surprisingly for me, the second most interesting part.

Course keywords: Recursion, Heuristics, Shannon Cofactors.


The course materials consist of a bunch of video lectures that average about 20 minutes. Dr Rutegnbar would [scribble notes|fill in blanks] on the the slides as he spoke, which keep things moving. PDFs of the annotated slides were available for downloads. The lectures were as addictive as a box set of House or $your_favourite_tv_show. And a lot of the time I thought to myself, "how did I make it to ~$years as a digital designer without knowing this stuff? Why am I only finding out about Shannon Cofactors now?".

As well as the lectures, there are a bunch of boolean logic software tools used in the course. The idea is that you'd prepare a script, upload it to the Coursera servers, and after a bit it would show the results on the webpage. These tools are well described with an example or two in an accompanying PDF (which I found hard to navigate to at times), and a click-this-then-that video tutorial. Although the tools themselves were useful and interesting, I've unkind things to say about the web interface to these tools later.


A multiple-choice test at the end of each week, followed by another multiple-choice-final-exam made up the grading tests for the course. Most of the questions were show-us-you-can-do-this, but more interestingly they'd throw in long-form questions. These longer questions would first explain how a certain technique you'd already encountered could be used to solve a different problem, and then ask you to do this. These questions look overwhelming at first glance, but I enjoyed those the most - I didn't find them a 'grind' like some of the other show-us-you-can-do-this type questions.

Some of the questions would encourage you to use some of the online tools already introduced. Nice touch.

Another nice thing about the weekly test was that you could see your result nearly-immediately after you clicked submit. And better, when you review your answers the course's creators 'anticpated' the wrong answers, tagging those answers with possible reasons why you may have arrived at them incorrectly.

A few teething problems with the weekly problem sets meant keeping an eye on the forums for clarifications and regrading notices. There was a bit of heartache on the forums about this, but I didn't mind too much. Except for one question on maze-routing that after seeing the solution, I felt the lectures were ambiguous about. Some folk on the forum agreed.

Online Tools

Two types of tools were made available to students on the Coursera cloud: the boolean tools KBDD, Espresso and miniSAT; and two layout visualisation tools - placement and routing visualisers.

To use the boolean tools, you'd submit a script file via the web interface, and after a few moments you could read the output of the tool. Submissions to these tools were rate-limit to 1 go per minute. This is unfortunate, as KBDD is the most-used tool in the course and is the only one not available on the internet for download! Combined with the fact that the submit button redirected you to a page which was not the results page, this made using KBDD a bit of a chore.

On the other hand, the visualisation tools were mostly awesome. Especially the routing visualiser - through the power of HTML5, just drag your routing output onto a the page, and it'll draw your routing on two layers. I giggled like a child! Here's a snapshot of wot i made (I'm so proud!)...

Programming Assignments

Shooting for the "Mastery" badge meant writing a computer program every two weeks. One of these programs was a lengthy KBDD script, and the other 3 could be written in the programming language of your choice. The general idea is that input files would be provided, you'd run them through your program, and upload the output to the Coursera cloud for marking.

These programming tasks were interesting and on the whole well explained. The placement and the router programs were the most interesting to me, probably because I overly-enjoyed seeing the visualisations of my programs' output.


I struggled with the placement program though. I struggled so much that I missed the first deadline. I managed to complete it before the end of the course and so only got 50% of my score. The algorithm to use for the assignment (recursive, narturally) was well described in the programming assignment doc, but my main problem was how to manage the data structures as I stepped down the recursion levels.

This brings up another problem with the course - I couldn't get much help with my program. Under the honour code, you are not meant to share your code or otherwise post it on the internet, reducing the chances of cheating if the course is offered again. I couldn't post code to get help on the forums, or examine a reference program at the end of the course to see how things should be done. And for these kind of 'big' problems, the forums aren't really that useful because understanding the issue and writing a response would take up too much time of another busy student!

The forums, other than for 'deep' programming questions, were useful and the course staff kept an eye on things.


If you're interested in this stuff, and you like to dabble in programs, I'd recommend this course in a heartbeart. I had a brilliant time following it. I wish it were longer. Hopefully, they'll offer a follow-on course that mentions flip-flops! Or some simple verilog parsing!


rashmi said...

Hi Marty

There are no upcoming sessions for the course now. Is it possible for you to share the lecture pdfs with me ?

Thanks and regards,

Arvind Jayaraman said...

Thanks for the really nice review of the course. I am interested in taking it. What was your workload each work?

Marty said...

@rashmi - The course has started again, so you can grab the PDFs from there!

@Arvind - I did the programming track too, so it took a good few hours. I'd estimate maybe 5-7 hours a week, more if you get stuck on a program!