Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Magic Tutorial #5: Multiple Windows - Managing Multiple Windows in Magic CAD Software, Papers of Electrical and Electronics Engineering

This tutorial from the university of california, berkeley explains how to create, move, resize, and manipulate multiple windows in magic cad software. It covers opening and closing windows, scrolling, saving window configurations, and editing colors. It also discusses the difference between windows displaying the same cell and different cells.

Typology: Papers

Pre 2010

Uploaded on 08/19/2009

koofers-user-j01
koofers-user-j01 🇺🇸

4

(1)

10 documents

1 / 7

Toggle sidebar

Related documents


Partial preview of the text

Download Magic Tutorial #5: Multiple Windows - Managing Multiple Windows in Magic CAD Software and more Papers Electrical and Electronics Engineering in PDF only on Docsity! Magic Tutorial #5: Multiple Windows Robert N. Mayo Computer Science Division Electrical Engineering and Computer Sciences University of California Berkeley, CA 94720 (Updated by others, too.) This tutorial corresponds to Magic version 6. Tutorials to read first: Magic Tutorial #1: Getting Started Magic Tutorial #2: Basic Painting and Selection Commands introduced in this tutorial: :center :closewindow, :openwindow, :over, :specialopen, :under, :windowpositions Macros introduced in this tutorial: o, O, ‘‘,’’ 1. Introduction A window is a rectangular viewport. You can think of it as a magnifying glass that may be moved around on your chip. Magic initially displays a single window on the screen. This tutorial will show you how to create new windows and how to move old ones around. Multiple windows allow you to view several portions of a circuit at the same time, or even portions of different circuits. Some operations are easier with multiple windows. For example, let’s say that you want to paint a very long line, say 3 units by 800 units. With a single window it is hard to align the box accurately since the magnification is not great enough. With multiple windows, one window can show the big picture while other windows show magnified views of the areas where the box needs to be aligned. The box can then be positioned accurately in these magnified windows. - 1 - Magic Tutorial #5: Multiple Windows September 19, 1990 2. Manipulating Windows 2.1. Opening and Closing Windows Initially Magic displays one large window. The :openwindow [cellname] command opens another window and loads the given cell. To give this a try, start up Magic with the command magic tut5a. Then point anywhere in a Magic window and type the command :openwindow tut5b (make sure you’re pointing to a Magic window). A new window will appear and it will contain the cell tut5b. If you don’t give a cellname argument to :openwindow, it will open a new window on the cell containing the box, and will zoom in on the box. The macro o is predefined to :openwindow. Try this out by placing the box around an area of tut5b and then typing o. Another window will appear. You now have three windows, all of which display pieces of layout. There are other kinds of windows in Magic besides layout windows: you’ll learn about them later. Magic doesn’t care how many windows you have (within reason) nor how they overlap. To get rid of a window, point to it and type :closewindow or use the macro O. Point to a portion of the original window and close it. 2.2. Resizing and Moving Windows If you have been experimenting with Magic while reading this you will have noticed that windows opened by :openwindow are all the same size. If you’d prefer a different arrangement you can resize your windows or move them around on the screen. The techniques used for this are different, however, depending on what kind of display you’re using. If you are using a workstation, then you are also running a window system such as X11 or SunView. In this case Magic’s windows are moved and resized just like the other windows you have displayed, and you can skip the rest of this section. For displays like the AED family, which don’t have a built-in window package, Magic implements its own window manager. To re-arrange windows on the screen you can use techniques similar to those you learned for moving the box for painting opera- tions. Point somewhere in the border area of a window, except for the lower left corner, and press and hold the right button. The cursor will change to a shape like this: This indicates that you have hold of the upper right corner of the window. Point to a new location for this corner and release the button. The window will change shape so that the corner moves. Now point to the border area and press and hold the left button. The cur- sor will now look like: - 2 - Magic Tutorial #5: Multiple Windows September 19, 1990 These windows are independent in some respects, however. For example, you may scroll one window around without affecting the other window. Use the scrollbars to give this a try. You can also expand and unexpand cells independently in different windows. We have seen how Magic behaves when both windows view a single cell. What happens when windows view different cells? To try this out load tut5b into one of the windows (point to a window and type :load tut5b). You will see the captions on the windows change — only one window contains the cell currently being edited. The box cannot be positioned by placing one corner in one window and another corner in the other window because that doesn’t really make sense (try it). However, the selection commands work between windows: you can select information in one window and then copy it into another (this only works if the window you’re copying into contains the edit cell; if not, you’ll have to use the :edit command first). The operation of many Magic commands is dependent upon which window you are pointing at. If you are used to using Magic with only one window you may, at first, for- get to point to the window that you want the operation performed upon. For instance, if there are several windows on the screen you will have to point to one before executing a command like :grid — otherwise you may not affect the window that you intended! 4. Special Windows In addition to providing multiple windows on different areas of a layout, Magic pro- vides several special types of windows that display things other than layouts. For exam- ple, there are special window types to edit netlists and to adjust the colors displayed on the screen. One of the special window types is described in the section below; others are described in the other tutorials. The :specialopen type [args] command is used to create these sorts of windows. The type argument tells what sort of window you want, and args describe what you want loaded into that window. The :openwindow cellname command is really just short for the command :specialopen lay- out cellname. Each different type of window (layout, color, etc.) has its own command set. If you type :help in different window types, you’ll see that the commands are different. Some of the commands, such as those to manipulate windows, are valid in all windows, but for other commands you must make sure you’re pointing to the right kind of window or the command may be misinterpreted. For example, the :extract command means one thing in a layout window and something totally different in a netlist window. 5. Color Editing Special windows of type color are used to edit the red, green, and blue intensities of the colors displayed on the screen. To create a color editing window, invoke the com- mand :specialopen color [number] Number is optional; if present, it gives the octal value of the color number whose inten- sities are to be edited. If number isn’t given, 0 is used. Try opening a color window on color 0. - 5 - Magic Tutorial #5: Multiple Windows September 19, 1990 A color editing window contains 6 ‘‘color bars’’, 12 ‘‘color pumps’’ (one on each side of each bar), plus a large rectangle at the top of the window that displays a swatch of the color being edited (called the ‘‘current color’’ from now on). The color bars display the components of the current color in two different ways. The three bars on the left display the current color in terms of its red, green, and blue intensities (these intensities are the values actually sent to the display). The three bars on the right display the current color in terms of hue, saturation, and value. Hue selects a color of the spectrum. Satura- tion indicates how diluted the color is (high saturation corresponds to a pure color, low saturation corresponds to a color that is diluted with gray, and a saturation of 0 results in gray regardless of hue). Value indicates the overall brightness (a value of 0 corresponds to black, regardless of hue or saturation). There are several ways to modify the current color. First, try pressing any mouse button while the cursor is over one of the color bars. The length of the bar, and the current color, will be modified to reflect the mouse position. The color map in the display is also changed, so the colors will change everywhere on the screen that the current color is displayed. Color 0, which you should currently be editing, is the back- ground color. You can also modify the current color by pressing a button while the cur- sor is over one of the ‘‘color pumps’’ next to the bars. If you button a pump with ‘‘+’’ in it, the value of the bar next to it will be incremented slightly, and if you button the ‘‘-’’ pump, the bar will be decremented slightly. The left button causes a change of about 1% in the value of the bar, and the right button will pump the bar up or down by about 5%. Try adjusting the bars by buttoning the bars and the pumps. If you press a button while the cursor is over the current color box at the top of the window, one of two things will happen. In either case, nothing happens until you release the button. Before releasing the button, move the cursor so it is over a different color somewhere on the screen. If you pressed the left button, then when the button is released the color underneath the cursor becomes the new current color, and all future editing operations will affect this color. Try using this feature to modify the color used for win- dow borders. If you pressed the right button, then when the button is released the value of the current color is copied from whatever color is present underneath the cursor. There are only a few commands you can type in color windows, aside from those that are valid in all windows. The command :color [number] will change the current color to number. If no number is given, this command will print out the current color and its red, green, and blue intensities. The command :save [techStyle displayStyle monitorType] will save the current color map in a file named techStyle.displayStyle.monitorType.cmap, where techStyle is the type of technology (e.g., mos), displayStyle is the kind of display specified by a styletype in the style section of a technology file (e.g., 7bit), and monitor- Type is the type of the current monitor (e.g., std). If no arguments are given, the current technology style, display style, and monitor type are used. The command :load [techStyle displayStyle monitorType] - 6 - Magic Tutorial #5: Multiple Windows September 19, 1990 will load the color map from the file named techStyle.displayStyle.monitorType.cmap as above. If no arguments are given, the current technology style, display style, and moni- tor type are used. When loading color maps, Magic looks first in the current directory, then in the system library. - 7 -
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved