diff options
author | Tim 'mithro' Ansell <me@mith.ro> | 2018-05-30 13:05:20 -0700 |
---|---|---|
committer | Tim 'mithro' Ansell <me@mith.ro> | 2018-05-30 13:05:20 -0700 |
commit | f7e9fec63a3f88bee8c27e858da319ea03d68d14 (patch) | |
tree | ab3638452d514e0e582d4e40f4b372af2eb4094f /icebox | |
parent | 353a3385056a9637d31a9c9d125bc284c811a876 (diff) | |
download | icestorm-f7e9fec63a3f88bee8c27e858da319ea03d68d14.tar.gz icestorm-f7e9fec63a3f88bee8c27e858da319ea03d68d14.tar.bz2 icestorm-f7e9fec63a3f88bee8c27e858da319ea03d68d14.zip |
Allow prefixes in multiple chained statements.
IE
```
lutff_1 {
lutff_1/out -> local_g2_1 -> lutff_1/in_0
local_g2_2 -> lutff_1/in_3
local_g2_7 -> lutff_1/in_2
}
```
Diffstat (limited to 'icebox')
-rwxr-xr-x | icebox/icebox_hlc2asc.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/icebox/icebox_hlc2asc.py b/icebox/icebox_hlc2asc.py index a8b7a30..97a0386 100755 --- a/icebox/icebox_hlc2asc.py +++ b/icebox/icebox_hlc2asc.py @@ -803,7 +803,11 @@ class LogicCell: self.seq_bits[2] = '1' elif fields == ['async_setreset']: self.seq_bits[3] = '1' - elif len(fields) >= 3 and (fields[1] == '->' or fields[1] == '<->'): + elif len(fields) > 3 and (fields[1] == '->' or fields[1] == '<->'): + self.read(fields[:3]) + self.read(fields[2:]) + return + elif len(fields) == 3 and (fields[1] == '->' or fields[1] == '<->'): prefix = 'lutff_%d/' % self.index # Strip prefix if it is given @@ -960,7 +964,10 @@ class IOBlock: == ("padin_glb_netwk", fields[2][10:])] assert len(bit) == 1 self.tile.ic.extra_bits.add(bit[0]) - elif len(fields) >= 3 and (fields[1] == '->' or fields[1] == '<->'): + elif len(fields) > 3 and (fields[1] == '->' or fields[1] == '<->'): + self.read(fields[:3]) + self.read(fields[2:]) + elif len(fields) == 3 and (fields[1] == '->' or fields[1] == '<->'): prefix = 'io_%d/' % self.index # Strip prefix if it is given |