m-labs / migen

A Python toolbox for building complex digital hardware
https://m-labs.hk/migen
Other
1.23k stars 210 forks source link

namer issue with signed signals #45

Closed jordens closed 8 years ago

jordens commented 8 years ago
from migen import *

class M(Module):
    def __init__(self):
        a = Signal(3, True)

def run():
    for i in range(3):
        yield

run_simulation(M(), run())
Traceback (most recent call last):
  File "t.py", line 12, in <module>
    run_simulation(M(), run())
  File "t.py", line 5, in __init__
    a = Signal(3, True)
  File "/home/rj/work/software/migen/migen/migen/fhdl/structure.py", line 341, in __init__
    self.backtrace = _tracer.trace_back(name)
  File "/home/rj/work/software/migen/migen/migen/fhdl/tracer.py", line 76, in trace_back
    varname = remove_underscore(varname)
  File "/home/rj/work/software/migen/migen/migen/fhdl/tracer.py", line 35, in remove_underscore
    if len(s) > 2 and s[0] == "_" and s[1] != "_":
TypeError: object of type 'bool' has no len()
jordens commented 8 years ago

PEBKAC