ra3xdh/qucs_s

Migrate C++ hardcoded devices to XML

Opened this issue · 4 comments

This is a long term development task for the next year. There exists a rejected PR for old Qucs: Qucs/qucs#659 It allows to show XML defined devices on the left panel. This will reduce the compile time and allow to get rid of the most C++ hardcoded devices. The simulations and some other components must remain on the C++ level. Some SPICE devices requires to make computations and look into the parent schematic to generate the netlist entry. But the most of C++ devices could be migrated to XML definition.

The following tasks must be resolved:

  • It's need to define what XML to use. Qucs XML or true XML. Maybe accept Caneda library XML format: https://github.com/Caneda/Caneda
  • It's need to align this with the planned task for adding PDKs support: #876
  • Provide an easy way to add a new device without text editor
  • Need to be aligned with #974

@ra3xdh great to hear this news. It would be a great to make it done. Standardizations also sounds good.
I do not know if it is possible but would be great to define a symbol with standard geometry (you have right now standard geometries hardcoded in C++ in the microelectronics section) and instantiation scheme (with some default parameters).
Also a feature to have kind of checks if a parameter is within a certain range would be more than welcome.

Standardizations also sounds good.

Well observed. Beyond that, standardisation is key, and a lot of work. But useful standards already exist and Verilog-A is one of them... XML is markup, not format. You need to define the semantics. Wrapping data into XML could be a first step on a learning curve. Save your time by asking "how would the corresponding Verilog look like".

Also a feature to have kind of checks if a parameter is within a certain range would be more than welcome.

Verilog-A does not only define syntax for parameters with ranges, but also specifies the data types, including arrays, and an expression syntax. It describes how overrides work and allow for effective use in binning and speed improvements (paramset). A useful file format will also have to play nicely with SPICE, i.e. replace model cards.

See pascalkuthe/OpenVAF#42 for some hope, advice, and background. The Qucs roadmap also involves standardisation.

@felix-salfelder I have read your proposal about unified schematic file format here: Qucs/qucs#1094 At the current time nothing is implemented except the intention to develop a new format. A lot of work is ahead. And you have to implement everything from scratch. I have no wish to participate in the new schematic format implementation (C++ level) development. I would wish you good luck with this task. I don't consider the changing of existing schematic format in Qucs-S at the moment. Maybe only switching the markup language to the true XML in the long perspective. Surely not to the format that doesn't exists yet.