Exemple #1
0
def p_root(p):
    """
        root    :   declarations    design_spec  root
                |   empty
    """
    if (len(p) == 4):
        p[0] = DEF(DEF.declarations(p[1]), p[2])
Exemple #2
0
def p_component_info(p):
    """
        component_info  :   PLUS   PLACED  xandy    VARNAME component_info
                        |   SEMICOLON
    """
    if (len(p)  ==  6):
        p[0]    =   (DEF.placement(p[3], p[4]), p[5])
Exemple #3
0
def p_gcellgrid_specs(p):
    """
        gcellgrid_specs :   GCELLGRID VARNAME INT DO INT STEP INT SEMICOLON gcellgrid_specs
                        |   empty
    """
    if (len(p) == 10):
        p[0] = (DEF.gcellgrid(p[2], p[3], p[5], p[7]), p[9]);
Exemple #4
0
def p_tracks_specs(p):
    """
        tracks_specs    :   TRACKS VARNAME INT DO INT STEP INT LAYER METAL_ID SEMICOLON tracks_specs
                        |   empty
    """
    if (len(p) == 12):
        p[0] = (DEF.track(p[2], p[3], p[5], p[7], p[9]), p[11])
Exemple #5
0
def p_rows_specs(p):
    """
        rows_specs  :   ROW VARNAME VARNAME INT INT VARNAME DO INT VARNAME INT STEP INT INT SEMICOLON rows_specs
                    |   empty
    """
    if (len(p) == 16):
        p[0] = (DEF.row(p[2], p[3], p[4], p[5], p[6], p[8], p[10], p[12], p[13]), p[15])
Exemple #6
0
def p_pin_info(p):
    """
        pin_info    :   PLUS    LAYER   METAL_ID    xandy   xandy   pin_info
                    |   PLUS    DIRECTION   POLARITY    pin_info
                    |   PLUS    PLACED  xandy   VARNAME pin_info
                    |   PLUS    USE     SIGNAL  pin_info
                    |   SEMICOLON
    """
                    
    if (len(p) == 3):
        if p[3] == "SIGNAL":
            p[0] = (DEF.use_signal(), p[4])
        else:
            p[0] = (DEF.pin_polarity(p[3]), p[4])
    if (len(p) == 7):
        p[0] =  (DEF.metal_layer(p[3], p[4], p[5]), p[6])
    if (len(p) == 6):
        p[0] =  (DEF.placement(p[3], p[4]), p[5])
Exemple #7
0
def p_xandy(p):
    """
        xandy   :   LPAREN  INT INT RPAREN
    """
    p[0] = DEF.point(p[2], p[3])