MLBEDSW-6563: networks failing with memory area exceeded in vela

 - For allocations that have a hard memory limit the Hill Climb allocator
should be given more attempts to find a solution that would fit
 - The fix is to use a memory limit when there is a hard constraint, and
a minimum iteration count, reset on every improvement, when there is a soft
constraint
 - Added maximum number iterations CLI option

Signed-off-by: Tim Hall <tim.hall@arm.com>
Change-Id: I19ff53a0b68412de280263626778a3102cbe52fa
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py
index 0e68b14..2bdfda2 100644
--- a/ethosu/vela/register_command_stream_generator.py
+++ b/ethosu/vela/register_command_stream_generator.py
@@ -151,7 +151,7 @@
 
             payload_mode = CmdMode(code & CmdMode.Mask)
 
-            s = f"0x{offset:06x}:"
+            s = f"{offset:#08x}:"
 
             if payload_mode == CmdMode.NoPayload:
                 s += f" {'':8}"
@@ -291,7 +291,11 @@
                     if offset < 0:
                         raise VelaError(f"Negative address offset: {offset}, region: {region}")
                     if offset > max:
-                        raise VelaError(f"Address offset out of range: {offset}, region: {region}, max: {max}")
+                        raise VelaError(
+                            f"Address offset out of range: {offset}, region: {region}, max: {max}. Perhaps try running"
+                            f" with the HillClimb tensor allocator and/or increasing the maximum iteration of that"
+                            f" allocator"
+                        )
 
 
 def quantise(value: float, quant: Optional[NpuQuantization]) -> int: