summaryrefslogtreecommitdiff
path: root/icebox/icebox_hlc2asc.py
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-12-05 08:24:49 +0100
committerRuben Undheim <ruben.undheim@gmail.com>2018-12-05 08:24:49 +0100
commit8cdaf84defddf5a7bd1c4551ece81b9d832e4595 (patch)
tree633fb613368bc4d1f26a63fc5142b4de3a9b6cc5 /icebox/icebox_hlc2asc.py
parente515d7ff6e4e71b3e5fe6b264427029f2e3c9e72 (diff)
parent8cbb9960214d27e06e6e69c57e77f4178dcfe36b (diff)
Merge tag 'upstream/0_20181109git9671b76'
Upstream version 0~20181109git9671b76
Diffstat (limited to 'icebox/icebox_hlc2asc.py')
-rwxr-xr-xicebox/icebox_hlc2asc.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/icebox/icebox_hlc2asc.py b/icebox/icebox_hlc2asc.py
index 6fe9d1c..8b82132 100755
--- a/icebox/icebox_hlc2asc.py
+++ b/icebox/icebox_hlc2asc.py
@@ -742,6 +742,7 @@ class Tile:
continue
add_entry(entry, bits)
+ self.symbols = {}
self.buffers = []
self.routings = []
self.bits_set = set()
@@ -830,6 +831,12 @@ clearing:{:<30} - current set :{}""".format(
elif len(fields) >= 5 and (fields[1] == '->' or fields[1] == '~>'):
self.read(fields[:3])
self.read(fields[2:])
+ elif len(fields) == 3 and fields[1] == '.sym>':
+ nn = untranslate_netname(self.x, self.y,
+ self.ic.max_x - 1,
+ self.ic.max_y - 1, fields[0])
+ net = self.ic.get_net_number( (self.x, self.y, nn) )
+ self.ic.symbols.setdefault(net, set()).add(fields[2])
else:
raise ParseError("Unknown Tile specification format")
@@ -907,6 +914,13 @@ class LogicCell:
else:
self.tile.read(fields)
return
+ elif len(fields) == 3 and fields[1] == '.sym>':
+ nn = untranslate_netname(self.tile.x, self.tile.y,
+ self.tile.ic.max_x - 1,
+ self.tile.ic.max_y - 1, fields[0])
+ net = self.tile.ic.get_net_number( (self.tile.x, self.tile.y, nn) )
+ self.tile.ic.symbols.setdefault(net, set()).add(fields[2])
+
bits = ''.join([
self.lut_bits[15], self.lut_bits[12],
@@ -1081,6 +1095,12 @@ Should be at io_tile {},{} io{}
self.tile.read(fields[:-1] + [prefix + fields[-1]])
else:
self.tile.read(fields)
+ elif len(fields) == 3 and fields[1] == '.sym>':
+ nn = untranslate_netname(self.tile.x, self.tile.y,
+ self.tile.ic.max_x - 1,
+ self.tile.ic.max_y - 1, fields[0])
+ net = self.tile.ic.get_net_number( (self.tile.x, self.tile.y, nn) )
+ self.tile.ic.symbols.setdefault(net, set()).add(fields[2])
else:
raise ParseError("Unknown IOBlock specification format: {}".format(fields))