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
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
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
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
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
Hi, Pls download and install the Oscad from <a href="http://www.oscad.in/downloads" target="" title="here">here</a>.
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.
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.
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.
Login to add comment
Hi,
Please tell me how can i remove following error.
"Node can not be analog and digital.circuit not parsed."
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.
Ngspice gave an error "node can not be both digital and analog "after making changes in script.How can i solve this?
Login to add comment