migen icon indicating copy to clipboard operation
migen copied to clipboard

tutorial out of date (was: Issue with importing Signal)

Open sheeets opened this issue 7 years ago • 3 comments

In your documentation I've seen you import in these 2 ways:

>>> from migen.fhdl.std import *
or
>>> from migen.fhdl import *

However, when I try to do run this command:

>>> a = Signal(1)
NameError: name 'Signal' is not defined

but this works when I do:

>>> from migen import *
>>> a = Signal(1)

Is this due to some change along the way in regards to how the modules are setup?

>>> type(Signal())
migen.fhdl.structure.Signal

sheeets avatar Oct 10 '17 23:10 sheeets

migen.fhdl.std has been removed. Where in the documentation is it still mentioned?

sbourdeauducq avatar Oct 11 '17 02:10 sbourdeauducq

It was a tutorial from 2014. Is from migen.fhdl import * the correct import statement to use Signal()?

sheeets avatar Oct 11 '17 16:10 sheeets

No, usually you want from migen import *.

sbourdeauducq avatar Oct 11 '17 22:10 sbourdeauducq