| |
! D:\EDA\synopsys\Hspice_D-2010.03-SP1\BIN\hspice amplifier.sp > amplifier
D:\EDA\synopsys\Hspice_D-2010.03-SP1\BIN\hspice -i amplifier.sp -o amplifier
D:\EDA\synopsys\Hspice_D-2010.03-SP1\BIN\hspice -i amplifier.sp
注意:
1. 如果网表文件amplifier.sp 不在Matlab的当前工作目录下,则需要给出绝对路径。
2. In matlab you can run a executable file (.exe, .com,...) using command dos.
For executing hspice, I use this line:
[s,w]=dos(['c:\synopsys\Hspice_A-2008.03\BIN\hspicerf.exe r:\netlist.sp r:\output_file']);
[s,w] are some flags which are not important,
netlist.sp - input netlist
output_file - simulation informations
3. Two ways to disable pop up window of Hspice
1). make a shortcut of Hspice.exe and then right click>properties>shortcut tab>run as minimized, then from matlab reference to this shortcut from now on
2). (the way I use myself) before the name of the program (here it is Hspice.exe) type /min
I'm using eval command in Matlab to run windows commands instead of dos command, first I make a string like "& /min hspice -i input.sp& exit&" and then I put this string as input to eval(str)
4. 在环境变量PATH中添加Hspice的路径则在命令行中不需给出绝对路径。比如将D:\EDA\synopsys\Hspice_H-2013.03\BIN;添加在PATH后,则可直接system(['hspice -i amplifier.sp -o sim/amplifier']); 来调用hspice对amplifier.sp进行仿真。