From 1e443a3aeaf992a46e48eb116b794b910762f9b2 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Thu, 21 Jan 2021 09:11:54 +0100 Subject: [PATCH] coredevice: Reuse Target.little_endian for protocol endianness [nfc] --- artiq/coredevice/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/artiq/coredevice/core.py b/artiq/coredevice/core.py index 01c9330ae..51d3ca4f5 100644 --- a/artiq/coredevice/core.py +++ b/artiq/coredevice/core.py @@ -76,16 +76,15 @@ class Core: self.ref_multiplier = ref_multiplier if target == "or1k": self.target_cls = OR1KTarget - endian = ">" elif target == "cortexa9": self.target_cls = CortexA9Target - endian = "<" else: raise ValueError("Unsupported target") self.coarse_ref_period = ref_period*ref_multiplier if host is None: self.comm = CommKernelDummy() else: + endian = "<" if self.target_cls.little_endian else ">" self.comm = CommKernel(host, endian) self.first_run = True