@@ -37,7 +37,7 @@ read_verilog -defer -sv {{ name }}
37
37
chparam{% for key , value in params .items () %} -set {{ key }} {{ value }}{% endfor %}
38
38
{% endif %}
39
39
40
- {% if top %}
40
+ {% if top %}
41
41
synth -top {{ top }}
42
42
{% endif %}
43
43
@@ -71,10 +71,10 @@ synth_{{ family }} -top {{ top }} -json {{ project }}.json
71
71
CONSTRAINTS="{{ constraints | join(' ') }}"
72
72
73
73
{% if family == 'ice40' %}
74
- if [ -n "$CONSTRAINTS" ]; then
75
- cat $CONSTRAINTS > constraints .pcf
76
- CONSTRAINT="--pcf constraints .pcf"
77
- fi
74
+ {% if constraints %}
75
+ cat $CONSTRAINTS > {{ project }} .pcf
76
+ CONSTRAINT="--pcf {{ project }} .pcf"
77
+ {% endif %}
78
78
$DOCKER hdlc/nextpnr:ice40 /bin/bash -c "
79
79
{% if hooks %} {{ hooks.prepar | join('\n') }}{% endif %}
80
80
nextpnr-ice40 --{{ device }} --package {{ package }} $CONSTRAINT --json {{ project }}.json --asc {{ project }}.asc
@@ -86,10 +86,10 @@ icetime -d {{ device }} -mtr {{ project }}.rpt {{ project }}.asc
86
86
{% endif %}
87
87
88
88
{% if family == 'ecp5' %}
89
- if [ -n "$CONSTRAINTS" ]; then
90
- cat $CONSTRAINTS > constraints .lpf
91
- CONSTRAINT="--lpf constraints .lpf"
92
- fi
89
+ {% if constraints %}
90
+ cat $CONSTRAINTS > {{ project }} .lpf
91
+ CONSTRAINT="--lpf {{ project }} .lpf"
92
+ {% endif %}
93
93
$DOCKER hdlc/nextpnr:ecp5 /bin/bash -c "
94
94
{% if hooks %} {{ hooks.prepar | join('\n') }}{% endif %}
95
95
nextpnr-ecp5 --{{ device }} --package {{ package }} $CONSTRAINT --json {{ project }}.json --textcfg {{ project }}.config
0 commit comments