Never use global labels (labels ending in "!"). Even in subcells as they can confuse your simulation.
Use "Vdd" and "Gnd" for your power and ground nodes so they will be recognized by irsim.
Check the connectivity of all nodes before simulating by pressing the "s" key 2 or 3 times
:drc why is default bound to y. This is your friend.
Error: "Cannot read extract file subcell.mag.ext"
When placing subcells with the 'getcell <subcell>'
command, do not use the ".mag" extension on the subcell as
in, 'getcell <subcell.mag>' even though magic will let you.
There will likely be ext2sim or irsim problems if you do.
Error: "Did you point to the correct window?"
If you get this message and you are over the
layout window, try moving the window around a little.
Use :getnode (default bound to k) to check if your nodes are properly labeled.
If a number of cells of the same type need to be placed
adjacent to each other, use
":array
If magic does not re-extract cells even though you make changes, you may need to type 'extract all' to force magic to re-extract the root cell and all subcells.
With the newest version of magic, the colon (:) is no longer used when entering commands into the text entry window but it can be used to focus on the text entry window when the layout window is active.
Use the :see command to allow you to see only the layers you care about.
Using :see list is a really handy way to see all the possible layers you can see (and thus probably paint).
Finding Cell Area
The key "." (i.e., period) is by default bound to the command :macro. Use this to list all the macros, these hotkeys WILL save you time.
You will probably save time by using the wiring tool. To use it:
Put small stub extensions or overlays of the appropriate matching material in your upper-level cells for all interfacing signals and place labels on these small patches of material; otherwise these top-level labels will not be connected to the nodes in the lower-level cells during irsim simulation. For example, if a subcell has a piece of metal2 that comes to its edge and it used for "clock", you must place a small extension of metal2 with the label "clock" (or something different if you prefer) in an upper-level cell that uses this subcell. The small extension can be either next to or on top of the node in the lower-level cell.
Use the zoom command (default bind: z) in magic to zoom to your selection box. Zoom out using Shift+z. Select a cell or wire using s.
Use the box tool (default hotkey: b) to automatically get area measurements.
When all else fails, start adding labels along your data flow to spot where the error first shows up. That way you can isolate where the problem is and fix it instead of trying to match symptoms of outputs to their cause. It may feel tedious, but it's much more time efficient than waiting for the Insight Fairy to visit.
Extraction warnings are BAD. Use :feedback why and :feedback find <#> to see the errors, locate them, and debug them. They are almost always from connecting nodes using labels and not actual wires.
Using > ext2sim -R -L -c 20 <cellname>.ext is the standard procedure for testing. -R removes resistances. -L ensures we don't use an alias file. -c 20 discards capacitances lower than 20 fF.
Once your cells are functional, to test timing remove all watch commands from your test script and use only the analyzer readout to check funcationality. It makes it easier to spot IRSIM's "pending events" notifications, and thus measure max delay much easier.
Stepsize = 1/2 of a clock cycle. So, the full clock period is 2*Stepsize.
If data takes multiple cycles to get through your cell due to registers, add a few extra clock cycles to the end of your testbench script so that you can see the outputs.
2009/05/27 Initial version 2010/02/09 Updated with some common errors 2010/10/19 Touched up and incorporated tips from debug.html 2014/10/28 Added many tips 2014/12/11 Fixed typo: 20 fF not 20 pF 2018/03/10 General cleanup 2018/11/29 Minor edits 2023/12/06 Removed redundant guideline