Skip to content

Commit b2cd5cb

Browse files
committed
openflow: use the project name as the name for the combined constraints
1 parent 520cc50 commit b2cd5cb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pyfpga/templates/openflow.jinja

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ read_verilog -defer -sv {{ name }}
3737
chparam{% for key, value in params.items() %} -set {{ key }} {{ value }}{% endfor %}
3838
{% endif %}
3939

40-
{% if top%}
40+
{% if top %}
4141
synth -top {{ top }}
4242
{% endif %}
4343

@@ -71,10 +71,10 @@ synth_{{ family }} -top {{ top }} -json {{ project }}.json
7171
CONSTRAINTS="{{ constraints | join(' ') }}"
7272

7373
{% 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 %}
7878
$DOCKER hdlc/nextpnr:ice40 /bin/bash -c "
7979
{% if hooks %}{{ hooks.prepar | join('\n') }}{% endif %}
8080
nextpnr-ice40 --{{ device }} --package {{ package }} $CONSTRAINT --json {{ project }}.json --asc {{ project }}.asc
@@ -86,10 +86,10 @@ icetime -d {{ device }} -mtr {{ project }}.rpt {{ project }}.asc
8686
{% endif %}
8787

8888
{% 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 %}
9393
$DOCKER hdlc/nextpnr:ecp5 /bin/bash -c "
9494
{% if hooks %}{{ hooks.prepar | join('\n') }}{% endif %}
9595
nextpnr-ecp5 --{{ device }} --package {{ package }} $CONSTRAINT --json {{ project }}.json --textcfg {{ project }}.config

0 commit comments

Comments
 (0)