PyFPGA / pyfpga

A Python package to use FPGA development tools programmatically.
https://pyfpga.github.io/pyfpga/
GNU General Public License v3.0
81 stars 8 forks source link

Constraints classification #40

Closed gts-bzi closed 2 weeks ago

gts-bzi commented 2 weeks ago

Seems like a copy&paste issue and am unsure what the original intention is:

            if self.data['constraints'][file] == 'syn':
                prop = 'USED_IN_IMPLEMENTATION FALSE'
            if self.data['constraints'][file] == 'syn':
                prop = 'USED_IN_SYNTHESIS FALSE'

But either of the two conditions seems faulty. Otherwise move them into the same if. Reference: https://github.com/PyFPGA/pyfpga/blob/dev/pyfpga/vivado.py#L48 at current head 73417f8

rodrigomelo9 commented 2 weeks ago

Hi @gts-bzi Thanks. It was fixed a few days ago and moved to https://github.com/PyFPGA/pyfpga/blob/dev/pyfpga/templates/vivado.jinja:

add_file -fileset constrs_1 {{ name }}
{% if attr == "syn" %}
set_property USED_IN_IMPLEMENTATION FALSE [get_files {{ name }}]
{% elif attr == "par" %}
set_property USED_IN_SYNTHESIS FALSE [get_files {{ name }}]
{% endif %}

PS: I'm considering removing it (at the moment, it is Vivado-specific and only useful to avoid WARNINGs).