Allows fully pluggable CPUs where cpu_type is set to "external" and cpu_cls provided externally.
# None
"None" : CPUNone,
+ # External (CPU class provided externally by design/user)
+ "external" : None,
+
# LM32
"lm32" : LM32,
colorer(", ".join(cpu.CPUS.keys()))))
raise
# Add CPU
+ if name == "external" and cls is None:
+ self.logger.error("{} CPU requires {} to be specified.".format(
+ colorer(name),
+ colorer("cpu_cls", color="red")))
+ raise
cpu_cls = cls if cls is not None else cpu.CPUS[name]
if variant not in cpu_cls.variants:
self.logger.error("{} CPU variant {}, supporteds: {}.".format(