Skip to content

Commit

Permalink
CRG: use new Module API
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Mar 15, 2013
1 parent c06a821 commit 2491017
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mibuild/crg.py
@@ -1,16 +1,14 @@
from migen.fhdl.structure import *
from migen.fhdl.module import Module

class CRG:
class CRG(Module):
def get_clock_domains(self):
r = dict()
for k, v in self.__dict__.items():
if isinstance(v, ClockDomain):
r[v.name] = v
return r

def get_fragment(self):
return Fragment()

class SimpleCRG(CRG):
def __init__(self, platform, clk_name, rst_name):
self.cd = ClockDomain("sys")
Expand Down

0 comments on commit 2491017

Please sign in to comment.