forked from pulp-platform/pulp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-ips
executable file
·54 lines (46 loc) · 1.58 KB
/
update-ips
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python3
# Francesco Conti <[email protected]>
#
# Copyright (C) 2016-2018 ETH Zurich, University of Bologna.
# All rights reserved.
from ipstools_cfg import *
import argparse
import sys
parser = argparse.ArgumentParser(
prog='PULP update script',
description="""Fetch IPs and resolve dependencies for PULPissimo""")
parser.add_argument('--rt-dpi', action='store_true',
help='Use the PULP Runtime DPI to emulate peripherals')
parser.add_argument('--i2c-vip', action='store_true',
help="""Use the i2c model (24FC1025).
Needs to be installed.""")
parser.add_argument('--flash-vip', action='store_true',
help="""Use the flash model (S25FS256).
Needs to be installed.""")
parser.add_argument('--i2s-vip', action='store_true',
help="""Use the i2s model (24FC1025).
Needs to be installed.""")
parser.add_argument('--verbose', action='store_true',
help='Show more information about commands')
args = parser.parse_args()
try:
os.mkdir("ips")
except OSError:
pass
# creates an IPApproX database
ipdb = ipstools.IPDatabase(
skip_scripts=True,
build_deps_tree=True,
resolve_deps_conflicts=True,
rtl_dir='rtl',
ips_dir='ips',
vsim_dir='sim',
default_server=DEFAULT_SERVER,
verbose=args.verbose
)
# updates the IPs from the git repo
ipdb.update_ips()
# launch generate-ips.py
ipdb.save_database()
# pass arguments and call generate script
execute("./generate-scripts " + (' '.join(sys.argv[1:])))