Git Product home page Git Product logo

Comments (7)

ra3xdh avatar ra3xdh commented on September 22, 2024

I need the full *.va source file to debug this issue. It may be more complex than it seems.

from qucs_s.

dwarning avatar dwarning commented on September 22, 2024

I attached the project in my #365 including the ekv26.va.

from qucs_s.

ra3xdh avatar ra3xdh commented on September 22, 2024

Yes, I confirm this. Qucs-S cannot recognize parameters in this file.

from qucs_s.

dwarning avatar dwarning commented on September 22, 2024

I looked into certain files and saw blocks for skipping comment blocks from va files, e.g. vafile.cpp. This seems not to work. Which file is used for reading the va file parameter names and values to include in the json files?
BTW - Because latest cmc models using macros for instance and model parameters I am looking for a general solution in transform these model through a preprocessor into an expanded format. Maybe openvaf --print-expansion would be a candidate, but there are missing LF in the output at the moment.
Your opinion?

from qucs_s.

dwarning avatar dwarning commented on September 22, 2024

May be it helps:
With the beta version of VAMPyRE (rel. in December) by Geoffrey Coram from CMC is it possible to preprocess any Verilog-A file. As a result you have a file with pure va text belong the VA standard 2.4 and striped any comment lines.
The parameter section will then have entries like, here summarized as examples:
`
parameter vto = 0.5; <- parameter default real type

parameter real vto = 0.5;

parameter real vto = 0.5 from( -inf : inf );

(desc= "Vth") parameter real vto = 0.5 from( -inf : inf );

(units= "V" , desc= "Vth") parameter real vto = 0.5 from( -inf : inf );

(units= "C" , type="instance" desc= "device deviation temp") parameter real dtemp = 0.0 from( -inf : inf );
`

Then I used a slight modified function Schematic::savePropsJSON
` QString module;
QStringList prop_name;
QStringList prop_val;
// QStringList prop_desc;
QTextStream vastream (&vafile);
while(!vastream.atEnd()) {
QString line = vastream.readLine();
line = line.toLower();
if (line.contains("module")) {
auto tokens = line.split(QRegularExpression("[\s()]"));
if (tokens.count() > 1) module = tokens.at(1);
module = module.trimmed();
continue;
}
if (line.contains("parameter")) {
auto tokens = line.split(QRegularExpression("[\s=;]"),qucs::SkipEmptyParts);
if (tokens.count() >= 4) {
for(int ic = 0; ic <= tokens.count(); ic++) {
// if (tokens.at(ic) == "desc") { // ToDo: extra loop over desc tokens?
// prop_desc.append(tokens.at(ic));
// }
if (tokens.at(ic) == "parameter") {
prop_name.append(tokens.at(ic+2));
prop_val.append(tokens.at(ic+3));
break;
}
}
}
}
}
vafile.close();

`
Sorry my C++ programming skills are very limited. So if the token parameter comes e.g. in a $strobe or in a comment the function still fabricates nonsense for the symbol json files.
It is possible to work w/o the Python tool from Geoffrey but then the effort in parsing the va file is enormous.
I let in the commented prop_desc filling as a placeholder.

I hope the formatting for code will not disturb the text.

from qucs_s.

tomhajjar avatar tomhajjar commented on September 22, 2024

I found two old Verilog files from Qucs that seem to work. bsim3v34nMOS.va and bsim3v34pMOS.va

It's not obvious why these two files work and ekv26.va doesn't. Maybe they will help figure out the issue.

See #384 for more info on these files.

Verilog files.zip

from qucs_s.

ra3xdh avatar ra3xdh commented on September 22, 2024

I decided not to fix this, but use the workflow proposed in #411 instead. It is free of parsing issues and allows any Verilog-A syntax extensions that OpenVAF can accept. New RCLDQM devices also could be mapped to N letter representing Verilog-A device. See #349 and #431 Old workflow with JSON files and Verilog-A parser should be kept only for backward compatibility with Qucsator/ADMS and not recommended for new design. Closing this as won't fix.

from qucs_s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.