gurudesh/pytracebugs huggingface dataset:
# Buggy code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB", i_T=t, i_I=o[bit], o_O=i[bit], io_B=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB", i_T=t, i_I=o[bit], o_O=i[bit], io_B=port.io[bit]
        )
    return m
# Buggy code
def get_diff_input(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2, 4, 7), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=p_port[bit], o_O=i[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2, 4, 7), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=port.p[bit], o_O=i[bit]
        )
    return m
# Buggy code
def get_diff_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2, 4, 7), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB",
            i_I=o[bit],
            o_O=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2, 4, 7), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB",
            i_I=o[bit],
            o_O=port.p[bit],
        )
    return m
# Buggy code
def get_diff_tristate(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential tristate",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ",
            i_T=t,
            i_I=o[bit],
            o_O=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "differential tristate",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ",
            i_T=t,
            i_I=o[bit],
            o_O=port.p[bit],
        )
    return m
# Buggy code
def get_diff_input_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input/output",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_B=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input/output",
        pin,
        attrs,
        valid_xdrs=(0, 1, 2, 4, 7),
        valid_attrs=True,
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_B=port.p[bit],
        )
    return m
# Buggy code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port, attrs, i_invert=invert)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port.io, attrs, i_invert=invert)
    return m
# Buggy code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port, attrs, o_invert=invert)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port.io, attrs, o_invert=invert)
    return m
# Buggy code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port, attrs, o_invert=invert)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port.io, attrs, o_invert=invert)
    return m
# Buggy code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port, attrs, i_invert=invert, o_invert=invert)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    self._get_io_buffer(m, pin, port.io, attrs, i_invert=invert, o_invert=invert)
    return m
# Buggy code
def get_diff_input(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    # See comment in should_skip_port_component above.
    self._get_io_buffer(m, pin, p_port, attrs, i_invert=invert)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    # See comment in should_skip_port_component above.
    self._get_io_buffer(m, pin, port.p, attrs, i_invert=invert)
    return m
# Buggy code
def get_diff_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    # Note that the non-inverting output pin is not driven the same way as a regular
    # output pin. The inverter introduces a delay, so for a non-inverting output pin,
    # an identical delay is introduced by instantiating a LUT. This makes the waveform
    # perfectly symmetric in the xdr=0 case.
    self._get_io_buffer(m, pin, p_port, attrs, o_invert=invert, invert_lut=True)
    self._get_io_buffer(m, pin, n_port, attrs, o_invert=not invert, invert_lut=True)
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    # Note that the non-inverting output pin is not driven the same way as a regular
    # output pin. The inverter introduces a delay, so for a non-inverting output pin,
    # an identical delay is introduced by instantiating a LUT. This makes the waveform
    # perfectly symmetric in the xdr=0 case.
    self._get_io_buffer(m, pin, port.p, attrs, o_invert=invert, invert_lut=True)
    self._get_io_buffer(m, pin, port.n, attrs, o_invert=not invert, invert_lut=True)
    return m
# Buggy code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=port[bit], o_O=i[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=port.io[bit], o_O=i[bit]
        )
    return m
# Buggy code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB", i_I=o[bit], o_O=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB", i_I=o[bit], o_O=port.io[bit]
        )
    return m
# Buggy code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ", i_T=t, i_I=o[bit], o_O=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ", i_T=t, i_I=o[bit], o_O=port.io[bit]
        )
    return m
# Buggy code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB", i_T=t, i_I=o[bit], o_O=i[bit], io_B=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB", i_T=t, i_I=o[bit], o_O=i[bit], io_B=port.io[bit]
        )
    return m
# Buggy code
def get_diff_input(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=p_port[bit], o_O=i[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IB", i_I=port.p[bit], o_O=i[bit]
        )
    return m
# Buggy code
def get_diff_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB",
            i_I=o[bit],
            o_O=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OB",
            i_I=o[bit],
            o_O=port.p[bit],
        )
    return m
# Buggy code
def get_diff_tristate(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ",
            i_T=t,
            i_I=o[bit],
            o_O=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "differential tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBZ",
            i_T=t,
            i_I=o[bit],
            o_O=port.p[bit],
        )
    return m
# Buggy code
def get_diff_input_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_B=p_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "BB",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_B=port.p[bit],
        )
    return m
# Buggy code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IBUF", i_I=port[bit], o_O=i[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IBUF", i_I=port.io[bit], o_O=i[bit]
        )
    return m
# Buggy code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUF", i_I=o[bit], o_O=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUF", i_I=o[bit], o_O=port.io[bit]
        )
    return m
# Buggy code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFT", i_T=t, i_I=o[bit], o_O=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFT", i_T=t, i_I=o[bit], o_O=port.io[bit]
        )
    return m
# Buggy code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IOBUF", i_T=t, i_I=o[bit], o_O=i[bit], io_IO=port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "single-ended input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IOBUF", i_T=t, i_I=o[bit], o_O=i[bit], io_IO=port.io[bit]
        )
    return m
# Buggy code
def get_diff_input(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IBUFDS", i_I=p_port[bit], i_IB=n_port[bit], o_O=i[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IBUFDS", i_I=port.p[bit], i_IB=port.n[bit], o_O=i[bit]
        )
    return m
# Buggy code
def get_diff_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFDS", i_I=o[bit], o_O=p_port[bit], o_OB=n_port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFDS", i_I=o[bit], o_O=port.p[bit], o_OB=port.n[bit]
        )
    return m
# Buggy code
def get_diff_tristate(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFTDS", i_T=t, i_I=o[bit], o_O=p_port[bit], o_OB=n_port[bit]
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_tristate(self, pin, port, attrs, invert):
    self._check_feature(
        "differential tristate", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "OBUFTDS", i_T=t, i_I=o[bit], o_O=port.p[bit], o_OB=port.n[bit]
        )
    return m
# Buggy code
def get_diff_input_output(self, pin, p_port, n_port, attrs, invert):
    self._check_feature(
        "differential input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(len(p_port)):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IOBUFDS",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_IO=p_port[bit],
            io_IOB=n_port[bit],
        )
    return m


# Traceback (subprocess.CalledProcessError)
ERROR: IO 'ddr3_0__dqs__n[0]' is unconstrained in LPF (override this error with --lpf-allow-unconstrained)
0 warnings, 1 error
Traceback (most recent call last):
File "diffpairissue.py", line 20, in <module>
ECPIX585Platform().build(Top(), do_program=True)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/plat.py", line 94, in build
products = plan.execute_local(build_dir)
File "/home/jeanthomas/Documents/nmigen/nmigen/build/run.py", line 95, in execute_local
subprocess.check_call(["sh", "{}.sh".format(self.script)])
File "/usr/lib64/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'build_top.sh']' returned non-zero exit status 255.

# Fixed code
def get_diff_input_output(self, pin, port, attrs, invert):
    self._check_feature(
        "differential input/output", pin, attrs, valid_xdrs=(0, 1, 2), valid_attrs=True
    )
    m = Module()
    i, o, t = self._get_xdr_buffer(m, pin, i_invert=invert, o_invert=invert)
    for bit in range(pin.width):
        m.submodules["{}_{}".format(pin.name, bit)] = Instance(
            "IOBUFDS",
            i_T=t,
            i_I=o[bit],
            o_O=i[bit],
            io_IO=port.p[bit],
            io_IOB=port.n[bit],
        )
    return m
# Buggy code
def convert(
    fi,
    ios=None,
    name="top",
    special_overrides=dict(),
    attr_translate=None,
    create_clock_domains=True,
    display_run=False,
):
    if display_run:
        warnings.warn(
            "`display_run=True` support has been removed",
            DeprecationWarning,
            stacklevel=1,
        )
    if special_overrides:
        warnings.warn(
            "`special_overrides` support as well as `Special` has been removed",
            DeprecationWarning,
            stacklevel=1,
        )
    # TODO: attr_translate

    def missing_domain(name):
        if create_clock_domains:
            return ClockDomain(name)

    v_output = verilog.convert(
        elaboratable=fi.get_fragment(),
        name=name,
        ports=ios or (),
        missing_domain=missing_domain,
    )
    output = ConvOutput()
    output.set_main_source(v_output)
    return output


# Traceback (AttributeError)
Traceback (most recent call last):
File "src/test_run_simulation_bug.py", line 28, in <module>
test1()
File "src/test_run_simulation_bug.py", line 24, in test1
vcd_name="test_run_simulation_bug.vcd")
File "/home/jacob/projects/nmigen/nmigen/compat/sim/__init__.py", line 22, in run_simulation
fragment.domains += ClockDomain("sync")
AttributeError: 'MyModule' object has no attribute 'domains'

# Fixed code
def convert(
    fi,
    ios=None,
    name="top",
    special_overrides=dict(),
    attr_translate=None,
    create_clock_domains=True,
    display_run=False,
):
    if display_run:
        warnings.warn(
            "`display_run=True` support has been removed",
            DeprecationWarning,
            stacklevel=1,
        )
    if special_overrides:
        warnings.warn(
            "`special_overrides` support as well as `Special` has been removed",
            DeprecationWarning,
            stacklevel=1,
        )
    # TODO: attr_translate

    if isinstance(fi, Module):
        fi = fi.get_fragment()

    def missing_domain(name):
        if create_clock_domains:
            return ClockDomain(name)

    v_output = verilog.convert(
        elaboratable=fi, name=name, ports=ios or (), missing_domain=missing_domain
    )
    output = ConvOutput()
    output.set_main_source(v_output)
    return output