buil.plat: enable strict undefined behavior in Jinja2.
By default, if an operation produces an undefined value (a Jinja2 concept that corresponds to Python's KeyError, AttributeError, etc) then this value may be printed in a template, which is a nop. This behavior can hide bugs. This commit changes the Jinja2 behavior to raise an error instead of producing an undefined value in all cases. (We produce undefined values deliberately in a few places. Those are unaffected; it is OK to use several kinds of undefined values in one Jinja2 environment.) Fixes #337.
This commit is contained in:
parent
ee73d39b8d
commit
3346f2c505
2 changed files with 4 additions and 2 deletions
3
nmigen/vendor/lattice_ice40.py
vendored
3
nmigen/vendor/lattice_ice40.py
vendored
|
|
@ -155,7 +155,8 @@ class LatticeICE40Platform(TemplatedPlatform):
|
|||
--log {{name}}.tim
|
||||
{{platform._nextpnr_device_options[platform.device]}}
|
||||
--package
|
||||
{{platform.package|lower}}{{platform._nextpnr_package_options[platform.device]}}
|
||||
{{platform.package|lower}}{{platform._nextpnr_package_options[platform.device]|
|
||||
default("")}}
|
||||
--json {{name}}.json
|
||||
--pcf {{name}}.pcf
|
||||
--asc {{name}}.asc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue