From fd3c124f8738de3cbd380906b70135fad8c09d87 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 3 Jul 2018 20:46:05 +0200 Subject: Add opetion to defie ICEBOX_ROOT, fix compile on other location --- ice40/chipdb.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ice40/chipdb.py') diff --git a/ice40/chipdb.py b/ice40/chipdb.py index 8a1c9ce2..931c73d1 100644 --- a/ice40/chipdb.py +++ b/ice40/chipdb.py @@ -10,6 +10,7 @@ group = parser.add_mutually_exclusive_group() group.add_argument("-b", "--binary", action="store_true") group.add_argument("-c", "--c_file", action="store_true") parser.add_argument("filename", type=str, help="chipdb input filename") +parser.add_argument("-p", "--portspins", type=str, help="path to portpins.inc") args = parser.parse_args() endianness = "le" @@ -53,7 +54,7 @@ beltypes = dict() tiletypes = dict() wiretypes = dict() -with open("ice40/portpins.inc") as f: +with open(args.portspins) as f: for line in f: line = line.replace("(", " ") line = line.replace(")", " ") -- cgit v1.2.3