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

Bring digital simulation back to Qucs-S #97

Closed
9 tasks done
ra3xdh opened this issue Jul 3, 2022 · 11 comments
Closed
9 tasks done

Bring digital simulation back to Qucs-S #97

ra3xdh opened this issue Jul 3, 2022 · 11 comments

Comments

@ra3xdh
Copy link
Owner

ra3xdh commented Jul 3, 2022

The Ngspice team is currently developing the support for U devices from PSPICE representing digital blocks. This feature is expected in Ngspice-38 release. The support for U devices makes possible to bring the digital components back to Qucs-S. Currently digital devices are hidden as SPICE-incompatible.
Holger @holvo , please let me know, when the U-devices will be ready to start its implementation in Qucs-S GUI.

TODO list in order to revert digital simulation for Qucs-S

  • Add XSPICE logic gates models
  • Add XSPICE flip-flop models
  • Add SPICE entries for digital sources in analog mode
  • Revert optional fully digital simulation mode using iverilog
  • Backport qucsveri script from the Qucs-0.0.20-rc1. This script is needed to start the iverilog
  • Backport qucsconv utility that is needed to convert VCD files to Qucs XML dataset
  • Revert hidden digital devices to components panel
  • Fix remaining issues with default delay time and show netlist mentioned in Bring back digital modeling #272
  • Add tutorial section on digital simulation; old Qucs tutorial is not valid anymore
@ra3xdh
Copy link
Owner Author

ra3xdh commented Oct 4, 2022

I have started the implementation of the digital devices based on the recent Ngspice-38. Two devices are back: ideal inverter and NAND gate. The manual build of the Ngspice from pre-master branch is required. Everything seems to work as expected. I have pushed the code to the digital branch https://github.com/ra3xdh/qucs_s/tree/digital The attached screenshot illustrates the operation of the RC-generator based on logical gates.
image

@ra3xdh ra3xdh added this to the 1.0.1 milestone Oct 31, 2022
@ra3xdh ra3xdh modified the milestones: 1.0.1, 1.0.2 Feb 4, 2023
@ra3xdh ra3xdh mentioned this issue Feb 28, 2023
1 task
@ra3xdh
Copy link
Owner Author

ra3xdh commented Apr 21, 2023

The trigger devices were added by #262 Here is frequency divider example involving D-trigger device.
image

@ra3xdh
Copy link
Owner Author

ra3xdh commented Apr 23, 2023

I have added a TODO list for this issue.

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 4, 2023

SPICE entry for digital source in analog mode was added by #265

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 19, 2023

I have faced a problem during backporting qucsconv from Qucs latest RC. This utility depends on qucsator and libqucs.so. Also it shares a large part of the code with qucsator. It makes the adding of qucsconv much more difficult that expected.

@ra3xdh ra3xdh assigned ra3xdh and unassigned ra3xdh May 19, 2023
@ra3xdh
Copy link
Owner Author

ra3xdh commented May 21, 2023

I have failed to make a full backport of the qucsconv tool, because it depends on almost half of Qucs-S code. I had to restrict only to VCD files support and renamed the utility to vcd2qucsdat. I also renamed the wrapper scripts to avoid name conflict with old Qucs package. The new names for the wrapper scripts are:

qucsdigilib => qucs_mkdigilib
qucsdigi => qucs_run_hdl
qucsveri => qucs_run_verilog

The code is available here: https://github.com/ra3xdh/qucs_s/tree/revert_qucsconv_qucsdigi I will merge everything to the current branch once @Radvall finishes work on revert digital devices to Qucs-S GUI.

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 25, 2023

The #272 implements the digital simulation mode using Verilog/VHDL. The remaining tasks are to revert hidden digital devices in the components panel and fix small issues found during testing of #272. I have updated the TODO list.

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 25, 2023

I have made the hidden digital devices visible again.
image

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 26, 2023

I have fixed netlist view and default delay time for logic gates mentioned in #272. It remains to add a tutorial section on digital simulation.

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 27, 2023

I have documented digital simulation in the Qucs-S tutorial. I will upload an updated tutorial to the Qucs-S website once the digital simulation feature will be released.

@ra3xdh
Copy link
Owner Author

ra3xdh commented May 27, 2023

Now all the feature of the Qucs-S-0.0.20-RC1 regarding digital simulation are backported to the Qucs-S. Closing this ticket as completed. This feature will be available since the next release.

@ra3xdh ra3xdh closed this as completed May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant