forked from M-Labs/artiq
runtime: support for targets without RTIO log channel
This commit is contained in:
parent
cd40d5b107
commit
0443f83d5e
|
@ -225,6 +225,7 @@ class NIST_CLOCK(_NIST_Ions):
|
||||||
ofifo_depth=512,
|
ofifo_depth=512,
|
||||||
ififo_depth=4))
|
ififo_depth=4))
|
||||||
|
|
||||||
|
self.config["HAS_RTIO_LOG"] = None
|
||||||
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
||||||
rtio_channels.append(rtio.LogChannel())
|
rtio_channels.append(rtio.LogChannel())
|
||||||
|
|
||||||
|
@ -303,6 +304,7 @@ class NIST_QC2(_NIST_Ions):
|
||||||
ofifo_depth=512,
|
ofifo_depth=512,
|
||||||
ififo_depth=4))
|
ififo_depth=4))
|
||||||
|
|
||||||
|
self.config["HAS_RTIO_LOG"] = None
|
||||||
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
||||||
rtio_channels.append(rtio.LogChannel())
|
rtio_channels.append(rtio.LogChannel())
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,7 @@ trce -v 12 -fastpaths -tsi {build_name}.tsi -o {build_name}.twr {build_name}.ncd
|
||||||
rtio_channels.append(rtio.Channel.from_phy(
|
rtio_channels.append(rtio.Channel.from_phy(
|
||||||
phy, ofifo_depth=64, ififo_depth=64))
|
phy, ofifo_depth=64, ififo_depth=64))
|
||||||
|
|
||||||
|
self.config["HAS_RTIO_LOG"] = None
|
||||||
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
self.config["RTIO_LOG_CHANNEL"] = len(rtio_channels)
|
||||||
rtio_channels.append(rtio.LogChannel())
|
rtio_channels.append(rtio.LogChannel())
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ pub extern fn input_data(channel: u32) -> u32 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(has_rtio_log)]
|
||||||
pub fn log(timestamp: i64, data: &[u8]) {
|
pub fn log(timestamp: i64, data: &[u8]) {
|
||||||
unsafe {
|
unsafe {
|
||||||
csr::rtio::chan_sel_write(csr::CONFIG_RTIO_LOG_CHANNEL);
|
csr::rtio::chan_sel_write(csr::CONFIG_RTIO_LOG_CHANNEL);
|
||||||
|
@ -146,3 +147,6 @@ pub fn log(timestamp: i64, data: &[u8]) {
|
||||||
csr::rtio::o_we_write(1);
|
csr::rtio::o_we_write(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(has_rtio_log))]
|
||||||
|
pub fn log(timestamp: i64, data: &[u8]) {}
|
||||||
|
|
Loading…
Reference in New Issue