Example #1
0
def print_board_info(args):
    boards = get_all_board_names()

    for bn in boards:
        brd = get_board(bn)

        has_led = False
        led = brd.get_port('led')
        if led is None:
            led = brd.get_port('leds')
        if led is not None:
            has_led = True
        numled = 0 if led is None else len(led.pins)
        ledpins = ' ' if led is None else led.pins
        ledname = ' ' if led is None else led.name

        # print some information
        print("{:12}: has led {:5}: {:5}, # led {}, led pins {} ".format(
            bn,
            str(has_led),
            str(ledname),
            numled,
            str(ledpins),
        ))

    return
Example #2
0
def parseargs():
    boards = get_all_board_names() + ["all"]
    parser = argparse.ArgumentParser()
    parser.add_argument("--board", default="xula", choices=boards, help="select the board to build")
    parser.add_argument("--dump", default=False, action="store_true", help="print information on all boards")
    args = parser.parse_args()
    return args
Example #3
0
def parseargs():
    boards = get_all_board_names() + ['all']
    parser = argparse.ArgumentParser()
    parser.add_argument('--board', default='xula', choices=boards,
                        help="select the board to build")
    parser.add_argument('--dump', default=False, action='store_true',
                        help="print information on all boards")
    args = parser.parse_args()
    return args
Example #4
0
def test_boards():
    for bn in get_all_board_names():
        brd = get_board(bn)

        # map led port for boards without explicit led pins
        if bn in led_port_pin_map:
            brd.add_port_name(**led_port_pin_map[bn])

        flow = build.flow.Yosys(brd=brd, top=blinky)
        flow.path = os.path.join('output', flow.path)
        flow.run()
Example #5
0
def test_boards():
    for bn in get_all_board_names():
        brd = get_board(bn)
        
        # map led port for boards without explicit led pins 
        if bn in led_port_pin_map:
            brd.add_port_name(**led_port_pin_map[bn])

        flow = build.flow.Yosys(brd=brd, top=blinky)
        flow.path = os.path.join('output', flow.path)
        flow.run()
Example #6
0
def build_board(args):
    """
    """
    boards = get_all_board_names() if args.board == 'all' else [args.board]
    
    for bn in boards:        
        brd = get_board(bn)
        if brd in led_port_pin_map:
            brd.add_port_name(**led_port_pin_map[brd])
        ledport = brd.get_port('led')

    return
Example #7
0
def build_board(args):
    """
    """
    boards = get_all_board_names() if args.board == 'all' else [args.board]

    for bn in boards:
        brd = get_board(bn)
        if brd in led_port_pin_map:
            brd.add_port(**led_port_pin_map[brd])
        # check the board definition has led port, if not add it from
        # the board_table
        ledport = brd.get_port('led')

    return
Example #8
0
def build_board(args):
    """
    """
    boards = get_all_board_names() if args.board == 'all' else [args.board]
    
    for bn in boards:        
        brd = get_board(bn)
        if brd in led_port_pin_map:
            brd.add_port(**led_port_pin_map[brd])
        # check the board definition has led port, if not add it from 
        # the board_table
        ledport = brd.get_port('led')
        
    return
Example #9
0
def print_board_info(args):
    boards = get_all_board_names()
    
    for bn in boards:
        brd = get_board(bn)
        
        has_led = False
        led = brd.get_port('led')
        if led is None:
            led = brd.get_port('leds')
        if led is not None:
            has_led = True
        numled = 0 if led is None else len(led.pins)
        ledpins = ' ' if led is None else led.pins
        ledname = ' ' if led is None else led.name
        
        # print some information
        print("{:12}: has led {:5}: {:5}, # led {}, led pins {} ".format(
              bn, str(has_led), str(ledname), numled, str(ledpins), ))
              
    return