Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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()
Esempio n. 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()
Esempio n. 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
Esempio n. 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
Esempio n. 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
Esempio n. 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