Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad elaboration order #87

Closed
rroohhh opened this issue Feb 15, 2020 · 13 comments
Closed

Bad elaboration order #87

rroohhh opened this issue Feb 15, 2020 · 13 comments

Comments

@rroohhh
Copy link

rroohhh commented Feb 15, 2020

Hi,
I am trying to use this with a bigger project targeting the Xilinx Zynq 7020 FPGA.

I am using this script: https://paste.niemo.de/ubehahuwup.sh to try and synthesize the design. It produces the following output: https://paste.niemo.de/raw/lazolamaxo

(The unisim.vhd and unimacro.vhd come from a Vivado installation, they are Vivado/2018.2/data/vhdl/src/unisim/unisim_retarget_VCOMP.vhd and Vivado/2018.2/data/vhdl/src/unimacro/unimacro/unimacro_VCOMP.vhd)

It fails at the yosys step with

error: synth: bad elaboration order of objects

******************** GHDL Bug occurred ***************************
Please report this bug on https://github.com/ghdl/ghdl/issues
GHDL release: 1.0-dev (v0.37.0-14-g3a134f43) [Dunoon edition]
Compiled with unknown compiler version
Target: x86_64-linux-gnu
/src/
Command line:

Exception TYPES.INTERNAL_ERROR raised
Exception information:
raised TYPES.INTERNAL_ERROR : synth-context.adb:222
******************************************************************
ERROR: vhdl import failed.

This is of course not a lot of information to work with, but due to the size of the project, I am not sure how do debug / reduce this error further.

Do you have any pointers for me on how to debug this further or reduce the project to something workable?

@tgingold
Copy link
Member

tgingold commented Feb 16, 2020 via email

@cajt
Copy link

cajt commented Feb 26, 2020

I get the identical error message for a different design.
It uses VHDL-93, so no generic packages.
But it has similar (maybe the same) warnings about unknown pragmas from "src/synopsys/std_logic_arith.vhdl".

Shall I try to build a minimal example, and open an new issue?

@tgingold
Copy link
Member

tgingold commented Feb 27, 2020 via email

@cajt
Copy link

cajt commented Feb 28, 2020

@tgingold
Copy link
Member

tgingold commented Feb 28, 2020 via email

@tgingold
Copy link
Member

The bad elaboration error is now fixed.

But there are some unimplemented operations that I have to fix.

@tgingold
Copy link
Member

ghdl now detects a latch in uart_rx.

@cajt
Copy link

cajt commented Feb 29, 2020

Thank you.
I'm trying to reproduce the detected latch, but have to solve some build-environment problems first.
Also I'm moderately sure the design/code was synthesized before and ran on spartan3/6 and ice40 (with Icecube2) some years ago, but I can't reproduce this ad-hoc.

@tgingold
Copy link
Member

tgingold commented Feb 29, 2020 via email

@tgingold
Copy link
Member

tgingold commented Mar 1, 2020

I am closing this issue because the bad elaboration order crash is now fixed.
Do not hesitate to open a new issue if you still have a problem with the design.

@tgingold tgingold closed this as completed Mar 1, 2020
@rroohhh
Copy link
Author

rroohhh commented Mar 9, 2020

For my case I still get the same bad elaboration order of objects error. I updated my initial message with the updated log and script I used. Here they are again:
Script: https://paste.niemo.de/ubehahuwup.sh
Output: https://paste.niemo.de/raw/lazolamaxo

Also I don't know where you found generic packages, I don't think they are used in this project.

@tgingold
Copy link
Member

tgingold commented Mar 9, 2020 via email

@rroohhh
Copy link
Author

rroohhh commented Mar 21, 2020

Great news, after going through things affected by #93 it seems to atleast not crash or error out. There are still some issues with some cells not being correctly techmapped by yosys, that I will look into further soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants