Software I'm working on requires simulation of logic circuits, both combination and sequential.
Now the simulation doesn't need to be too detailed, in fact it could be detrimental to the function of software, it only needs to simulate the logic itself and not properties of individual transistors, other elements and their respective voltages, current, resistance etc.
The primary concern is accuracy and secondary is performance.
This leads to interesting issue.
On one hand I could use existing SPICE solution, build an abstraction on top of it and ignore every aspect of circuits I don't care about. That would ensure the accuracy, but it would require me to familiarize, in depth, with the library in question. It could also lead to issues with license, depending on library used.
Not to mention the performance hit, caused by simulating things I don't need.
Or I could write my own simulation solution, doing only things I want, with no licensing issues and optimized for performance. The trouble is, that I'm not an electrical engineer. And I'm afraid that I might overlook some critical aspect of the matter.
And obviously, implementing my own solution could very well take more time than building abstraction layer on top of existing one.
So the question is which one should I use? Is there any other angle I should consider?
-
Are you just simulating the combinations of AND/OR/NOT etc gates? Do you need to care about timing?GoatInTheMachine– GoatInTheMachine2018年08月17日 12:47:05 +00:00Commented Aug 17, 2018 at 12:47
-
Since I'm working with sequential circuits the timing does play a role, yes.user1561358– user15613582018年08月17日 12:54:39 +00:00Commented Aug 17, 2018 at 12:54
-
Do you need to propogate just true/false from one component to the next, or levels? What components do you need to consider?GoatInTheMachine– GoatInTheMachine2018年08月17日 14:35:41 +00:00Commented Aug 17, 2018 at 14:35
-
1Just use LTSpice like everyone elsewhatsisname– whatsisname2018年08月17日 17:56:01 +00:00Commented Aug 17, 2018 at 17:56
-
@user1561358: define timing. Does timing mean "this block happens after this other one" or does it mean "this gate takes 5ns to change state and this other one takes 3ns, and it takes 4ns for the signal to move down the wire, etc"?whatsisname– whatsisname2018年08月17日 21:12:30 +00:00Commented Aug 17, 2018 at 21:12
1 Answer 1
From the sound of it you dont seem to quite know what it is that you want/need. In one sentence you talk about only caring about the functions of the pièces and not the physical properties and the such, but in the next segment you begin to say that you believe you might need an electrical engineer to cover all edge cases.
If all you need is the basic logic of the pieces you want to simulate then you don't even need to abstract very far at all, a simple "piping" of outputs for one piece to the inputs of others. If you need more detail than that, say the timing that certain pieces may take to activate, or what have you then the pre-built solution is likely better as you won't need to do all the research required to get the timing correctly.
-
>you might need an electrical engineer to cover all edge cases Well that's the thing, I don't know for sure. Since I'm not an electrical engineer.user1561358– user15613582018年08月17日 13:52:15 +00:00Commented Aug 17, 2018 at 13:52
-
1You dont need an electrical engineer to know what your requirements are. Do you need to only emulate the functionality or the physicality as well?TurtleKwitty– TurtleKwitty2018年08月17日 13:56:00 +00:00Commented Aug 17, 2018 at 13:56
-
"a simple "piping" of outputs for one piece to the inputs of others" - your system will explode when you attempt to include flip-flops.whatsisname– whatsisname2018年08月18日 00:52:10 +00:00Commented Aug 18, 2018 at 0:52
-
@whatisname If you only calculate upon a change of state then no, it would not break at all. Of course it all depends on how things are programmed but either way a simple system is always a good starting pointTurtleKwitty– TurtleKwitty2018年08月18日 16:09:32 +00:00Commented Aug 18, 2018 at 16:09
Explore related questions
See similar questions with these tags.