From 00f42f912bb852c31e8399c1e5fa0c07a714f1de Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 13 Feb 2018 19:58:51 +0800 Subject: [PATCH] rename 'RTM identifier' to 'RTM magic number' Avoids confusion with the MiSoC identifier (containing the ARTIQ version). --- artiq/firmware/libboard_artiq/serwb.rs | 10 +++++----- artiq/gateware/targets/sayma_rtm.py | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/artiq/firmware/libboard_artiq/serwb.rs b/artiq/firmware/libboard_artiq/serwb.rs index c31fa8eeb..39dff6fd4 100644 --- a/artiq/firmware/libboard_artiq/serwb.rs +++ b/artiq/firmware/libboard_artiq/serwb.rs @@ -38,12 +38,12 @@ pub fn wait_init() { } info!("done."); - // Try reading the identifier register on the other side of the bridge. - let rtm_identifier = unsafe { - csr::rtm_identifier::identifier_read() + // Try reading the magic number register on the other side of the bridge. + let rtm_magic = unsafe { + csr::rtm_magic::magic_read() }; - if rtm_identifier != 0x5352544d { - error!("incorrect RTM identifier: 0x{:08x}", rtm_identifier); + if rtm_magic != 0x5352544d { + error!("incorrect RTM magic number: 0x{:08x}", rtm_magic); // proceed anyway } diff --git a/artiq/gateware/targets/sayma_rtm.py b/artiq/gateware/targets/sayma_rtm.py index 718a9d4ed..c6575c2d1 100755 --- a/artiq/gateware/targets/sayma_rtm.py +++ b/artiq/gateware/targets/sayma_rtm.py @@ -61,10 +61,10 @@ class CRG(Module): self.specials += Instance("IDELAYCTRL", i_REFCLK=ClockSignal("clk200"), i_RST=ic_reset) -class RTMIdentifier(Module, AutoCSR): +class RTMMagic(Module, AutoCSR): def __init__(self): - self.identifier = CSRStatus(32) - self.comb += self.identifier.status.eq(0x5352544d) # "SRTM" + self.magic = CSRStatus(32) + self.comb += self.magic.status.eq(0x5352544d) # "SRTM" CSR_RANGE_SIZE = 0x800 @@ -83,8 +83,8 @@ class SaymaRTM(Module): self.submodules.crg = CRG(platform) clk_freq = 125e6 - self.submodules.rtm_identifier = RTMIdentifier() - csr_devices.append("rtm_identifier") + self.submodules.rtm_magic = RTMMagic() + csr_devices.append("rtm_magic") # clock mux: 100MHz ext SMA clock to HMC830 input self.submodules.clock_mux = gpio.GPIOOut(Cat(