mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
clean up rtio_log
This commit is contained in:
parent
5a972907f3
commit
4387b0be1e
@ -1725,7 +1725,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
||||
self.polymorphic_print([self.visit(prefix)],
|
||||
separator=" ", suffix="\x1E", as_rtio=True)
|
||||
self.polymorphic_print([self.visit(arg) for arg in args],
|
||||
separator=" ", suffix="\n\x1D", as_rtio=True)
|
||||
separator=" ", suffix="\x1D", as_rtio=True)
|
||||
return ir.Constant(None, builtins.TNone())
|
||||
elif types.is_builtin(typ, "delay"):
|
||||
if len(node.args) == 1 and len(node.keywords) == 0:
|
||||
|
@ -140,7 +140,7 @@ pub fn log(timestamp: i64, data: &[u8]) {
|
||||
for i in 0..data.len() {
|
||||
word <<= 8;
|
||||
word |= data[i] as u32;
|
||||
if i % 4 == 0 {
|
||||
if i != 0 && i % 4 == 0 {
|
||||
rtio_o_data_write(0, word);
|
||||
csr::rtio::o_we_write(1);
|
||||
word = 0;
|
||||
|
@ -74,4 +74,4 @@ class AnalyzerTest(ExperimentCase):
|
||||
log = "".join([_extract_log_chars(msg.data)
|
||||
for msg in dump.messages
|
||||
if isinstance(msg, OutputMessage) and msg.channel == dump.log_channel])
|
||||
self.assertEqual(log, "foo\x1E32\n\x1D")
|
||||
self.assertEqual(log, "foo\x1E32\x1D")
|
||||
|
Loading…
Reference in New Issue
Block a user