writeva
Generate Verilog-A description of rational
object
Description
writes a Verilog-A module that describes a 1-port rational object, status
= writeva(h
,filename
,innets
,outnets
,discipline
,printformat
,filestoinclude
)h
to a
file specified using filename
argument.
The function, writeva
implements the object in Verilog-A using
Laplace transform S-domain filters and returns a status
of
True
, if the write operation is successful, and
False
, if the write operation is unsuccessful.
Examples
Write Verilog-A Description of Rational Object
Create a S-parameters object from the S-parameter data and frequency.
S = sparameters(0.5,2.4e9);
Perform rational fitting of the S-parameters.
h = rational(S);
Write Verilog-A description of an rational
object.
status = writeva(h,'oneportS', ... 'line_in', 'line_out', 'electrical', '%12.10e', 'disciplines.vams')
status = logical
1
Input Arguments
h
— Rational function object
1-port rational
object
Rational function object, specified as a 1-port rational
object.
filename
— Verilog-A file name
.va
(default) | character | string scalar
Verilog-A file name to which to write the module, specified as character vector or string scalar.
The filename
can be specified with or without a path name and
extension. The default extension, .va
, is added automatically if
filename
does not end in this extension. The module name that is
used in the file is the part of the filename
argument that remains
when the path name and extension are removed.
innets
— Name of each of module's input nets
'in'
(default) | character vector | string scalar
Name of each of the module's input nets, specified as a character vector or string scalar.
outnets
— Name of each of module's output nets
'out'
(default) | character vector | string scalar
Name of each of the module's output nets, specified as a character vector or string scalar.
printformat
— Precision of Verilog-A module parameters
'%15.10e'
(default) | character vector | string scalar
Precision of the following Verilog-A module parameters using the C language conversion specifications, specified as a character vector or string scalar. The C language conversion specifications includes:
The numerator and denominator coefficients of the Verilog-A filter.
The module's delay value and constant offset (or direct feedthrough), which are taken directly from the rational function object.
For more information on how to specify printformat
, see the
Format specification for fprintf
.
discipline
— Predefined Verilog-A discipline of nets
'electrical'
(default) | character vector | string scalar
Predefined Verilog-A discipline of the nets, specified as a character vector or
string scalar. The discipline
argument defines attributes and
characteristics associated with the nets.
filestoinclude
— List of header files to include in module using Verilog-A 'include'
statements
'include discipline.vams'
(default) | character vector | string scalar
List of header files to include in the module using Verilog-A
'include'
statements, specified as a character vector or string
scalar.
Note
The write
function only accepts a single
rationalfit
object. It does not work with an array/matrix of
rationalfit
objects,
Output Arguments
status
— Status of write operation
True
| False
| logical vector
Status of write operation, returned as a logical vector. The argument,
status
returns True
, if the Verilog-A write
operation is successful, and False
if the Verilog-A write operation
is unsuccessful.
Version History
Introduced before R2006aR2022a: writeva
function will support only one-port rational
object
Starting in R2022a, the writeva
function will support only one-port
rational
object.
When you open a model created before R2022a that contains the
writeva
function using a two-port rational
object,
the software throws an error asking you to update your code with a one-port
rational
object in the writeva
function.
See Also
rfmodel.rational
| rationalfit
| timeresp
| stepresp
| freqresp
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)