How can I convert an error signal to a 0 or 1?
Basically I want to replicate the behavior of one of these two truth tables:
In case you mean error value (i.e. red wire), I believe it isn't possible to implement tables you want using Logisim. The reason is simple: an error is an error, it indicates your circuit is wrong and you have to fix it, so Logisim doesn't allow any mechanism to postprocess error values. Although I allow it may exist some tricky circuit which satisfies your need, but it's more likely a hack rather normal practice.
In case you mean undefined value (i.e. blue wire, I suppose it since you specified 'X' symbol, which usually means undefined value), there is Pull Resistor component from Wiring library which does exactly what you need.
I indeed mean an error value.
What I wanted to do is test a subcircuit for errors, so whenever an error is emitted on the output, the machine should halt.
I already implemented it by directly wiring this output line back to the enable input of my clock generator, which will halt it as soon as an error signal is emitted, so I can find the conflict.
I am having a similar problem. I want Logisim to halt when an error occurs. I have tried hooking it up the way Zom-b did, but when I do that various components (counters, random generators) treat is as enabled and when I and it with the clock I get an oscillation apparent error (as expected).
So basically, what is needed is a gate that that turns error values into true or false so that it can be fed to the enabled inputs of counters and such that could halt the simulation if a subcircuit generates an error. Or a command that would allow you to stop the simulation when an error occurs and bring you to the offending wire.
Log in to post a comment.