wildgoat的个人空间 https://blog.eetop.cn/wildgoat [收藏] [复制] [分享] [RSS]

空间首页 动态 记录 日志 相册 主题 分享 留言板 个人资料

日志

[Hspice] Printing Non-electrical Variables in Verilog-A to the Waveform File

已有 5044 次阅读| 2013-8-23 13:27 |个人分类:Hspice

Question:
How can I dump the values of non-electrical Verilog-A variables to the waveform.
file?

Answer:

1. Set the environment variable HSP_VACOMP_OPTIONS -G at the command prompt
(on UNIX/Linux).

% setenv HSP_VACOMP_OPTIONS -G

2.  Add a .PROBE statement to the top level SPICE netlist to print the
variables.

   Example: 
     .probe tran X1:a    $ "X1" is Verilog-A instance name and "a" is variable

Sample netlist example
**********************
******************Top level Spice netlist*******************
*******************res.sp***********************************
*Title: Simple Verilog-A Resistor
.hdl rs.va
.options post=1
X1 1 0 resistor r=2
VS 1 0 10
.tran 1n 100n
.probe tran X1:a
.end
**********************************************************
verilog A code
************rs.va*****************************************
// Simple resistor
`include "disciplines.vams"
module resistor(p,n);
integer a,b;
parameter real R=1.0 from (0:inf);
inout p,n;
electrical p,n;
analog
begin
b=3;
a=b;
V(p,n) <+ I(p,n)*R;
end
endmodule
*************************************************************
Question:I want to save Verilog-A variable and parameters in my simulation output files. I used the following statement in the netlist: .option vaopts='-G' However, I get the following error: hsp-vacomp: hsp-vacomp: Usage: hsp-vacomp [options...] [inputfile] How do I correct this?

Answer:

Make sure that HSPICE parses the -G argument as a string. To do this use the following option statement: .option vaopts=str(`-G`) If you want to set more than one argument, then you can set it in the same option statement as in the following example: .option vaopts=str(`-G -B`)
T-Spice 15 User Guid, P326
___________________________________________________
vaopts
.option vaopts = “options”
Default Value
None
Description
Passes options to the vacompcompiler.
Note that the default vacompoptions are adequate for almost all situations. The ability to set vacomp
options with the .option vaoptscommand is provided for advanced users only, and should be used with
caution.
Strings of multiple options must be enclosed in quotes. For example: .option vaopts=“-strict -G”.
The options are:
-f Disable run-time floating point checking
-o file Specify compiled model library file name (defaults to inputfile.cml)
-strict Reject non-compliant language extensions
-B Force state variable creation for named branches
-D x Define preprocessor macro xwith value 1
-D x=y Define preprocessor macro xwith value y
-E Run preprocessor; output to stdout
-G Make all variables available for output
-I directory Prepend directoryto include search path
-M Generate dependency file
-N Suppress banner reporting
-P file Run preprocessor; output to file
-U depth Unroll genvarloops to level depth(0 .. no unrolling)
-V level Status message reporting level; level= 0..2 (default 1)
-W level Warning message reporting level; level= 0..2 (default 1)
___________________________________________________

点赞

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 注册

  • 关注TA
  • 加好友
  • 联系TA
  • 0

    周排名
  • 0

    月排名
  • 0

    总排名
  • 0

    关注
  • 122

    粉丝
  • 42

    好友
  • 272

    获赞
  • 118

    评论
  • 22101

    访问数
关闭

站长推荐 上一条 /2 下一条

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-20 00:32 , Processed in 0.015617 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
返回顶部