-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sayma RTM: hold hmc7043 in reset/mute state during init. #1049
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,11 @@ | |
from artiq import __version__ as artiq_version | ||
|
||
|
||
class CRG(Module): | ||
class CRG(Module, AutoCSR): | ||
def __init__(self, platform): | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the empty line. |
||
self.hmc7043_rst = CSRStorage(reset=1) | ||
|
||
self.clock_domains.cd_sys = ClockDomain() | ||
self.clock_domains.cd_sys4x = ClockDomain(reset_less=True) | ||
self.clock_domains.cd_clk200 = ClockDomain() | ||
|
@@ -31,7 +34,7 @@ def __init__(self, platform): | |
serwb_refclk_bufr = Signal() | ||
serwb_refclk_bufg = Signal() | ||
self.specials += Instance("BUFR", i_I=self.serwb_refclk, o_O=serwb_refclk_bufr) | ||
self.specials += Instance("BUFG", i_I=serwb_refclk_bufr, o_O=serwb_refclk_bufg) | ||
self.specials += Instance("BUFG", i_I=serwb_refclk_bufr, o_O=serwb_refclk_bufg) | ||
|
||
pll_locked = Signal() | ||
pll_fb = Signal() | ||
|
@@ -110,6 +113,8 @@ def __init__(self, platform): | |
csr_devices = [] | ||
|
||
self.submodules.crg = CRG(platform) | ||
csr_devices.append("crg") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use the GPIO out core instead of adding this to the CRG? CRG is normally used to clock the local design only. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lack of familiarity with misoc/to the man with a hammer everything is a nail. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mind changing this when merging? |
||
|
||
clk_freq = 125e6 | ||
|
||
self.submodules.rtm_magic = RTMMagic() | ||
|
@@ -174,7 +179,7 @@ def __init__(self, platform): | |
platform.request("ad9154_spi", 0), | ||
platform.request("ad9154_spi", 1))) | ||
csr_devices.append("converter_spi") | ||
self.comb += platform.request("hmc7043_reset").eq(0) | ||
self.comb += platform.request("hmc7043_reset").eq(self.crg.hmc7043_rst.storage) | ||
|
||
# AMC/RTM serwb | ||
serwb_pads = platform.request("amc_rtm_serwb") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there is no time for the HMC7043 to wreak havoc between the release of its reset line and the SPI write that mutes it?