diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-06-16 20:24:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-16 20:24:55 +0200 |
commit | f0299751529d72b1ed1504439b55502f9630f100 (patch) | |
tree | 5a2b705e8eb1d04ebf1d586353a7d6907413aa9b | |
parent | 492a337202ee25ae47b4a22c99343d7ae5e40e43 (diff) | |
parent | f1f9da2d5b85b678ead42ff5a4a3d7806be0e706 (diff) | |
download | icestorm-f0299751529d72b1ed1504439b55502f9630f100.tar.gz icestorm-f0299751529d72b1ed1504439b55502f9630f100.tar.bz2 icestorm-f0299751529d72b1ed1504439b55502f9630f100.zip |
Merge pull request #161 from mithro/lut-bit-defaults
icebox_hlc2asc: Set LUT bits to zero by default.
-rwxr-xr-x | icebox/icebox_hlc2asc.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/icebox/icebox_hlc2asc.py b/icebox/icebox_hlc2asc.py index 0506b0f..58164d5 100755 --- a/icebox/icebox_hlc2asc.py +++ b/icebox/icebox_hlc2asc.py @@ -825,7 +825,7 @@ class LogicCell: def __init__(self, tile, index): self.tile = tile self.index = index - self.lut_bits = None + self.lut_bits = ['0'] * 16 self.seq_bits = ['0'] * 4 def read(self, fields): @@ -841,7 +841,7 @@ class LogicCell: if m < 16: lut_bits = (16-m) * "0" + lut_bits # Verilog 16'bXXXX is MSB first but the bitstream wants LSB. - self.lut_bits = lut_bits[::-1] + self.lut_bits = list(lut_bits[::-1]) else: self.lut_bits = logic_expression_to_lut( ' '.join(fields[2:]), ('in_0', 'in_1', 'in_2', 'in_3')) |