aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Holdsworth <joel@airwebreathe.org.uk>2018-05-02 16:33:16 +0100
committerTim 'mithro' Ansell <me@mith.ro>2018-06-11 16:04:57 -0700
commit6c21817732f251f297f7fc8c0876e7cfe78284ca (patch)
tree1f4ab984186e7df152be5a4920aeb66b0c240c74
parent92751d505af0e2843694a1b59c89bb8896546aba (diff)
downloadicestorm-6c21817732f251f297f7fc8c0876e7cfe78284ca.tar.gz
icestorm-6c21817732f251f297f7fc8c0876e7cfe78284ca.tar.bz2
icestorm-6c21817732f251f297f7fc8c0876e7cfe78284ca.zip
icebox_hlc2asc: Accept device types such as HX1K
-rwxr-xr-xicebox/icebox_hlc2asc.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/icebox/icebox_hlc2asc.py b/icebox/icebox_hlc2asc.py
index 54c9dc0..3888dd3 100755
--- a/icebox/icebox_hlc2asc.py
+++ b/icebox/icebox_hlc2asc.py
@@ -532,7 +532,9 @@ class Main:
and len(fields[1]) >= 2 and fields[1][0] == '"' \
and fields[1][-1] == '"' \
and self.ic is None and self.device is None:
- self.device = fields[1][1:-1]
+ self.device = fields[1][1:-1].lower()
+ if self.device.startswith('lp') or self.device.startswith('hx'):
+ self.device = self.device[2:]
if self.device == '1k':
self.ic = icebox.iceconfig()
self.ic.setup_empty_1k()