chipsalliance / yosys-f4pga-plugins

Plugins for Yosys developed as part of the F4PGA project.
https://f4pga.org
Apache License 2.0
84 stars 46 forks source link

ERROR: Incorrect period value #177

Open fontamsoc opened 2 years ago

fontamsoc commented 2 years ago

https://lists.librecores.org/pipermail/symbiflow/2021-December/000049.html

Hello,

I am attempting to build FonTamSOC targeting NexysA7.

However, symbiflow_synth fails with ERROR: Incorrect period value at the end of the logs.

Steps to reproduce failure:

# clone verilog sources:
git clone https://github.com/fontamsoc/hw.git
git checkout issues/177
cd hw

# prerequisite:
ln -snf pu32-nexys4ddr/litedram/litedram.hex litedram.hex

# synthesize:
symbiflow_synth -t nexys4ddr -v pu32-nexys4ddr/nexys4ddr.v -d artix7
-p xc7a100tcsg324-1 -x pu32-nexys4ddr/nexys4ddr.xdc &>/dev/null

tail nexys4ddr_synth.log

The error seems to come from https://github.com/SymbiFlow/yosys-symbiflow-plugins/blob/master/sdc-plugin/sdc.cc#L153

I'm guessing that the error is coming from line 4 of your .xdc file but the current output doesn't really give you enough information to know or confirm that. I recommend logging a bug on either symbiflow-examples or yosys-symbiflow-plugins with your reproduction instructions and output you have provided.

Next steps would probably be to improve the error message with the value it thinks is invalid. The code also doesn't seem to know the difference between the create_clock command getting invalid value for -period and the command not getting a -period argument all together.

Second step would be to figure out how to create / throw the error message so it reports the file and line number where the issue is found.

Hope that helps,

Tim 'mithro' Ansell

tmichalak commented 2 years ago

@fontamsoc I couldn't reproduce the error on my end. What version of the symbiflow-plugins do you use? Is it the same as here ? To make sure you have the latest plugins installed invoke conda install -c litex-hub symbiflow-yosys-plugins in your conda environment. Have you ever built the sdc plugin manually. If so then there is a debug option that prints out additional information during the clock propagation phase. Also, should I use the code on the master branch or some other commit, because the 44c4298 SHA that is in the report can't be found.

fontamsoc commented 2 years ago

HI @tmichalak,

I have updated steps to reproduce to git checkout issues/177 which is the same SHA 44c4298.

I have never built sdc plugin manually; however I have installed SymbiFlow using following instructions: https://symbiflow-examples.readthedocs.io/en/latest/getting-symbiflow.html

I was able to work around the issue removing -add from create_clock at: https://github.com/fontamsoc/hw/blob/44c4298/pu32-nexys4ddr/nexys4ddr.xdc#L4

Getting SymbiFlow — SymbiFlow examples documentation
GitHub
hw/nexys4ddr.xdc at 44c4298410679fa71d27e371f7869e05782e91da · fontamsoc/hw
Contribute to fontamsoc/hw development by creating an account on GitHub.
mithro commented 2 years ago

FYI - I logged the following GitHub issues based on this bug report;

olofk commented 2 years ago

Yep. Hitting the same bug here as described in https://github.com/SymbiFlow/yosys-symbiflow-plugins/issues/180 . Removing -add makes it pass