Allow ordering semantics of asserts/traces to carry over to SV codegen
What's hard to do? (limit 100 words)
As described in https://github.com/google/xls/issues/1234#issuecomment-2138193805, the emitted RTL for asserts and traces are effectively split into distinct processes, which may be evaluated in arbitrary order. This contrasts with dslx and the XLS IR (through tokens) which have sequential ordering within a proc/function.
It's not clear if this should be configurable, but it should be possible to preserve the same ordering as in interpreted XLS.
Current best alternative workaround (limit 100 words)
Simulation of the generated RTL may produce different logs or error out on a later assertion. This may lead the user to associate the trace values with the wrong expressions, or assume that an preceding assertion passed.
Your view of the "best case XLS enhancement" (limit 100 words)
Default behavior should match the interpreted XLS. This can be accomplished by combining the assertions within the same procedural block, and similarly for the guarded $display statements for traces.