mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 00:16:29 +08:00
coredevice: Reuse Target.little_endian for protocol endianness [nfc]
This commit is contained in:
parent
ec72eeda46
commit
1e443a3aea
@ -76,16 +76,15 @@ class Core:
|
|||||||
self.ref_multiplier = ref_multiplier
|
self.ref_multiplier = ref_multiplier
|
||||||
if target == "or1k":
|
if target == "or1k":
|
||||||
self.target_cls = OR1KTarget
|
self.target_cls = OR1KTarget
|
||||||
endian = ">"
|
|
||||||
elif target == "cortexa9":
|
elif target == "cortexa9":
|
||||||
self.target_cls = CortexA9Target
|
self.target_cls = CortexA9Target
|
||||||
endian = "<"
|
|
||||||
else:
|
else:
|
||||||
raise ValueError("Unsupported target")
|
raise ValueError("Unsupported target")
|
||||||
self.coarse_ref_period = ref_period*ref_multiplier
|
self.coarse_ref_period = ref_period*ref_multiplier
|
||||||
if host is None:
|
if host is None:
|
||||||
self.comm = CommKernelDummy()
|
self.comm = CommKernelDummy()
|
||||||
else:
|
else:
|
||||||
|
endian = "<" if self.target_cls.little_endian else ">"
|
||||||
self.comm = CommKernel(host, endian)
|
self.comm = CommKernel(host, endian)
|
||||||
|
|
||||||
self.first_run = True
|
self.first_run = True
|
||||||
|
Loading…
Reference in New Issue
Block a user