- Parent Directory - MIF File -
Magic Tutorial #7: Netlists and Routing
John Ousterhout
(Updated by others, too.)
(active version by Mrio Silva, msilva@cs.Berkeley.EDU)
Computer Science Division
Electrical Engineering and Computer Sciences
University of California
Berkeley, CA 94720
This tutorial corresponds to Magic version 6.
Tutorials to read first:
Magic Tutorial #1: Getting Started
Magic Tutorial #2: Basic Painting and Selection
Magic Tutorial #3: Advanced Painting (Wiring and Plowing)
Magic Tutorial #4: Cell Hierarchies
Magic Tutorial #5: Multiple Windows
Netlist commands introduced in this tutorial:
:extract, :flush, :ripup, :savenetlist, :trace, :writeall
Layout commands introduced in this tutorial:
:channel, :route
Macros introduced in this tutorial:
(none)
1. Introduction
This tutorial describes how to use Magic's automatic routing tools to make interconnections between subcells in a design. In addition to the standard Magic router, which is invoked by the route command and covered in this tutorial, two other routing tools are available. A gate-array router Garouter permits user specified channel definitions, terminals in the interior of cells, and route-throughs across cells. To learn about the gate-array router read this first then ``Magic Tutorial #12: Routing Gate Arrays''. Finally Magic provides an interactive maze-router that takes graphic hints, the Irouter, that permits the user to control the overall path of routes while leaving the tedious details to Magic. The Irouter is documented in ``Magic Tutorial #10: The Interactive Router''.
The standard Magic router provides an obstacle-avoidance capability: if there is mask material in the routing areas, the router can work under, over, or around that material to complete the connections. This means that you can pre-route key signals by hand and have Magic route the less important signals automatically. In addition, you can route power and ground by hand (right now we don't have any power-ground routing tools, so you have to route them by hand).
The router only makes connections between subcells; to make point-to-point connections between pieces of layout within a single cell you should use the wiring command described in ``Magic Tutorial #3: Advanced Painting (Wiring and Plowing) '' or the maze router described in ``Magic Tutorial #10: The Interactive Router''. If you only need to make a few connections you are probably better off doing them manually.
The first step in routing is to tell Magic what should be connected to what. This information is contained in a file called a netlist. Sections 2, 3, 4, and 5 describe how to create and modify netlists using Magic's interactive netlist editing tools. Once you've created a netlist, the next step is to invoke the router. Section 6 shows how to do this, and gives a brief summary of what goes on inside the routing tools. Unless your design is very simple and has lots of free space, the routing probably won't succeed the first time. Section 7 describes the feedback provided by the routing tools. Sections 8 and 9 discuss how you can modify your design in light of this feedback to improve its routability. You'll probably need to iterate a few times until the routing is successful.
2. Terminals and Netlists
A netlist is a file that describes a set of desired connections. It contains one or more nets. Each net names a set of terminals that should all be wired together. A terminal is simply a label attached to a piece of mask material within a subcell; it is distinguishable from ordinary labels within a subcell by its presence within a netlist file and by certain characteristics common to terminals, as described below.
The first step in building a netlist is to label the terminals in your design. Figure
1
shows an example. Each label should be a line or rectangle running along the edge of the cell (point terminals are not allowed). The router will make a connection to the cell somewhere along a terminal's length. If the label isn't at the edge of the cell, Magic will route recklessly across the cell to reach the terminal, taking the shortest path between the terminal and a routing channel. It's almost always a good idea to arrange for terminal labels to be at cell edges. The label must be at least as wide as the minimum width of the routing material; the wider you make the label, the more flexibility you give the router to choose a good point to connect to the terminal.