Comments (7)
I need the full *.va
source file to debug this issue. It may be more complex than it seems.
from qucs_s.
I attached the project in my #365 including the ekv26.va.
from qucs_s.
Yes, I confirm this. Qucs-S cannot recognize parameters in this file.
from qucs_s.
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.
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.
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.
from qucs_s.
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)
- Selection Box, Selecting Items and Moving Items Issues HOT 21
- Windows Security Complaints HOT 9
- Nutmeg script text selection issue HOT 5
- Getting the error "No simulation found. Please add at least one simulation!" HOT 1
- Get rid of Q3PtrList wrapper HOT 9
- Automatically add .OPTION INTERP if Parameter sweep + TRAN analysis presents on schematic HOT 1
- Issues Editing Sub-circuit Symbols HOT 13
- New Varactor Library for ngspice HOT 6
- Any updates on single frequency analysis? HOT 1
- New PIN Diode Library for ngspice HOT 2
- Sub-circuit Text Displayed HOT 6
- Data missing from old projects HOT 1
- Parameter Sweep of Varactor HOT 2
- Can't plot the subcircuit node voltage curve when using Nutmeg script HOT 1
- What is the rationale for the 0 dBm voltage value in power source? HOT 3
- Coupled transmission lines HOT 2
- Fill blue devices parameters from SPICE model HOT 9
- Add OP variables dump feature
- Bug: DC simulation does not work HOT 4
- Qucs legacy equation: not editable HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qucs_s.