EEC 116 - Debugging with the Magic and IRSIM CAD Tools
Are things not working? Try these first
- Check transistor-level schematic (if you don't have one,
draw one now).
- Check stick diagram, make sure the circuit matches the
schematic (if you don't have one, draw one now).
- Check that magic layout matches the stick diagram.
- Verify magic connections and node names.
Verify all power nodes are called Vdd and all
ground nodes are called GND using getnode.
Once the connections are verified correct, fix any DRC
errors in the circuit. You can find the cause of an error by
placing the box around the white dotted paint and using
'drc why' or ?.
- Select all important nodes including Vdd and Gnd,
one at a time, by pressing s two or three times
- Type 'getnode' to get the "real" node name
and verify they are as they should be.
This is the name that IRSIM knows about.
- If magic gives warnings when you extract your
- Put a box around white warning paint and type
- Fix cause of warning(s).
- Type 'feedback clear' to clear
- Repeat until all warnings are solved
Select important nodes (including inputs, outputs,
Vdd, and GND of gates) one at a time, using s in
Type 'getnode' to get the "real" node
Type 'analyzer nodename' in IRSIM to
see the signals inside your simulation.
Start at inputs, move a node at a time toward
Check that block inputs are correct
Check outputs of gates which have block inputs
as the gates' inputs
Think hard while studying the waveforms on
irsim's analyzer—this is the quickest way to
get a design working.
[repeat] You will find the bug(s).
Finding the source of X's
Start with a node that has gone X, move a node
at a time toward the inputs of that gate.
[repeat.] Until the source of the X's is found.
If nothing is working right
Copy your top-level .mag file to a temporary working file (e.g.,
temp.mag) and remove layout from it until it works.
Using IRSIM to find slow circuit paths
- To speed up a circuit, use a small step size to determine
the slowest path in a simulation. Then type
'path nodename' to see the transitions in that node
all the way back to the input. The slow nodes in that path
are the ones to speed up!
- If the IRSIM analyzer window freezes, doesn't redraw, and
doesn't allow you to change anything, type s until
it unfreezes. You normally shouldn't have to type more than 2
or 3 s characters.
2004/05/20 Added more magic tips and irsim section
2004/05/24 Schematic tips
2004/05/27 Irsim path command
2005/05/23 Updated for spring 05
2005/05/31 Added area calculation thanks to Jeremy Webb
2006/04/11 Updated for Spring 2006
2006/06/05 Added top-level power node hint
2008/04/30 Touched up magic error messages
2009/06/01 Touched up debugging notes
2010/10/19 Touched up and moved portions to magic.tips.html
2012/12/09 Added suggestion to copy cell and remove layout
2017/12/11 Added section on outputs going "x"; minor edits
2017/12/13 Major edits in section 1