coredevice: Reuse Target.little_endian for protocol endianness [nfc]

This commit is contained in:
David Nadlinger 2021-01-21 09:11:54 +01:00
parent ec72eeda46
commit 1e443a3aea
1 changed files with 1 additions and 2 deletions

View File

@ -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