Created
September 16, 2015 12:08
-
-
Save cr1901/8c6f2c4ac30fb0b01576 to your computer and use it in GitHub Desktop.
Migen Case Bug?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from migen import * | |
from migen.fhdl import verilog | |
class CaseTest(Module): | |
def __init__(self): | |
self.a = Signal(1) | |
self.b = Signal(1) | |
self.choose = Signal(1) | |
self.o = Signal(1) | |
case_index = [self.a, self.b] | |
act = dict((i, self.o.eq(case_index[i])) for i in range(2)) | |
self.comb += [Case(self.choose, act)] | |
print(verilog.convert(CaseTest())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment