HomeProjectsPeoplePublicatons
Search:
   
 

Module Design Manifesto

last modified 5/23/00

This page describes the limitations we place on Cadence schematics and layout for modules in order to ease the development of a "push-button" design flow. There have been many changes recently, so for convenience, here's a link to the old module design manifesto.


Topics:

Naming Restrictions

Many CAD tools place restrictions on names, making it rather difficult to translate design data between tools. In order to make sure that your designs can be used by as many CAD tools as possible, all libraries, cells, ports, pins, nets, instances, modules, etc. should adhere to the following naming restrictions:

  1. Names must be 1 to 255 characters in length (preferably 5 or fewer characters).
  2. Names must begin with a letter of the alphabet.
  3. Names can contain letters, digits, and the underscore character "_". No other characters should be used.
  4. Names must be treated as case-sensitive.
  5. Names must be unique within their scope, even if a tool treats them as case-insensitive. For example, a library should not contain two cells named "adder12" and "Adder12".
  6. Single-Indexed names are allowed for pins and nets only, using the angle-brackets "< >".  For example "in<0>" and "in<1>" are allowed, but not "in<0><1>".

Basic Module Requirements

Our modules should adhere to the following basic requirements:

  1. Include symbol, and schematic views.
  2. Have port names names which are consistent between all three views.
  3. Be targeted for one or more of the following three possible "back end styles":
    • Hard - the generator produces a layout view
    • Soft - the generated schematic view contains cells which adhere to the back-end standards for standard cell place & route.
    • Firm - the generator produces an autoLayout view with placement information.  As with the soft-style, the schematic and autoLayout views must contain only cells which adhere to the back-end standards.
  4. For the hard & firm back-end styles, schematic and layout/autoLayout views must have consistent hierarchies. For example, if a cell's layout view contains an instance of the NAND2 cell's layout, then the schematic view should contain an instance of the NAND2 cell's symbol. (This is not as obvious a requirement as it may seem). This requirement may be relaxed for the case of routing cells i.e. cells which contain only wires need not have corresponding schematic and symbol views.

If modules do not meet these requirements, then they will NOT BE USED!


Schematic Limitations

Basically, we limit ourselves to the same style as the CORELIB standard cell library. This translates to the following restrictions:

  1. Schematics for the lowest level of hierarchy should be called cmos_sch and contain elements from the following list only:
  2. Library Cell Description
    STlib ipin Input pin
    STlib opin Output pin
    STlib vdd Positive supply rail
    STlib gnd Negative supply rail
    devices_symbols nmos 3-terminal NMOSfet
    devices_symbols nmos4 4-terminal NMOSfet
    devices_symbols pmos 3-terminal PMOSfet
    devices_symbols pmos4 4-terminal PMOSfet
    devices_symbols dn N-diffusion, P-well diode
    devices_symbols dp P-diffusion, N-well diode
  3. Schematics for higher levels of hierarchy should be called schematic and contain no elements from the preceding list, or any other elements from the devices_symbols or STlib libraries. If you decide that you need include a basic element in a higher-level schematic, then see me. We need to decide on a good way to handle this special case.

Layout Limitations

Allowed Layers & Devices

As with schematics, these limitations are based on the CORELIB standard cell library. These limitations will be updated as we learn more about our router.

  1. Layout should not contain pcells (we may change this later)
  2. Layout should not contain polygons from the via layers ("contact", "v1", "v2", etc.). Rather, symbolic vias should be created with the Create -> Contact... command.
  3. Layout should use as few metal layers as possible. This conserves routing resources for later.  Use m1-3, or m1-2, if possible.
  4. Cells should be surrounded by a rectangle in the "prBoundary" "drawing" layer. This rectangle must enclose all metalization, poly-silicon, and active areas. Wells and diffusions may overlap the boundary.
  5. Pins should be created with the "pin" purpose.
  6. Pin names should be created with the "pintext" purpose.
  7. Layers from the following list only should be used in layout:
  8. Layer - Purpose Layer - Purpose Layer - Purpose
    nwell - drawing pplus - drawing active - drawing
    poly - drawing prBoundary - drawing  
    metal1 - drawing metal1 - pin metal1 - pintext
    metal2 - drawing metal2 - pin metal2 - pintext
    metal3 - drawing metal3 - pin metal3 - pintext
    metal4 - drawing metal4 - pin metal4 - pintext
    metal5 - drawing metal5 - pin metal5 - pintext
    metal6 - drawing metal6 - pin metal6 - pintext

    Let me know if we need to add layers to this list.  Also remember that metals 4,5, & 6 should be strongly avoided, even though they are mentioned in this list.


Signal Pin Requirements

Signal pins have slightly different requirements, depending on whether they are flush with the prBoundary or on the interior of the cell.  All pins, however, must adhere to the following requirements:

     

  1. The metal around a pin must contain no "jogs" within the minimum metal spacing distance of the pin.
    rule_jog.gif (11547 bytes) 
    Metal Layer Min Space (um) Metal Layer Min Space (um) Metal Layer Min Space (um)
    metal1 0.4 metal3 0.4 metal5 1.0
    metal2 0.4 metal4 0.4 metal6 1.8
  2. The pin must cover the entire width of the metal trace.
    rule_width.gif (9644 bytes)
  3. Boundary Pins (pins which are flush with the prBoundary)
    A. do not have to be square
    B. can be in any metal layer
    C. must have length and width greater than or equal to the minimum metal width. 
    Metal Layer Min Width (um) Metal Layer Min Width (um) Metal Layer Min Width (um)
    metal1 0.4 metal3 0.4 metal5 1.0
    metal2 0.4 metal4 0.4 metal6 1.0
  4. Interior Pins (pins which are not flush with the prBoundary)
    A. must be square
    B. must be in the highest metal layer used by the module
    C. must have length and width equal to the symbolic contact dimension for that layer 
    Metal Layer Contact Dim. (um) Metal Layer Contact Dim. (um) Metal Layer Contact Dim. (um)
    metal1 0.5 metal3 0.6 metal5 1.0
    metal2 0.6 metal4 0.6 metal6 1.0



Power Pin Requirements

  1. should be called vdd! and gnd! (NOTE: all lower case)
  2. must be in the highest metal layer used by the module
  3. must span the longer dimension of the module
    rule_pwr.gif (4287 bytes)
  4. Since connections to power pins will be made by vias from higher metal layers, they must have a width greater than or equal to the symbolic contact dimension (as with Interior Pins, above).

Bitsliced/Datapath Module Conventions

The following are suggestions, not requirements:

  1. Inputs should be named with letters from the beginning of the alphabet (a,b,c...)
  2. Outputs should be named with letters from the end of the alphabet (z,y,x...)
  3. Pins should be annotated with "r" or "i" for real and imaginary values.
  4. Inputs should be on the top of the module, with outputs on the bottom and control signals on the sides.
  5. Bit 0 (LSB) should be the right-most I/O pins, and the highest bit (MSB) should be to the left.
  6. Real and imaginary bits should be interleaved, beginning with real, from right to left

The following picture illustrates these conventions.  Bear in mind that these pin naming conventions are suggestions.  These pin names must ultimately be the same as their Simulink counterparts.
rule_bitslice.gif (3161 bytes)


Module Generator Format

Format Specifications

  1. Choose a name for the module. This name should adhere to the naming restrictions as described in this manifesto.
  2. The leafcells for the module should be placed in a Cadence library located in the directory /tools/designs/SCR1/modules/dfII.  The name of this library should be [initials]Lib.  For example, Ryan H. Tu's library is called rhtLib.
  3. The code for the entire module generator should be in one file called generate[module name].il which should be placed in the directory /tools/designs/SCR1/modules/skill.   This file should contain a header which specifies
    • the module name
    • your name & the date
    • descriptions of the parameters
    • dependencies, including SKILL files which must be loaded, names of libraries containing leaf-cells, and the leaf-cell names.
  4. The top level generator function should be called bjcGenerate[module name]
  5. The first parameter to the generator function should be a string which specifies the destination library for the module.
  6. All remaining parameters should be keyed (using the @key directive in SKILL)
  7. All module generators are required to include the following parameters:
    • cellname - a string containing the name of the top-level cell.   The default should be nil, indicating that the module generator should create a unique name
    • backEndStyle - a string containing the value "Hard", "Soft", or "Firm" depending on the desired back-end style (as described in the Basic Module Requirements).
    • logfile - a string containing the name of a file for printing log messages.  The default should be nil, indicating that log messages will be printed to stdout.  This parameter is used by the logf() function described below.
    • loglevel - the relative number of log messages to print.  If loglevel is 0, only fatal error messages should be printed.  Larger numbers mean that more messages  are printed.  This parameter can have any default value.  It is used by the logf() function described below.
    • logindent - the number of tab "\t" characters to print in front of every log message.  This parameter is also used by the logf() function.  It should have a default value of zero.
  8. All numerical input port dimensions must be specified by a "fixed point port descriptor" parameter.  The format of these descriptors is based on the syntax of the Simulink Fixed Point types sfrac and ufrac. The module generators must sign-extend or zero-fill the high- and low-order input bits as necessary to line-up the various inputs.  It is NOT necessary that every possible combination of fixed point input port descriptors be supported by the module generators.  However, it IS necessary that all combinations are accepted and that informative error messages are printed when an unsupported case arises.  The descriptor will be a SKILL list with the following elements:
    list( IsSigned MantBits GuardBits )
    • IsSigned (integer) - 1 if the port is a signed number, 0 if not
    • MantBits (integer) - the bit width (mantissa bits) of the port
    • GuardBits (integer) - the number of bits which represent a whole number i.e. the number of bits to the left of the decimal point, not including the sign bit.
  9. All numerical output port dimensions must also be specified by a "fixed point port descriptor" parameter.  These descriptors are similar to input port descriptors except that they also specify  what to do in the case of truncation of the high- and low-order bits in the result.  The module generators must also sign-extend or zero-fill the output as necessary when high- and low-order bits are added to the result.   Again, not every combination of input and output port descriptors needs to be supported, but informative error messages must be printed when an unsupported case arises.   The descriptor will be a SKILL list with the following elements:
    list( IsSigned MantBits GuardBits RoundTowards Saturate )
    • IsSigned, MantBits, GuardBits - as for the fixed point input port descriptor
    • RoundTowards (string) - specifies what to do if low-order result bits are truncated.  Possible values are "Floor", "Nearest", "Zero", and "Ceiling".
    • Saturate (integer) - specifies what to do if high-order result bits are truncated.  This parameter will be 1 if the result is to saturate at the maximum/minimum value, or 0 if the result is to overflow (no saturation)
  10. Any number of other parameters may be added to the module generator call, as needed.
  11. The generator function should return the name of the top-level cell as a string.   The function should return nil if the module generation was not successful.
  12. The generator must create layout, schematic, and symbol views.
  13. The top-level symbol for the module may not contain any port arrays.  For example, a port named "A<5:0>" would have to be split into the ports "A<5>" "A<4>" ... "A<0>".  It is still acceptable for the top-level schematic and lower-level symbols/schematics to contain pin arrays
  14. If the generator creates any subcells, these subcell names must be unique so that all module generators can be run with the same target library.  The general format of these subcell names should be gen_[module name]_[parameters] where [parameters] is a list of parameters separated by underscores, using the same order used by the bjcGenerate[module name] function.

Skill Function Calls

We support a set of SKILL function calls to make module generation easier. These function calls are implemented in the file "def.il" which is loaded automatically.

Right now, only these function calls are supported:

  • addCell( inCell outCell direction rotation ?xOffset xOverlap ?yOffset yOverlap ?pinInfo pinInfoList)
  • - Adds a leafcell layout to the destination cellview, placing it either to the right or on top, using the prBoundary polygons to determine how cells should be stacked.
    - Returns t on success, nil on failure

    • outCell - the destination cellview, opened with dbOpenCellViewByType
    • inCell - the leafcell to add, also opened with dbOpenCellViewByType
    • direction - either "RIGHT" or "UP"
    • rotation - specifies the rotation of the leafcell
      • "R0" - no rotation
      • "R90" - 90 degree rotation
      • "R180" - 180 degree rotation
      • "R270" - 270 degree rotation
      • "MY" - mirrored along the y-axis
      • "MX" - mirrored along the x-axis
    • ?xOffset xOverlap - specifies the overlap of prBoundary layer in the x direction by amount of  xOverlap (if not included, assumes zero)
    • ?yOffset yOverlap - specifies the overlap of prBoundary layer in the y direction by amount of  yOverlap (if not included, assumes zero)
    • ?pinInfo pinInfoList - specifies the pin information to bring to the next hierarchy and follows the format:
    •   (("old_name" "new_name" index_value "SIDE") (next pin info) ...)

      • old_name (required) -  original name of the pin of the cell added
      • new_name (not required) - new name that will replace the original in the higher level hierarchy
      • index_value (not required) - index that will be given to the new name
      • SIDE (not required) - tells which side (RIGHT, LEFT, TOP, BOTTOM) of the cell to look for the pin to add, if left blank all pins with old_name will be promoted to the next hierarchy level

      examples:

?pinInfo list('("gnd!") '("vdd!" "vdd2!") list("busPin" "din" data_count "RIGHT") list("cin<2>" "cout" 3))

list( ) - creates a list from the contents in the parentheses but evaluates the variables and equations inside first

list("datain" "dataout" 1+4 sideVar) -> ("datain" "dataout" 5 "TOP")

'( ) - creates a list from the contents but uses the contents literally and doesn't evaluate variables and equations

'("datain" "dataout" 1+4 sideVar) -> ("datain" "dataout" 1+4 sideVar)

'("gnd!") - takes all pins with the name gnd! in inCell and adds them to outCell

'("vdd!" "vdd2!") - takes all pins with the name vdd! in inCell and adds them to outCell with the name vdd2!

list("busPin" "din" data_count "RIGHT") - takes pins named busPin on the right side of  inCell and adds them to outCell with the name din<data_count> (in a case like this data_count would be a number from a for loop or something similar)

list("cin<2>" "cout" 3) - takes pins named cin<2> in inCell and adds them to outCell with the name cout<3>

 

  • addSch( inSymbol outSchematic pinToNetConnectionList instName)
  • - Adds a leafcell symbol to the destination cellview schematic, placing symbols progressively higher on the right side of the origin.  It also adds net connections to the pins listed.
    - Returns t on success, nil on failure

    • outSchematic - the destination schematic, opened with dbOpenCellViewByType
    • inSymbol - the symbol to add, also opened with dbOpenCellViewByType
    • pinToNetConnectionList - list that specifies the what pins on the symbol added should be connected to in the schematic and follows the format:
    •   (("symbol_pin_name" "schematic_net_name") (next pin/net info) ...)

      • symbol_pin_name -  name of the pin of the cell added
      • schematic_net_name - net name that will connect the symbol's pin to the schematic

      examples:

      list('("bit" "bit<0>") list("word" word_name)) - takes pin "bit" and connects a net "bit<0>" to it in the schematic, "word" is connect to what the string variable "word_name" represents

    • instName - a string specifying the name of the symbol instance.   If this parameter is omitted or set to nil, a unique name will be chosen for the instance
  • addPins( outSchematic pinList)
  • - Adds pins to a schematic.
    - Returns t on success, nil on failure

    • outSchematic - the destination schematic, opened with dbOpenCellViewByType
    • pinList - list that specifies the pins to add to the schematic and follows the format:
    •   (("pin_name" "direction") (next pin info) ...)

      • pin_name -  name of the pin to be added
      • direction - direction that the pin will be (input, output, or inputOuput)

      examples:

      list('("bit<1:0>" "inputOutput") list(word_name "input")) - places pin "bit<1:0>" as an "inputOutput" and string variable "word_name" pin as input in the schematic

       

  • createSymbol( libName cellName pinList)
  • - Creates a symbol for a cell.
    - Returns t on success, nil on failure

    • libName - the library name where the symbol is to be located
    • cellName - the cell name for the symbol
    • pinList - list that specifies the pins to appear in the symbol ( identical to the pinList for the addPins function described above)

 

  • inCellData = cellInfo( inCell rotation)
  • - Obtains information about the layout's prBoundary.

    • inCell - the layout to gleam information from, opened with dbOpenCellViewByType
    • rotation - specifies how the layout is to be rotated before the information is retrieved
    • inCellData - returned data from the function, structure with the following properties
      • BX - lowest "X" coordinate of the prBoundary bounding box or 0 if does not exist
      • BY - lowest "Y" coordinate of the prBoundary bounding box or 0 if does not exist
      • TX - highest "X" coordinate of the prBoundary bounding box or 0 if does not exist
      • TY - highest "Y" coordinate of the prBoundary bounding box or 0 if does not exist
      • Width - equals TX - BX
      • Height - equals TY - BY

      examples:

      bitCellData = (cellInfo bitCell_l "R0)

      bitCellData~>BX (equals say... 0.5)

      bitCellData~>TX (equals say... 1.5)

      bitCellData~>Width (equals say... 1)

      note, this function is useful to allow the amount of overlap for the ?xOverlap or ?yOverlap in addCell to be dependant on the cellview added (in other words, not hard coded by the skill programmer)

 

  • logopen()
    - Opens the logfile (specified in the variable logfile) for writing and stores the file descriptor in the variable logport.  Also sets the logprefix variable to a string of tab characters, depending on the logindent variable.
  • logclose()
    - Closes the logfile specified in the logport variable.
  • logf( level format arg1 arg2 ... )
    - As with printf, prints the format string and arguments to the logfile specified by the logport variable, only if the value of loglevel is greater than or equal to the value of level.

Example Generators

  • generateTest.il - a general case which shows an example header, function call/parameters, and use of the logging functions but doesn't produce any cell views.  You can find it in /tools/designs/SCR1/modules/skill/.

Pin Ambiguities regarding Clocking

Module pin names must be consistent between layout/schematic and Simulink views.   Unfortunately, since Simulink has abstracted away the clock, we can't maintain complete consistency in pin names.  The exceptions are detailed here.

  1. clk, clkb - All modules which have "state" (i.e. registers, modules with embedded registers) in Simulink will need to have a clock input, even though no clock input appears on the Simulink symbol.  The form of these clock inputs will be determined by the up-and-comming Clocking Methodology Page.
  2. enable, enableb - Positive and negative enable signals on Simulink blocks will become gated clocks in the final layout.  Because of the dangers associated with using gated clocks, these signals will be handled by a centralized clock generator and not in the individual modules.  Thus, module designers should ignore pins named "enable" and "enableb".
  3. set, setb, reset, resetb - Set and reset signals can be either synchronous or asynchronous.  In order for a module to accurately model Simulink behavior, sets and resets must be synchronous.  But asynchronous sets and resets can lead to smaller, lower-power logic.  Thus, these signals will be sent through a centralized synchronizer block similar to the one used for gated clocks.  For the module designer, this means that pins named "set", "setb", "reset", and "resetb" should be assumed asynchronous.

maintained by Rhett Davis
wrdavis@eecs.berkeley.edu