Skip to content

Improve passing of context to the template engine

Lukasz Butkowski requested to merge context into master

The current way of passing information about the compiled SystemRDL tree (names and properties of registers etc, collectively called "context") to the template processing is terrible.

Format strings encapsulated within an initial template (usually your *.in files) will need different context than the first. This other context must still be passed on by the function handling the initial template which had been called with another set of values. The way this is currently handled by VhdlFormatter.format_field() is too static.

Replace it with a context variable that can be reconstructed during processing of multi-layered templates and is easier to handle and extend.

Edited by Lukasz Butkowski

Merge request reports

Loading