projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2491017
)
CRG: support reset inversion
author
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 15 Mar 2013 09:49:18 +0000
(10:49 +0100)
committer
Sebastien Bourdeauducq
<sebastien@milkymist.org>
Fri, 15 Mar 2013 09:49:18 +0000
(10:49 +0100)
mibuild/crg.py
patch
|
blob
|
history
diff --git
a/mibuild/crg.py
b/mibuild/crg.py
index 6448ec49c6e7cdeae14889cae817f53db3ae3ad0..131b7e6270f589f89fd1888de950dc4f0b8b69e6 100644
(file)
--- a/
mibuild/crg.py
+++ b/
mibuild/crg.py
@@
-10,7
+10,11
@@
class CRG(Module):
return r
class SimpleCRG(CRG):
- def __init__(self, platform, clk_name, rst_name):
+ def __init__(self, platform, clk_name, rst_name
, rst_invert=False
):
self.cd = ClockDomain("sys")
platform.request(clk_name, None, self.cd.clk)
- platform.request(rst_name, None, self.cd.rst)
+ if rst_invert:
+ rst_n = platform.request(rst_name)
+ self.comb += self.cd.rst.eq(~rst_n)
+ else:
+ platform.request(rst_name, None, self.cd.rst)