Created
September 22, 2015 12:29
-
-
Save cr1901/1164f581018d995f8f2d to your computer and use it in GitHub Desktop.
Migen Simulator "Recursion Depth Exceeded" Example
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 * | |
class Recur(Module): | |
def __init__(self): | |
self.divider = Signal(16) | |
self.half_of_divider = Signal(16) | |
### | |
self.sync += [self.half_of_divider[:15].eq(self.divider[1:] - 1)] | |
def recur_test(m): | |
yield | |
if __name__ == "__main__": | |
m = Recur() | |
run_simulation(m, recur_test(m)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment