chipsalliance / f4pga-examples

Example designs showing different ways to use F4PGA toolchains.
https://f4pga-examples.readthedocs.io
Apache License 2.0
263 stars 77 forks source link

Question about constraints #126

Open rodrigomelo9 opened 3 years ago

rodrigomelo9 commented 3 years ago

Hi. It seems that both, pcf and xdc are supported.

I was comparing the three xc7 examples. Taking for example arty, I found:

Comparing the Makefiles:

Is the same to use -x ${XDC} for symbiflow_synth and -p ${PCF} for symbiflow_place? Do I need to choose only one option? Has it sense to support the two alternatives? Recommendation? In my opinion, in place has more sense (but is using pcf instead of xdc). Is it taken into account for synthesis?).

Clarification will be welcome.

Regards, Rodrigo

litghost commented 3 years ago

We are moving to XDC, but some of the old demos were written when only PCF support existed.

rodrigomelo9 commented 3 years ago

Ok, great. What about to specify in symbiflow_synth instead of symbiflow_place? Is it the final destination? (symbiflow_synth?) There, we can specify the timing and place constraints?

mithro commented 3 years ago

I think that is just a mistake?

mithro commented 3 years ago

@acomodi / @kgugala -- Thoughts?

acomodi commented 3 years ago

@rodrigomelo9 It actually is expected it to be like that.

Additionally, XDC and PCF should not be used at the same time and it is better to use XDC, given that they can contain also timing and other constraints.

mithro commented 3 years ago

@acomodi -- This seems incorrect. The XDC should contain the IO placements (as well as other constraints)? Is the problem that we are missing a tool which generates the IO constraints file for VPR from an XDC input?

acomodi commented 3 years ago

@mithro This is what is happening, the XDC contains all kinds of constraints including the placement ones. The yosys plugin can read the placement constraints and save them in the eblif, for the io place constraints script to generate the VPR constraint files

mithro commented 3 years ago

@acomodi -- So the PCF file is being generated by the output of Yosys which is then converted into the correct format needed by VPR?

acomodi commented 3 years ago

@mithro No. There are two independent flows concerning IO placement constraints, depending on what the user chooses: XDC flow: yosys parses the file and saves the constraints in the eblif. The placement constraints script will read from the eblif and generate the VPR constraints. No PCF is produced PCF flow: yosys does nothing concerning placement constraints. The placement constraints script reads the PCF and generates the VPR constraints. (The eblif is read also here, but only to get the top level IO nets)

mithro commented 3 years ago

I think we might have discussed this previously. We should hand in the PCF at the same place we hand in the XDC and then the rest of the flow should be the same.

See https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/30 and maybe https://docs.google.com/drawings/d/1r2LXypJF5AD40LfHegml3_fIvPT2jZ3n2OZYW9-9dLU/edit ?

Google Docs
Yosys and Constraints System
Yosys Verilog Design .v Timing Constraints .sdc Creates Cells Annotates Cells Optimizer Cells Cells Cells Cells Cells Renamed Cells Netlist .blif Timing Constraints .sdc From Cells From Annotations Optimizer preserves cell annotations but can eliminate cells and mangle net names Annotations can a...
rodrigomelo9 commented 3 years ago

Thanks. My question was answered, so this issue can be closed if you want (I mean, it seems that @mithro detected another problem, but that is not what this issue was about).

Regards