File: ~cs552-2/public/UsefulFiles/mentorOverview * Designs/Components/Sheets/Symbols/Interfaces -------------------------------------------------------------------------------- A component is a collection of sheets whereas a symbol is an abstraction of component. An interface is a map between a symbol and a component, that is it describes the correspodence between the ports of the symbol and the component. Ofcourse a component can include another one and this helps in creating a hierachical structure. Finaly a design is a collection of components with connections between them. Let's see at an example: Say we want to create a 4-by-1 multiplexor. To do this we are going first to create a 2-to-1 multiplexor. This is by itself a component. So we choose File>Open sheet. Let's name our component as "mux2to1". To do so we append this to the path that appears in the component box. Note that with our set up this path should point to your ~/mentor directory. We have also set "$PROJ_PARTS_namehere" to point there too. So we can also type in "$PROJ_PARTS_namehere/mux2to1". We can also change the value of the "Sheet" box to something more meaningful although this is not necessary; "sheet1" will do fine. We draw the mux2to1 and save it. Then we can create a symbol for it using "Misc>Create Symbol". We have to check, save and then check again this so that Mentor will create the appropriate interface. This will create a symbol named "mux2by1". It is important to note that the 4-to-1 mux is a separate component although it uses a 2-to-1 mux. So to create it first open a new component. If we didn't do this then we are just adding a sheet to component "mux2to1". Use FIle>open and now enter the mux4to1 name into the component box. To place instances of the 2-to-1 mux just click on the "Choose Symbol" button of the session window. Ofcourse we need two 3-to-1 multiplexors. The hierarchy we created look as follows: mux4to1 / | \ / | \ / | \ mux2to1 mux2to1 mux2to1 A final note of caution: a component cannot be referenced from itself! So even if you have to seperate sheets that belong to the same component and create a symbol using only one of them you CANNOT reference the symbol from the second sheet. Mentor will complain saying that this will be recursive. * Location Maps Mentor applications use a special text file called a "location map" to determine the location in the filesystem of libraries and other components that may need. These location maps allow symbolic name, like for example the "PROJ_PARTS_YourAccountNameHere" in your .location file, to be used in place of full pathnames (eg. ~yourHomeDir/mentor). In Mentor's terminology these are called "soft prefixes" and "hard pathnames" respectively. You can come up with your own soft prefixes and enter the corresponding hard pathnames in your .location file. If you do this, you can move your designs around without worrying about the actual physical location of the design on the disk. * Properties DA component symbols and schematic objects (wires, component instances, etc.) can have information attached to them in the form of properties. Properties are used by DA and other applications (like QS) and indicate information about the diesign beyond that of the logical structure of the schematic. Properties are used to indicate the delay through a gate, for instance, or the name of a wire. Properties are "Owned" by the object they are attached to. An object can own many different properties. Properties themselves are composed of a NAME, a VALUE and a TYPE. For example, the text "NET" on a newly created "portin" component - which you later change to a meaningful name using Properties>Change Text Values.. - is an example of a property. Say you change the text from "NET" to "clock". The name of this property happens to be "NET", the value is "clock" and the type is "string". The fact that the value of the NET property was "NET" before you changed it is incidental. By default, most objects do not have any properties that aren't needed for normal operation. For instance, wires normaly do not have a NET property attached to them; DA and QS refer to nets not connects to a portin or portout symbol by automatically generated symbolic names unless you add a NET property with a value that means something to you. * Component symbols A schematic sheet can have a symbol associated with it. This symbol would be used in other schematics when you wish to include the functionality of the first schematic in that schematic. A symbol can be automatically generated from a schematic by choosing Miscallaneous>Create Symbol while your schematic window is active in DA. This symbol then represents the schematic "underneath" it. Portin's and portout's become pins on the symbol, which are indicated by the purple diamonds on the symbol. If you check a symbol before saving it, you will get an error message indicating that "the pins are not in the interface". This means that there is no interface for the part. An interface is a description of what portin's and portout's are on the schematic sheets, what pins are on the symbol and what is the correspodence between them. In our example saving the SYMBOL will automatically create a new interface and a subsequent check will indicate no error. Note that if you change the schematic you'll have to update the symbol as well. Choose Miscellaneous>Create Symbol to do so. While the symbol is on your screen, it is a good idea to attach a COMP property to the outline. The value of this property should be something that describes what the part does. The comp property will appear near to any instance of this symbol. After creating a symbol, be sure to check it, save it, and check it again! To add one of your one symbols to a schematic return to the main schematic palette and choose "Choose Symbol". You will get a navigator window, which you can use to find your component and select ADD. * Buses A Bus is a collection of wires. The width of a bus is the number of its wires. Bus widths are specified in DA by assigning a NET property value of the form "NAME(X:Y)" to a Bus, where "NAME" is the name of the BUS. Note also thta X must be greater that Y and usualy Y is set to 0. For example "In(3:0)" describes a BUS named "In" that has 4 wires. To draw a BUS select the ADD>Bus option. Drawing it is similar to drawing a wire. While in DA use this option to draw a vertical bus. Place a AND gate to its right and 2 portin's to its left. In order to gain access to the individual wires of the bus you have to use a component from "gen_lib" called "bus ripper" AKA "rip". Fortunately Mentor places instances of this component when you draw a wire to a bus. So choose Add>Wire to connect the 2 inputs of the AND and the 2 portins to your Bus. After doing it you should notice the magenta R's that appear near each "rip". Changing these to numbers specifies which wire of the bus is being accessed through the rip. Be sure to add a name to the bus... Finaly there are also parts to access more than one bits at a time (look at "rip8x1"). --- ACK --- Again this originates from a handout by Rob Pfile.