saving . . . saved Not able to simulate a circuit has been deleted. Not able to simulate a circuit has been hidden .
Not able to simulate a circuit
Title
Question
Dear sir,

I am trying to simulate sr flip flop from digitalxspice lib. ngspice has stopped working and not even generate .ckt or .out file for simulation.
So,I try to use d flip flop from digitalXspice lib.Same problem occurred again.

Please find link for project files.
<a href="https://drive.google.com/file/d/0B1w2NuNGLDxJcFYxUXN4dksteHM/edit?usp=sharing" target="" title="link">Link </a>

Regards,
Biren

Oscad General None min None sec 14-06-14, 10:55 p.m. Biren

Answers:

Hi,

Your circuit is working fine i have tested it, Problem is that, project names should not contain numbers. I think it is bug and we will look into it. So, pls rename your project name from test2 to test/any-othername and also rename the file names inside this folder accordingly. Pls let me know if doesn't work.

Thanks!
Shambhu
15-06-14, 4:18 a.m. shambhu


Dear Shambhu,

It's not working .Ngspice has stopped working for this project.Please find following link.
<a href="https://drive.google.com/file/d/0B1w2NuNGLDxJcER0QzBhdDlXclk/edit?usp=sharing" target="" title="link">link</a>

Regrads,
Biren
15-06-14, 10:02 a.m. Biren


Dear Shambhu,

I am trying to simulate above mentioned problem on Windows also. ngspice gave following message
-----------------------------------------------------------
Traceback (most recent call last):
File "C:/OSCAD/OSCAD/kicadtoNgspice/KicadtoNgspice.py", line 1352, in <module>

schematicInfo,outputOption=convertICintoBasicBlocks(schematicInfo,outputOpti
on)
File "C:/OSCAD/OSCAD/kicadtoNgspice/KicadtoNgspice.py", line 1115, in convertI
CintoBasicBlocks
schematicInfo.append(".model "+ compName+" d_srff(rise_delay="+rise_delay+"
fall_delay="+fall_delay+" ic="+ic+"\\n+sr_load="+sr_load+" clk_load="+clk_load+"
set_load="+set_load+" reset_load="+reset_load+"\\n+clk_delay="+enable_delay+" set
_delay="+set_delay+" reset_delay="+reset_delay+")")
UnboundLocalError: local variable 'enable_delay' referenced before assignment

Is there any new version of OSCAD ?I am using live dvd given in workshop.


Regards,
Biren







15-06-14, 10:13 a.m. Biren


Hi, Pls download and install the Oscad from <a href="http://www.oscad.in/downloads" target="" title="here">here</a>.
15-06-14, 5:33 p.m. shambhu


Dear Shambhu,

It's not working.Please let me know your system's os version.I think it's not problem of spice.It's problem of python script which convert kicad schematic to ngspice .I already install latest version of OSCAD on windows also.

15-06-14, 6:19 p.m. Biren


Hi,

I dont't know much about python.I just read python script.
line no :1115 for SR FLIP FLOP

schematicInfo.append(".model "+ compName+" d_srff(rise_delay="+rise_delay+" fall_delay="+fall_delay+" ic="+ic+"\\\\n+sr_load="+sr_load+" clk_load="+clk_load+" set_load="+set_load+" reset_load="+reset_load+"\\\\n+clk_delay="+enable_delay+" set_delay="+set_delay+" reset_delay="+reset_delay+")")

Below lines are for JK FLIP FLOP
line no:1143
schematicInfo.append(".model "+ compName+" d_jkff(rise_delay="+rise_delay+" fall_delay="+fall_delay+" ic="+ic+"\\\\n+jk_load="+jk_load+" clk_load="+clk_load+" set_load="+set_load+" reset_load="+reset_load+"\\\\n+clk_delay="+clk_delay+" set_delay="+set_delay+" reset_delay="+reset_delay+")")
elif compType=="d_dff":

Please note that clk_delay is equal to "+clk_delay+" instead of enable_delay which is not defined for sr flip flop in script.I may be wrong.



15-06-14, 6:50 p.m. Biren
Yes, you are right. Please replace enable_delay with clk_delay in line no 1115 in the python code kicadtoNgspice.py and use it. Thanks for pointing out this.
There should not be any issue if there is a number present in the project name.
19-06-14, 12:18 a.m. rakhiwarriar

Login to add comment


Hi,

Please tell me how can i remove following error.
"Node can not be analog and digital.circuit not parsed."
15-06-14, 7:12 p.m. Biren


Yes, you are right. Please replace enable_delay with clk_delay in line no 1115 in the python code kicadtoNgspice.py and use it. Thanks for pointing out this.
There should not be any issue if there is a number present in the project name.
19-06-14, 12:18 a.m. rakhiwarriar


Ngspice gave an error "node can not be both digital and analog "after making changes in script.How can i solve this?
19-06-14, 9:02 a.m. Biren


Log-in to answer to this question.