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

Replace FreeHDL by GHDL #395

Closed
2 of 3 tasks
ra3xdh opened this issue Dec 9, 2023 · 4 comments · Fixed by #543
Closed
2 of 3 tasks

Replace FreeHDL by GHDL #395

ra3xdh opened this issue Dec 9, 2023 · 4 comments · Fixed by #543

Comments

@ra3xdh
Copy link
Owner

ra3xdh commented Dec 9, 2023

Qucs-S uses FreeHDL for VHDL simulation. The FreeHDL is deprecated and doesn't work on modern platforms anymore. It's need to replace it with GHDL. See #393

@zergud
Copy link
Collaborator

zergud commented Dec 10, 2023

Qucs/qucs#830

@ra3xdh
Copy link
Owner Author

ra3xdh commented Jan 29, 2024

It seems all VHDL models require a revision after switching to GHDL. I god a simulator freeze trying to simulate simple schematic containing one demultiplexer device. GHDL gives warning about infinite loop. The same schematic could be simulated with iVerilog without warning. Simple schematics containing logic gates work without problem using GHDL. FreeHDL is crashing on every simulation on my machine, so I cannot compare the result.

Unfortunately, digital VHDL/Verilog design is not my field of expertise. The help in VHDL models revision is highly welcome.

image
image

@iwbnwif
Copy link
Contributor

iwbnwif commented Jan 30, 2024

I don't pretend to know much about ghdl, but I think that each process must have some wait statement to give the simulator a chance to actually output something (unless it has a sensitivity list as is the case of the process which represents the demux block).

In your example can easily work around this problem by appending "wait for 1 ns;" before the "end process;" in the Logic_0 process definition.

Having a quick look, it seems that none of the digital components that generate a pattern do this properly except for the 'digital source' which do to create the timing of their output toggle.

Simplistically, we could hard-code a "wait for 1 ns;" at the end of each relevant vhdlCode() function, e.g. in pad2bit.cpp, pad3bit.cpp, pad4bit.cpp, logic_0.cpp, and logic_1.cpp.

@iwbnwif
Copy link
Contributor

iwbnwif commented Jan 30, 2024

A quick test indicates the only problem remaining is with the R/S flip flop.
image

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

Successfully merging a pull request may close this issue.

3 participants