Visualizing Netlist files using Google Scatter Chart
One of the assignments for our VLSI CAD: Logic to Layout will require students to write a placer. A placer is basically a program that determines the best layout for placing gates on a chip subjected to certain constraints such as minimum wire length, even distribution on the chip, etc.
It turns out that the file format for describing the final placement is very simple:
Now a very effective way to quickly check if your placer is working is to visualize it. Now, there are many ways to visualize such things. Most engineers would resort to using R or Matlab (or its open source equivalent, Octave). However, with an enrollment of 15, 000+ students, we want a means that is the easiest.
What can be easier than using Javascript in the browser? Everyone has a browser (or two, or three) installed on their machine. It also turns out there are a ton of great visualization frameworks out there for Javascript. I chose the simplest one: Google Charts.
I’ve used an earlier version of the Google Charts API to visualize some performance benchmarks and it was pretty easy to set up. However, that required using other language (Scala, Groovy) to read in a file and generate the data.
Can we do it all in Javascript? That is, can we read in a file directly from Javascript? With HTML 5 we can.
So by combining modern HTML5 features and a great visualization library, we get useful visualizations for free. And turns out Javascript and SVG is fast enough in the web browser to display around 12, 000 points with no problems.
Here it is in action:
You can find the code on my Github page here.
Tweetcomments powered by Disqus