Support channel names in RTIO errors #209
@ -199,7 +199,7 @@ pub extern fn dma_playback(timestamp: i64, ptr: i32) {
|
||||
csr::rtio_dma::error_write(1);
|
||||
if error & 1 != 0 {
|
||||
artiq_raise!("RTIOUnderflow",
|
||||
|
||||
format!("RTIO underflow at channel {}:{}, {{0}} mu", channel, resolve_channel_name(channel as u32)),
|
||||
format!("RTIO underflow at {{0}} mu, channel {}:{}", channel, resolve_channel_name(channel as u32)),
|
||||
timestamp as i64, channel as i64, 0);
|
||||
}
|
||||
if error & 2 != 0 {
|
||||
|
@ -88,7 +88,7 @@ unsafe fn process_exceptional_status(channel: i32, status: i32) {
|
||||
}
|
||||
if status & RTIO_O_STATUS_UNDERFLOW != 0 {
|
||||
artiq_raise!("RTIOUnderflow",
|
||||
format!("RTIO underflow at channel {}:{}, {{1}} mu, slack {{2}} mu", channel, resolve_channel_name(channel as u32)),
|
||||
format!("RTIO underflow at {{1}} mu, channel {}:{}, slack {{2}} mu", channel, resolve_channel_name(channel as u32)),
|
||||
channel as i64, timestamp, timestamp - get_counter());
|
||||
}
|
||||
if status & RTIO_O_STATUS_DESTINATION_UNREACHABLE != 0 {
|
||||
|
@ -73,7 +73,7 @@ unsafe fn process_exceptional_status(channel: i32, status: u8) {
|
||||
}
|
||||
if status & RTIO_O_STATUS_UNDERFLOW != 0 {
|
||||
artiq_raise!("RTIOUnderflow",
|
||||
format!("RTIO underflow at channel {}:{}, {{1}} mu, slack {{2}} mu", channel, resolve_channel_name(channel as u32)),
|
||||
format!("RTIO underflow at {{1}} mu, channel {}:{}, slack {{2}} mu", channel, resolve_channel_name(channel as u32)),
|
||||
sb10q
commented
No. It's not "at channel". No. It's not "at channel".
|
||||
channel as i64, timestamp, timestamp - get_counter());
|
||||
}
|
||||
if status & RTIO_O_STATUS_DESTINATION_UNREACHABLE != 0 {
|
||||
|
@ -348,7 +348,7 @@ fn read_device_map(cfg: &Config) -> BTreeMap<u32, String> {
|
||||
let channel = bytes_cr.read_u32().unwrap();
|
||||
let device_name = bytes_cr.read_string().unwrap();
|
||||
if let Some(old_entry) = device_map.insert(channel, device_name.clone()) {
|
||||
error!("conflicting entries for channel {}: `{}` and `{}`",
|
||||
error!("read_device_map: conflicting entries for channel {}: `{}` and `{}`",
|
||||
channel, old_entry, device_name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user
Why is it
{{1}}
here and{1}
inartiq
?This remains unanswered and unaddressed.
In this version
format!
macro is used. In artiq - it is not