;;; PCell Designer File (format version 2.2)

;;; File-out of the PCell Designer pcell "NmosDemo26"/"seriesMOS"/"schematic"

(pcdPcell

;; Mixins
?mixins
nil

;; Create CDF?
?createCDF
t

;; Reference cell for CDF
?referenceCDF
nil

;; Main points
?mainPoints
nil

;; Initial size
?initSize
nil

;; Device Variables
?devVars
nil

;; Device Variables visible to the commands
?guiVisibleDevVarNames
nil

;; Methods used as commands
?methodCommands
nil

;; PCell and CDF Parameters
?classEditorChanges
((nil
  units "lengthMetric"
  strict nil
  nature both
  name "w"
  type number
  value "1u")
 (nil
  units "lengthMetric"
  strict nil
  nature both
  name "l"
  type number
  value "1u")
 (nil
  strict nil
  nature both
  name "sfactor"
  type number
  value "1")
 (nil
  prompt "Overrides"
  nature both
  name "overrides"
  type edits
  value "")
 )

;; Simulation Information
?simulation
(simulation)

;; Source Cell View
?sourceCellView
("NmosDemo26" "seriesMOS" "schematic")

;; Last Edited with PCell Designer Version
?pcdVersion
"2-6-0"

;; Method definitions
?methods
(
  (method command draw
    body (
    (schematic\ pin 
      name (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created pins, if any.")
      turtle (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      source (geo (geo expression (pt (evalstring "0.8125:-1.0")) type "Expression" points ((0.8125 -1.0))) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The reference points of the pins to create.")
      pin_name (string "D" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The name of the pin to create")
      direction (enumeration inputOutput ?choices (input inputOutput jumper output switch unused powerInput powerOutput bidir tristate) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      usage (enumeration schematic ?choices (schematic offSheet) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      signal_type (enumeration signal ?choices (signal ground power clock analog tieOff tieHi tieLo scan reset optical singleModeOptical multiModeOptical) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      master (pin_master ("\"basic\"" "\"iopin\"" "\"symbolr\"") ?valuep t ?requiredp t ?isExpression t ?keyword t)
      rotation (flip_rotate "R0" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The flip and/or rotation. Repeatedly pressing the flip/rotate buttons in the editor will add the appropriate action to this parameter, just like their equivalent buttons in the Virtuoso layout editor."))
    (schematic\ pin 
      name (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created pins, if any.")
      turtle (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      source (geo (geo type "Points" points ((0.25 -1.0))) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The reference points of the pins to create.")
      pin_name (string "G" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The name of the pin to create")
      direction (enumeration inputOutput ?choices (input inputOutput jumper output switch unused powerInput powerOutput bidir tristate) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      usage (enumeration schematic ?choices (schematic offSheet) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      signal_type (enumeration signal ?choices (signal ground power clock analog tieOff tieHi tieLo scan reset optical singleModeOptical multiModeOptical) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      master (pin_master ("\"basic\"" "\"iopin\"" "\"symbolr\"") ?valuep t ?requiredp t ?isExpression t ?keyword t)
      rotation (flip_rotate "R0" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The flip and/or rotation. Repeatedly pressing the flip/rotate buttons in the editor will add the appropriate action to this parameter, just like their equivalent buttons in the Virtuoso layout editor."))
    (schematic\ pin 
      name (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created pins, if any.")
      turtle (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      source (geo (geo type "Points" points ((1.625 -1.0))) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The reference points of the pins to create.")
      pin_name (string "B" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The name of the pin to create")
      direction (enumeration inputOutput ?choices (input inputOutput jumper output switch unused powerInput powerOutput bidir tristate) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      usage (enumeration schematic ?choices (schematic offSheet) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      signal_type (enumeration signal ?choices (signal ground power clock analog tieOff tieHi tieLo scan reset optical singleModeOptical multiModeOptical) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
      master (pin_master ("\"basic\"" "\"iopin\"" "\"symbolr\"") ?valuep t ?requiredp t ?isExpression t ?keyword t)
      rotation (flip_rotate "R0" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The flip and/or rotation. Repeatedly pressing the flip/rotate buttons in the editor will add the appropriate action to this parameter, just like their equivalent buttons in the Virtuoso layout editor."))
    (wire 
      name (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created wires, if any.")
      turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The final turtle")
      location (geo (geo location ("" "D") type "Location" points nil group nil name nil net nil expression nil) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The starting point for the wire.")
      net_name (string "" ?valuep nil ?requiredp nil ?isExpression nil ?keyword t ?help "If given, the name of the net for the created wire.")
      width (float "0" ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "If 0, wire will be drawn as a line. Otherwise, the path width of the wire.")
      body 
      (body (
        (advance 
          turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          spacing (float "0.0625" ?valuep t ?requiredp t ?isExpression t ?keyword t)
          steps (int "4" ?valuep t ?requiredp t ?isExpression t ?keyword t)
          pen (turtle_pen default ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          grid (boolean nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "if checked, the turtle is moved to grid points only"))
        (turn 
          turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          direction (leftright "left" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          degrees (int "90" ?valuep t ?requiredp t ?isExpression t ?keyword t))
        (advance 
          turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          spacing (float "0.0625" ?valuep t ?requiredp t ?isExpression t ?keyword t)
          steps (int "4" ?valuep t ?requiredp t ?isExpression t ?keyword t)
          pen (turtle_pen default ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          grid (boolean nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "if checked, the turtle is moved to grid points only"))
        (repeat 
          count_variable (binding "" ?valuep nil ?requiredp nil ?isExpression nil ?keyword t ?help "If given, this name will be visible during execution of the body, with values counting up from 0.")
          repeat (int "sfactor" ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "Number of times to execute the body.")
          body 
          (body (
            (place\ symbol 
              name (lvalue "current" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created instance, if any.")
              turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
              master (master ("\"gpdk045\"" "\"pmos1v\"" "\"symbol\"") ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The PCell master or standard cell view to make an instance of.")
              rotation (flip_rotate "R0" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The initial orientation of the instance, before it is aligned")
              inst_name (string "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The instance name. If ommitted, the instances will be named automatically.")
              pin_name (pin_name "D" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The pin name to align with the turtle")
              user_edits (sexp "" ?valuep t ?requiredp t ?isExpression t ?keyword t)
              param_whitelist (sexp "" ?valuep nil ?requiredp nil ?isExpression t ?keyword t)
              param_blacklist (sexp "" ?valuep nil ?requiredp nil ?isExpression t ?keyword t)
              edit_master (boolean nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
              edit_transform (boolean t ?valuep t ?requiredp t ?isExpression nil ?keyword t)
              edits (edit_cdf (((pcdCdfInstParam ?name "l" ?prompt "Length" ?paramType "string" ?defValue "45n" ?display "t" ?callback "gpdk045_mosCB( 'l )" ?use nil ?parseAsCEL t ?parseAsNumber t ?editable "gpdk045_mosEditable( 'l )" ?units "lengthMetric" ?choices nil ?value "1u") "\"pPar(\\\"l\\\")\"" "meters" nil) ((pcdCdfInstParam ?name "w" ?prompt "Total Width" ?paramType "string" ?defValue "120n" ?display "t" ?callback "gpdk045_mosCB( 'w )" ?use nil ?parseAsCEL t ?parseAsNumber t ?editable "gpdk045_mosEditable( 'w )" ?units "lengthMetric" ?choices nil ?value "1u") "\"pPar(\\\"w\\\")\"" "meters" t)) ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "Edits to make to the symbol, via its CDF interface." ?lastSeenCell ("basic" "iopin") ?selectedCell nil))
            (wire 
              name (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created wires, if any.")
              turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The final turtle")
              location (geo (geo type "Location" location ("current" "G")) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The starting point for the wire.")
              net_name (string "" ?valuep nil ?requiredp nil ?isExpression nil ?keyword t ?help "If given, the name of the net for the created wire.")
              width (float "0" ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "If 0, wire will be drawn as a line. Otherwise, the path width of the wire.")
              body 
              (body (
                (advance\ to\ intersect 
                  turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
                  target (geo (geo type "Location" location ("" "G")) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t)
                  advance (enumeration "advance, turn, target" ?choices ("advance, turn, target" "advance, turn" "advance") ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
                  pen (turtle_pen default ?valuep t ?requiredp t ?isExpression nil ?keyword t))
                )
                ?valuep t
                ?requiredp t
                ?isExpression t
                ?keyword t
              ))
            (wire 
              name (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created wires, if any.")
              turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The final turtle")
              location (geo (geo type "Location" location ("current" "B")) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The starting point for the wire.")
              net_name (string "" ?valuep nil ?requiredp nil ?isExpression nil ?keyword t ?help "If given, the name of the net for the created wire.")
              width (float "0" ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "If 0, wire will be drawn as a line. Otherwise, the path width of the wire.")
              body 
              (body (
                (advance\ to\ intersect 
                  turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
                  target (geo (geo type "Location" location ("" "B")) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t)
                  advance (enumeration "advance, turn, target" ?choices ("advance, turn, target" "advance, turn" "advance") ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
                  pen (turtle_pen default ?valuep t ?requiredp t ?isExpression nil ?keyword t))
                )
                ?valuep t
                ?requiredp t
                ?isExpression t
                ?keyword t
              ))
            (set\ position 
              source (geo (geo location ("current" "S") type "Location" points nil group nil name nil expression nil) ?lazyp nil ?valuep t ?requiredp t ?isExpression t ?keyword t ?help "The new reference point. If no geometry is given, the turtle is not modified.")
              set_x (boolean "t" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "If true, change the X-value of the turtle's position. If false, the turtle will only move vertically.")
              set_y (boolean "t" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "If true, change the Y-value of the turtle's position. If false, the turtle will only move horizontally.")
              pen (turtle_pen up ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "Controls the state of the pen during the move."))
            (advance 
              turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
              spacing (float "0.0625" ?valuep t ?requiredp t ?isExpression t ?keyword t)
              steps (int "4" ?valuep t ?requiredp t ?isExpression t ?keyword t)
              pen (turtle_pen default ?valuep t ?requiredp t ?isExpression nil ?keyword t)
              grid (boolean nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "if checked, the turtle is moved to grid points only"))
            )
            ?valuep t
            ?requiredp t
            ?isExpression t
            ?keyword t
          ))
        (turn 
          turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          direction (leftright "left" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          degrees (int "90" ?valuep t ?requiredp t ?isExpression t ?keyword t))
        (advance 
          turtle (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          spacing (float 0.0625 ?valuep t ?requiredp t ?isExpression t ?keyword t)
          steps (int "4" ?valuep t ?requiredp t ?isExpression t ?keyword t)
          pen (turtle_pen t ?valuep nil ?requiredp t ?isExpression t ?keyword t)
          grid (boolean nil ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "if checked, the turtle is moved to grid points only"))
        (place\ pin 
          name (lvalue "" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The created pin, if any.")
          turtle (lvalue nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          pin_name (string "S" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The name of the pin to create")
          direction (enumeration inputOutput ?choices (input inputOutput jumper output switch unused powerInput powerOutput bidir tristate) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          usage (enumeration schematic ?choices (schematic offSheet) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          signal_type (enumeration signal ?choices (signal ground power clock analog tieOff tieHi tieLo scan reset optical singleModeOptical multiModeOptical) ?allowOther nil ?valuep t ?requiredp t ?isExpression nil ?keyword t)
          master (pin_master ("\"basic\"" "\"iopin\"" "\"symbolr\"") ?valuep t ?requiredp t ?isExpression t ?keyword t)
          rotation (flip_rotate "R0" ?valuep t ?requiredp t ?isExpression nil ?keyword t ?help "The initial orientation of the pin, before it is aligned."))
        )
        ?valuep t
        ?requiredp t
        ?isExpression t
        ?keyword t
      ))
    
    ))
    )

;; Imported local (Skill++) definitions
?importedCode
nil

;; Saved state of the GUI
?guiData
(nil
 selectedCommands nil
 activeTab "draw"
 openTabs ("draw")
 commandPaletteSelection nil
 commandPalette (nil
                 Add_wire t
                 App\ Cells t
                 Control\ Flow t
                 Connectivity nil
                 Add t))

;; Serialized instances
?instances
(
 (nil info ("inst" nil nil nil nil nil (0.0 0.0) "R0" 1 
            (("_pcdHibernateData" "string" "")
             ("_pcdHibernateState" "string" "")
             ("l" "string" "200.0n")
             ("overrides" "string" "()")
             ("sfactor" "string" "5")
             ("w" "string" "1.5u"))))
)

)
