Skip to content Skip to sidebar Skip to footer

Which Is Better Macro or Econo Paint Reviews

Magic VLSI Layout Tool Version 8.2 *

Magic Tutorial #2: Basic Painting and Selection

John Ousterhout

Computer science Segmentation
Electric Engineering and Computer Sciences
Academy of California
Berkeley, CA 94720

(Updated by others, as well.)

This tutorial corresponds to Magic version seven.4.

Tutorials to read showtime:

Magic Tutorial #i: Getting Started

Commands introduced in this tutorial:

box, clockwise, copy, erase, findbox, grid, label, tech, macro, move, pigment, redo, save, select, sideways, disengage, upsidedown, view, what, writeall, zoom

Macros introduced in this tutorial:

a, A, c, d, ^D, k, G, s, S, t, T, u, U, v, z, Z, 4, keypad keys

Cells and Paint

In Magic, a circuit layout is a hierarchical collection of cells. Each prison cell contains (primarily) four things: colored shapes, called paint, that ascertain the circuit's structure; textual labels attached to the paint; subcells, which are instances of other cells, and backdrop, which are arbitrary key-value pairs attached to the cell definition. The paint and the subcell placement are what determine the eventual function of the VLSI excursion. Labels and properties are a convenience for y'all in managing the layout and provide a style of communicating information between diverse synthesis and analysis tools. This tutorial explains how to create and edit pigment and labels in simple single-cell designs, using the basic painting commands. "Magic Tutorial #3: Avant-garde Painting (Wiring and Plowing)" describes some more avant-garde features for manipulating paint. For data on how to build up cell hierarchies, see "Magic Tutorial #4: Cell Hierarchies".

Painting and Erasing

Enter Magic to edit the cell tut2a (type magic tut2a to the Unix shell; follow the directions in "Tutorial #one: Getting Started" if you accept any bug with this). The tut2a cell is a sort of palette: it shows a splotch of each of several pigment layers and gives the names that Magic uses for the layers.

The two most bones and essential layout operations are painting and erasing. They tin can be invoked using the paint and erase commands, or using the buttons, or using the toolbar. The easiest way to paint and erase is with the mouse buttons. To paint, position the box over the area you'd like to paint, then move the cursor over a color and click the middle mouse button. To erase everything in an area, place the box over the expanse, press the Shift key, and while holding it down, click the middle mouse push; or, place the box over the area, motion the cursor over a bare spot, and click the middle mouse button. Try painting and erasing various colors. If the screen gets totally messed up, you can always leave Magic and restart it. While you're painting, white dots may occasionally appear and disappear. These are design dominion violations detected by Magic, and will be explained in "Magic Tutorial #six: Design Rule Checking". You can ignore them for now.

Now get to the menu button "Options" at the height of the layout window, click it, and select the push button "Toolbar" from the carte du jour. You lot should get a toolbar that looks something like Figure 1. If you practise not accept a version of Magic compiled with Tcl/Tk support, then you will not take access to the toolbar. When y'all enable the toolbar, a bunch of buttons volition appear on the right side of the window, each one containing a different colour and/or blueprint of pigment. You tin can click on these buttons similar to the way yous do on the layout window. While the push button bindings on the layout window change with the selected "tool" (see Tutorial #1), the push button bindings on the toolbar are fixed: Clicking the right button volition crusade all paint of that type on the layout (and the toolbar) to disappear. Clicking the left push button will cause all paint of that blazon on the layout to be shown. Clicking the middle button volition paint that layer blazon inside the box on the layout window. An additional feature of the toolbar is that when the cursor is on acme of one of the toolbar buttons, the proper noun of the layer pictured in the button will appear on the right side of the title bar. Every bit a tutorial exercise, observe the buttons for the layer types "polysilicon", "metal1", "ndiffusion", "polycontact", and "ntransistor" (all of which are mentioned in the paragraph below). Most of these layers take multiple names, so that if you lot use the command line to refer to, for example, "polysilicon", you may as well use the mutual name "poly", or "red". Likewise, "ndiffusion" may be called "ndiff" or "light-green" on the command line, "ntransistor" may be chosen "nfet", and "polycontact" may exist called "pc".

magic toolbar Figure i: The toolbar in the Tcl/Tk version of Magic. The prototype shown corresponds to the default "SCMOS" engineering science file, and the OpenGL graphics package.
It's completely legal to paint one layer on elevation of some other. When this happens, one of iii things may occur. In some cases, the layers are independent, so what you'll see is a combination of the 2, as if each were a transparent colored foil. This happens, for example, if you paint metal1 (blue) on top of polysilicon (cherry-red). In other cases, when you lot paint one layer on peak of another yous'll go something unlike from either of the two original layers. For example, painting poly (ruddy) on top of ndiff (greenish) produces ntransistor (try this). In still other cases the new layer replaces the old one: this happens, for example, if y'all paint a polycontact on top of ntransistor. Try painting different layers on top of each other to come across what happens. The meaning of the various layers is discussed in more detail in section "What the Layers Hateful" below.

There is a second way of erasing paint that allows you to erase some layers without affecting others. This is the macro ^D (command-D, for "Delete paint"). To utilise information technology, position the box over the area to be erased, then move the cursor over a splotch of paint containing the layer(s) you'd like to erase. Type ^D key on the text keyboard: the colors underneath the cursor volition exist erased from the area underneath the box, but no other layers will be afflicted. Experiment around with the ^D macro to try dissimilar combinations of paints and erases. If the cursor is over empty space then the ^D macro is equivalent to the middle mouse button: information technology erases everything.

You can also paint and erase using the long commands

paint layers
erase layers

In each of these commands layers is one or more than layer names separated by commas (you can too use spaces for separators, simply just if you enclose the unabridged list in double-quotes). Any layer can be abbreviated as long as the abbreviation is unambiguous. For example, paint poly,metal1 will paint the polysilicon and metal1 layers. The macro ^D is predefined by Magic to be erase $ ($ is a pseudo-layer that means "all the layers underneath the cursor").

Disengage

There are probably going to exist times when you'll do things that you'll later wish you hadn't. Fortunately, Magic has an undo facility that you can use to restore things later you've fabricated mistakes. The command

disengage

(or, alternatively, the macro u) volition undo the effects of the last command you invoked. If yous fabricated a mistake several commands dorsum, you tin type disengage several times to disengage successive commands. If y'all undo something and then decide you wanted it afterwards all, yous tin disengage the disengage with the command

redo

(U is a macro for this command). Try making a few paints and erases, and so apply undo and redo to piece of work backwards and forrad through the changes you made.

The Choice

Once you have painted a piece of layout, there are several commands you can invoke to modify the layout. Many of them are based on the selection: You select i or more pieces of the pattern, and so perform operations such every bit copying, deletion, and rotation on the selected things. To see how the choice works, load cell tut2b (as mentioned in Tutorial #1, you will desire a local copy so that information technology is editable). Yous can do this by typing load tut2b if yous're yet in Magic, or past starting up Magic with the shell command magic tut2b.

The first thing to do is to learn how to select. Move the cursor over the upper portion of the L-shaped blue area in tut2b, and type due south, which is a macro for select. The box volition jump over to cover the vertical part of the "L". This functioning selected a chunk of material (a chunk is defined as the largest possible rectangle of a single given cloth that contains the cursor point). Move the box away from the chunk, and you'll see that a thin white outline is left around the chunk to bear witness that information technology'due south selected. Now move the cursor over the vertical red bar on the correct of the cell and type s. The box will move over that bar, and the option highlighting will disappear from the blueish expanse.

If yous type s several times without moving the cursor, each command selects a slightly larger slice of material. Move the cursor back over the summit of the blue "L", and type due south three times without moving the cursor. The starting time s selects a chunk. The second s selects a region (all of the blue material in the region underneath the cursor, rectangular or not). The third south selects a net (all of the material that is electrically connected to the original clamper; this includes the blue metal, the red polysilicon, and the contact that connects them).

The macro Due south (short for select more) is merely like s except that it adds on to the option, rather than replacing it. Move the cursor over the vertical carmine bar on the right and type S to see how this works. You can as well type S multiple times to add regions and nets to the choice.

If you accidentally blazon due south or S when the cursor is over space, you'll select a cell (tut2b in this case). You can just undo this for now. Prison cell option will be discussed in "Magic Tutorial #iv: Cell Hierarchies".

Y'all can besides select fabric by area: place the box around the material you'd like to select and type a (short for select area). This will select all of the fabric underneath the box. You tin can use the macro A to add together material to the pick past area, and you can employ the long command

select
[more] area layers

to select only cloth on certain layers. Place the box around everything in tut2b and blazon "select area metal1" followed by "select more surface area poly".

If you'd like to clear out the choice without modifying any of the selected material, you tin use the command

select clear

or type the macro C. Yous tin clear out only a portion of the selection past typing "select less" or "select less area layers"; the erstwhile deselects pigment in the gild that select selects paint, while the latter deselects paint under the box (just as select area selects paint under the box).

Another way to select a specific material under the box is to utilise the toolbar. Put the cursor over the toolbar button containing the blazon of fabric that y'all want to select, then blazon the s cardinal. All material of this type under the box will exist selected. The South key over the toolbar push button removes all textile of that type from the electric current selection.

For a synopsis of all the options to the select command, type

select assist

Operations on the Selection

Once you lot've made a selection, there are a number of operations you tin can perform on it:

delete
motility [direction [distance]]
stretch [direction [distance]]
copy
upsidedown
sideways
clockwise [degrees]
rotate [[+|-]degrees]

The delete control deletes everything that'due south selected. Watch out: delete is dissimilar from erase, which erases paint from the expanse underneath the box. Select the red bar on the right in tut2b and type d, which is a macro for delete. Disengage the deletion with the u macro.

The motion control picks up both the box and the option and moves them then that the lower-left corner of the box is at the cursor location. Select the crimson bar on the right and movement it so that information technology falls on top of the vertical role of the blue "L". You tin utilize t ("translate") as a macro for move. Practice moving various things around the screen. The command re-create and its macro c are but like move except that a copy of the selection is left backside at the original position.

There is also a longer form of the move command that you can utilize to move the option a precise amount. For example, move up 10 will motility the selection (and the box) upwards ten units. The direction argument tin exist any direction like left, south, northwest, down, etc. Run across the command reference page for a consummate list of the legal directions. The keypad keys are defined as macros to move the selection in the management of the keypad arrow by one unit. For a detailed explanation of units of distance, run across the command reference page.

The stretch control is similar to move except that information technology stretches and erases every bit it moves. stretch does not operate diagonally, so if you use the cursor to indicate where to stretch to, Magic will either stretch up, downward, left, or right, whichever is closest. The stretch command moves the pick and also does 2 additional things. Kickoff, for each slice of paint that moves, stretch will erase that layer from the region that the pigment passes through as it moves, in guild to articulate textile out of its way. 2d, if the back edge of a slice of selected pigment touches non-selected material, one of the two pieces of paint is stretched to maintain the connexion. The keypad keys 8, iv, 6, and 2 (the non-diagonal directions) pressed while the Shift key is held down implement macros for the stretch direction 1 command The macro T is predefined to stretch. To see how stretching works, select the horizontal piece of the light-green wire in tut2b and type keypad- 8, then keypad- 2. Stretching only worries about fabric in forepart of and behind the selection; information technology ignores material to the sides (endeavor the keypad- 4 and keypad- six macros to see). You tin apply plowing (described in Tutorial #3) if this is a trouble.

The command upsidedown volition flip the selection upside downwardly, and sideways flips the pick sideways. Both commands get out the selection so information technology occupies the same total area equally before, simply with the contents flipped. The command "clockwise degrees" will rotate the selection clockwise, leaving the lower-left corner of the new selection at the aforementioned identify equally the lower-left corner of the quondam selection. The value degrees must be a positive multiple of xc, and defaults to 90. The control rotate is the aforementioned every bit clockwise but may take negative multiples of 90 for counterclockwise rotation.

At this point you know enough to practice quite a scrap of harm to the tut2b cell. Experiment with the selection commands. Call up that you can use undo to back out of trouble.

The Interactive Pick Tool

Recall from Tutorial #1 that Magic defines unlike mouse button bindings chosen "tools". The default crosshair cursor indicates that the "box tool" bindings are in effect. Also (in the Tcl/Tk version of Magic only), the title bar contains the text " Tool: box ". If you blazon the command
tool pick
you volition get the "selection tool", a special tool for implementing interactive choice moves and copying. You will notice a round crosshair ("") cursor, and the championship bar volition denote " Tool: choice ".

Assuming an original and unmodified tut2b cell, create a box effectually the pinnacle one-half of the layout to surround the areas of metal1, polysilicon, and polycontact. Type the key macro a to select all of this fabric at once. Note that the left and right mouse buttons retain their usual part of manipulating the box corners in the "pick" tool.

Now, click the eye mouse button. The selection volition disappear from the layout, merely you will discover that the outline of the selection is still visible, and follows the cursor (which is now a "pointing manus" ("") glyph) around. To practise an interactive copy, place the selection outline anywhere on the layout and click the left mouse push. The choice will be copied at that position. However, the option outline remains and continues to follow the cursor around the layout. Notice a unlike position on the layout, and click the left mouse button once again. You can make any number of copies of the selected fabric this way. Now, go to yet another position, and click the middle mouse button. The selection is placed, as before, just this fourth dimension the outline does not appear, does not follow the cursor, and the cursor glyph has reverted to the "" shape.

If you wish to do the same interactive copy or movement, simply don't desire to erase the original option, press and hold the Shift fundamental before y'all click the middle mouse button. You lot are placed in the same interactive copy-or-motion way equally described above.

To render to the "box tool" mode, where the middle mouse push is used to paint and erase textile, type the Space bar, or type the command

tool box
and you will return to the box tool mode with the "" cursor.

Labels

Labels are pieces of text fastened to the paint of a cell. They are used to provide information to other tools that will process the circuit. Most labels are node names: They provide an easy way of referring to nodes in tools such as routers, simulators, and timing analyzers. Labels may also be used for other purposes: for instance, some labels are treated as attributes that tin can provide, for example, information about the direction of betoken menstruum through a transistor.

Load the jail cell tut2c and identify a point characterization (which appears as a cross) in the centre of the blood-red clamper (a cross, or point is a box with zip width and null meridian. Position the lower-left corner of the box with the left push button and then click the right button to place the upper-correct corner at the same position equally the lower-left corner). And so type the command label examination. A new label will appear at the position of the box. The consummate syntax of the label command is

label text [position [layer]]

Text must exist supplied, but the other arguments can exist defaulted. If text has any spaces in information technology, and then it must be enclosed in double quotes. Position tells where the text should be displayed, relative to the point of the characterization. It may exist any of the valid directions. For case, if direction "ne" is given, the text will be displayed above and to the correct of the label point. If no position is given, Magic will pick a position for you. Layer tells which paint layer to adhere the label to. If layer covers the unabridged area of the characterization, so the label will be associated with the item layer. If layer is omitted, or if it doesn't cover the label's area, Magic initially associates the label with the "space" layer, and then checks to encounter if there's a layer that covers the whole area. If there is, Magic moves the characterization to that layer. Information technology is generally a bad thought to place labels at points where there are several paint layers, since it volition be difficult to tell which layer the label is fastened to. Every bit you edit, Magic volition ensure that labels are only attached to layers that exist everywhere under the characterization. To see how this works, paint the layer pdiff (brownish) over the label yous just created: the label will switch layers. Finally, erase poly over the surface area, and the label will movement again.

Although many labels are point labels, this need not be the case. You lot tin label any rectangular area past setting the box to that area before invoking the label control. This feature is used for labeling terminals for the router (see beneath), or for labeling ports used by LEF file macro definitions. Tut2c has examples of signal, line, and rectangular labels.

All of the selection commands use to labels as well as paint. Whenever you select paint, the labels attached to that paint will too exist selected. Selected labels are highlighted in white. Select some of the chunks of pigment in tut2c to see how the labels are selected too. When you lot use expanse choice, labels will only be selected if they are completely contained in the area being selected. If you'd like to select just a label without any paint, make the box into a cross and put the cross on the label: south and S will select just the label.

There are several ways to erase a characterization. One way is to select so delete it. Another way is to erase the paint that the label is fastened to. If the paint is erased all around the characterization, and then Magic will delete the label too. Endeavour attaching a label to a red area, so paint blue over the red. If you erase blueish the label stays (since it's attached to red), but if you erase the cherry-red and then the label is deleted.

Y'all can also erase labels using the "erase labels" command. The command

erase labels
will erase all labels that prevarication completely within the area of the box. Finally, you lot can erase a label by making the box into a cross on meridian of the label, and then clicking the middle push button with the cursor over empty infinite. Technically, this will erase all paint layers and labels likewise. Nevertheless, since the box has zero area, erasing paint has no event: only the labels are erased.

The Tcl/Tk-based version of Magic has 2 macros + (plus) and - (minus) that implement auto-increment and car-decrement, respectively. On the layout, ready the box on whatever available paint and type "label test1". Then, move the box somewhere else and type the central +. Do this several more times. Then, move the box once once again and blazon the central -. Anyone who has ever tried to label a 64-chip digial coach will immediately understand the usefulness of these macros. Note that the automobile-increment and -decrement macros brand use of a special macro (run into below) that retains the text of the terminal long command typed. They operate by searching the last long command for the first number embedded in the string, increment or decrement that number, supervene upon the control string, then execute information technology. So the auto increment and decrement macros only piece of work properly when the last long control typed is the label command. (Equally an aside, notation that according to the definition, the macros will in fact operate on any control, and so that the control "move east 1" followed by the central macro + will execute the command "motion e 2", "motility e 3", etc. Information technology seems unlikely, nevertheless, that anyone would find this aspect of the command useful.)

Labeling Conventions

When creating labels, Magic will allow you to apply absolutely whatsoever text whatsoever. Even so, many other tools, and even parts of Magic, expect label names to find sure conventions. Except for the special cases described below, labels shouldn't incorporate any of the characters "/$@!^". Spaces, command characters, or parentheses within labels are probably a bad idea too. Many of the programs that process Magic output have their own restrictions on characterization names, so you should discover out nigh the restrictions that apply at your site. Most labels are node names: each one gives a unique identification to a set up of things that are electrically connected. There are ii kinds of node names, local and global. Any label that ends in "!" is treated as a global node proper noun; it will be assumed that all nodes by this name, anywere in any cell in a layout, are electrically connected. The most common global names are Vdd! and GND!, the power rails. You should e'er use these names exactly, since many other tools require them.

Any label that does not end in "!" or any of the other special characters discussed below is a local node name. It refers to a node inside that particular cell. Local node names should be unique within the cell: there shouldn't be two electrically distinct nodes with the aforementioned proper noun. On the other hand, information technology is perfectly legal, and sometimes advantageous, to give more than than one proper name to the same node. It is also legal to use the same local node name in different cells: the tools will be able to distinguish between them and will non assume that they are electrically continued. In that location are occasions when it is useful to have two electrically disconnected nodes with the aforementioned node name, usually so that the nodes will exist conveniently merged together in the output netlist used for simulation. This feature should exist used rarely, and cautiously, because information technology "fakes" an electric connection where none exists in the physical layout.

Another label type is a port characterization, which is a characterization created in the normal manner but alleged to be a "port" of a subcell by using the command port. This is used mostly by the LEF and DEF output read and write routines, and is non covered in this tutorial.

The only other labels currently understood by the tools are attributes. Attributes are pieces of text associated with a particular slice of the circuit: they are not node names, and need not be unique. For example, an attribute might identify a node as a scrap input, or information technology might identify a transistor final as the source of information for that transistor. Any label whose last character is "@", "$", or "^" is an aspect. There are three dissimilar kinds of attributes. Node attributes are those ending with "@"; they are associated with detail nodes. Transistor source/drain attributes are those catastrophe in "$"; they are associated with particular terminals of a transistor. A source or drain attribute must be attached to the channel region of the transistor and must fall exactly on the source or drain border of the transistor. The tertiary kind of attribute is a transistor gate attribute. Information technology ends in "^" and is attached to the channel region of the transistor. To come across examples of attributes and node names, edit the jail cell tut2d in Magic.

Special conventions utilise to labels for routing terminals. The standard Magic router (invoked by route) ignores all labels except for those on the edges of cells. (This restriction does not apply to the gate-array router, Garoute, or to the interactive router, Iroute). If yous await to apply the standard router to connect to a detail node, y'all should place the label for that node on its outermost border. The characterization should non be a point label, but should instead be a horizontal or vertical line covering the entire edge of the wire. The router will choose a connection indicate somewhere along the label. A good rule of pollex is to label all nodes that enter or leave the prison cell in this way. For more details on how labels are used by the standard router, see "Magic Tutorial #seven: Netlists and Routing". Other labeling conventions are used past the Garouter and Irouter; consult their respective tutorials for details.

Files and Formats

Magic provides a diversity of ways to relieve your cells on disk. Commonly, things are saved in a special Magic format. Each jail cell is a separate file, and the name of the file is just the name of the cell with .mag appended. For case, the cell tut2a is saved in file tut2a.mag. To save cells on disk, invoke the control

writeall

This command will run through each of the cells that yous accept modified in this editing session, and enquire you what to do with the cell. Normally, you'll click the write button, in which instance the cell volition be written back to the disk file from which information technology was read (if this is a new cell, and then yous'll be asked for a name for the prison cell). If you click the autowrite push button, then Magic volition write out all the cells that take changed without request you what to do on a prison cell-by-cell basis. The affluent button will cause Magic to delete its internal copy of the prison cell and reload the cell from the disk copy, thereby expunging all edits that y'all've made. The skip button will laissez passer on to the next cell without writing this cell (but Magic still remembers that it has changed, and so the side by side time you invoke writeall Magic volition enquire about this cell again). Finally, the abort push will finish the command immediately without writing or checking any more than cells.

Notation: The not-Tcl/Tk version of Magic doesn't proceed checkpoint files. This ways that if the system should crash in the eye of a session, you'll lose all changes since the last time yous wrote out cells. It's a skilful thought to save your cells frequently during long editing sessions. The Tcl/Tk interpreter-enabled version of Magic uses checkpoint files, so work is saved periodically and tin exist recovered later a crash by specifying "magic -r".

Y'all tin also save the cell y'all're currently editing with the control

save proper noun

This command will append ".mag" to name and relieve the cell you are editing in that location. If you don't provide a proper noun, Magic volition employ the prison cell's name (plus the ".mag" extension) as the file proper name, and it will prompt you for a proper noun if the cell hasn't yet been named.

Once a cell has been saved on disk you lot tin edit information technology by invoking Magic with the command

magic proper noun

where name is the same name you used to save the cell (the ".mag" extension is optional).

Magic can as well read and write files in CIF and GDS Stream formats. See "Magic Tutorial #9: Format Conversion for CIF and GDS" for details. Usually it is not a good idea to save Magic layouts in CIF or GDS format, because most applied science files do not define completely reversible operations betwixt the input and output descriptions, so layout can become altered in the procedure.

Plotting

Magic can generate hardcopy plots of layouts in two ways: PostScript (color), and PNM (the standard "Portable aNyMap" graphics format that can be massaged in many means). To plot role of your design in PostScript, identify the box around the part y'all'd like to plot and type

plot postscript file [layers]

This volition generate a plot of the area of the box. Everything visible underneath the box will appear in more than-or-less the aforementioned way in the plot. If layers is given, information technology specifies exactly what data is to be plotted. Only those layers will announced in the plot. The special "layer" labels will enable label plotting. The default width (or height) of the plot is the width of the printer folio. The width can be changed using the "plot parameter PS_Width value" control, where the value is in PostScript units (one/72 inch).

The PNM style of plotting generates a file of pixel values for the region to be plotted. This can be useful for input to other image tools, or for generation of slides and viewgraphs for presentations. The PNM format is readily understood by various graphics manipulation programs. The standard Linux program catechumen can convert the PNM paradigm to any other standard format such every bit GIF or JPEG (a useful thing to do, since PNM images are not compressed in whatsoever fashion). The PNM plot blends and antialiases colors in the layout, and then is exceptionally good at generating fine item at the scale of unabridged chip layouts. The PNM plot is created with the control

plot pnm file [scale [layers]]
where file and layers have the same meaning as they practise for PostScript plots, and scale determines the overall size of the output plot.

As a rule of thumb, small layouts where features such every bit transistor gates and contacts are hands visible should be plotted with PostScript output. Big layouts where transistor gates and contacts are hard to encounter should be plotted with PNM output. PNM output is especially useful to generate total-flake pictures that are good for drawing bond wire diagrams, or just to tape on the wall. NOTE: To get PostScript output, information technology is necessary that the technology file draw the colors and stipple patterns used in its plot section. Otherwise, if zero is defined, the output will be a blank page. PNM plots, on the other paw, will make apply of a fashion automatically generated from the layout colour definitions, and then does non need any special handling in the applied science file (although the technology file plot section may be used to refine the colors used in the prototype).

Utility Commands

In that location are several additional commands that you will probably discover useful once you lot start working on real cells. The command

filigree [spacing]
grid xSpacing ySpacing
grid xSpacing ySpacing xOrigin yOrigin
grid off

volition display a grid over your layout. Initially, the grid has a one-unit of measurement spacing. Typing grid with no arguments will toggle the grid on and off. If a single numerical argument is given, the grid will be turned on, and the grid lines volition be spacing units apart. The macro grand provides a brusque class for grid and G is brusque for filigree 2. If you provide ii arguments to grid, they are the ten- and y-spacings, which may be different. If you provide four arguments, the final 2 specify a reference point through which horizontal and vertical grid lines laissez passer; the default is to use (0,0) as the grid origin. The command grid off always turns the grid off, regardless of whether or not is was previously on. When the grid is on, a small black box is displayed to mark the (0,0) coordinate of the cell y'all're editing.

An alternative to the grid for helping with the alignment of geometry on the layout is the interactive crosshair. In the Tcl/Tk-enabled version of Magic, choose the menu push button "Options" followed past selecting the check button "Crosshair". When this is selected, a calorie-free yellow crosshair follows the cursor, helpfully snapping to the filigree. It tin can be removed by unchecking the menu check button.

If you want to create a prison cell that doesn't fit on the screen, you'll need to know how to change the screen view. This can be done with three commands:

zoom gene
findbox [zoom]
view

If factor is given to the zoom control, it is a zoom-out factor. For instance, the command "zoom 2" volition change the view and so that there are twice every bit many units beyond the screen as there used to exist (Z is a macro for this). The new view will take the same heart as the old one. The control "zoom .5" (macro z) will increase the magnification so that only half as much of the circuit is visible.

The findbox command is used to change the view co-ordinate to the box. The command alone just moves the view (without changing the calibration factor) and so that the box is in the center of the screen. If the zoom argument is given then the magnification is changed too, so that the area of the box nearly fills the screen. ^Z is a macro for "findbox zoom" and B is a macro for "findbox".

The command view resets the view so that the entire cell is visible in the window. It comes in handy if you get lost in a large layout. The macro v is equivalent to view.

The command box prints out the size and location of the box in case you'd like to measure something in your layout. The macro b is predefined to box. The box command can likewise be used to gear up the box to a particular location, summit, or width. See the control reference folio for details.

The command

what

will print out information nearly what's selected. This may be helpful if yous're non sure what layer a particular piece of material is, or what layer a particular characterization is attached to.

If you forget what a macro means, y'all can invoke the command

macro [char]

This control will print out the long command that's associated with the macro char. If you lot omit char, Magic volition print out all of the macro associations. The command

macro char command
declares char to be a macro for command, replacing the old char macro if there was 1. If command contains whatever spaces and so it must exist enclosed in double-quotes. To see how this works, type the command
macro 1 "echo You just typed the i key."
then blazon the 1 key.

One of the macros, ".", has special meaning in Magic. This macro is always defined past the organization to exist the last long command you typed. Whenever yous'd like to repeat a long command, all you lot have to exercise is use the dot macro.

In the Tcl/Tk-based version of Magic, macro commands may be Magic commands, Tcl/Tk commands, or any combination thereof. Macros using Tcl commands are used to implement the car-increment and auto-decrement label features mentioned higher up in the section on labels.

What the Layers Hateful

The paint layers available in Magic are unlike from those that yous may be used to in Cadence and other systems because they don't represent exactly to the masks used in fabrication. Nosotros call them abstruse layers because they correspond to constructs such as wires and contacts, rather than mask layers. In Magic at that place is one paint layer for each kind of conducting material (polysilicon, ndiffusion, metal1, etc.), plus one boosted paint layer for each kind of transistor (ntransistor, ptransistor, etc.), and, finally, one further paint layer for each kind of contact (pcontact, ndcontact, m2contact, etc.) Each layer has one or more names that are used to refer to that layer in commands. To discover out the layers bachelor in the current technology, blazon the command

tech layers

In improver to the mask layers, there are a few pseudo-layers that are valid in all technologies; these are listed in Tabular array 1. Each Magic technology besides has a technology manual describing the features of that engineering, such as pattern rules, routing layers, CIF styles, etc. If yous haven't seen any of the technology manuals yet, this is a practiced time to have a look at the one for your process.

Table 1: Pseudo-layers available in all technologies.
errors (pattern-rule violations)
labels
subcells
* (all mask layers)
$ (all mask layers visible under cursor)

If you're used to designing with mask layers, Magic's abstract layers will accept some getting used to. Ane of the reasons for abstract layers is to save you lot work. In Magic y'all (normally) don't describe implants, wells, cached windows, or contact via holes. Instead, you lot draw the primary conducting layers and paint some of their overlaps with special types such as north-transistor or polysilicon contact. For transistors, you describe but the actual area of the transistor channel. Magic will generate the polysilicon and diffusion, plus whatever necessary implants, when it creates a CIF file. For contacts, you paint the contact layer in the area of overlap between the conducting layers. Magic will generate each of the constituent mask layers plus vias and buried windows when information technology writes the CIF file. Figure two shows a unproblematic prison cell drawn with both mask layers (as in Cadence) and with abstract layers (as in Magic). If you lot're curious about what the masks will look like for a item layout, you can employ the cif see control to view the mask data.

Figure two: An example of how the abstract layers are used. The figure on the left shows actual mask layers for an CMOS inverter jail cell, and the figure on the right shows the layers used to represent the cell in Magic.
tut2_1.gif tut2_2.gif

An reward of the abstract layers used in Magic is that they simplify the design rules. Near of the formation rules (eastward.grand. contact structure) go abroad, since Magic automatically generates correctly-formed structures when information technology writes CIF or GDS. All that are left are minimum size and spacing rules, and Magic'southward abstract layers consequence in fewer of these than there would exist otherwise. This helps to brand Magic's congenital-in design rule checker very fast (come across "Magic Tutorial #6: Blueprint Rule Checking"), and is one of the reasons plowing is possible.


R. Timothy Edwards 2006-02-17

Last updated: March 7, 2020 at 12:47pm

smithparm1954.blogspot.com

Source: http://opencircuitdesign.com/magic/tutorials/tut2.html

Postar um comentário for "Which Is Better Macro or Econo Paint Reviews"