Page 1 of 1

Strange behaviour with 32 bit, splitter and NOT gates

Posted: Wed Oct 01, 2014 9:47 am
by Volvagia
Hello.
I'm not sure, whether this is my or the applications fault.
After I have build a 4 Bit-CPU, I would try to build a 32 Bit.

But when I click on this wire at runtime to show his currently data,

Image

I get mostly AssertionFailed-Exception,

Code: Select all

LogicCircuit.AssertException: AssertionFailed
   bei LogicCircuit.CircuitFunction.ToText(IEnumerable`1 probeState, Boolean showFormatPrefix)
   bei LogicCircuit.WireDisplayControl.TimerTick(Object sender, EventArgs e)
   bei LogicCircuit.WireDisplayControl.Start()
   bei LogicCircuit.EditorDiagram.SymbolMouseDown(Symbol symbol, MouseEventArgs e)
   bei LogicCircuit.EditorDiagram.DiagramMouseDown(MouseButtonEventArgs e)
   bei LogicCircuit.Mainframe.DiagramMouseDown(Object sender, MouseButtonEventArgs e)
sometimes a IndexOutRangeException:

Code: Select all

System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
   bei LogicCircuit.CircuitFunction.Binary(IEnumerable`1 probeState)
   bei LogicCircuit.CircuitFunction.ToText(IEnumerable`1 probeState, Boolean showFormatPrefix)
   bei LogicCircuit.WireDisplayControl.TimerTick(Object sender, EventArgs e)
   bei LogicCircuit.WireDisplayControl.Start()
   bei LogicCircuit.EditorDiagram.SymbolMouseDown(Symbol symbol, MouseEventArgs e)
   bei LogicCircuit.EditorDiagram.DiagramMouseDown(MouseButtonEventArgs e)
   bei LogicCircuit.Mainframe.DiagramMouseDown(Object sender, MouseButtonEventArgs e)
("The index was out of array bounds")

And (my real problem), all more significant bits on the multiplexer left above are not connected because the NOT-Gate on the deeper lying 2-bit-multiplexer do not connect/negate his input. But the sub-multiplexer on the lower significant bits of the 32 Bit-MUX use exactly the same circuits.

I don't know what I should do.

Thank you

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Wed Oct 01, 2014 3:20 pm
by admin
The problem is understood. If you need to monitor values in this wire or any other that is failing please use probe instead. I’ll fix the issue and make it available in the next release.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Thu Oct 02, 2014 9:24 am
by Volvagia
Thank you

But why doesn't work the NOT Gates on the 2:1 multiplexers on the lowest "layer" of the 32 bit-multiplexer for the higher 16 bits of the data coming from "Register File"? Is this the same problem?

Image

By the way, I have seen that the truth table generation throws an AssertionFailed-Error too, if the circuit use Tristate and an Out-Port become a high impedance/not connected-signal.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Thu Oct 02, 2014 11:17 am
by admin
The not gates are working fine in this case. What you see is result of optimization. Your output from Register file is connected to splitter and only lower bits are connected. The upper bits are not. So the optimizer removed all the gates that are not delivering results to anything user can see.
The issue with truth table is bug also.
Thank you for finding all these bugs.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Thu Oct 02, 2014 12:15 pm
by Volvagia
Thank you for this great application. :)
Sorry, I have overlooked/forgotten, that the ROM has "only" up to 16 address lines.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Fri Oct 03, 2014 10:20 pm
by admin
Sure, BTW if you building CPU and want to program it with assembler language; there is a universal macro assembler where you define commands same way you define any other macro or writing program.
If interested you can download it here: https://bitbucket.org/EugeneLepekhin/fusion/downloads
In the zip file there is a small document explaining the language.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Tue Oct 07, 2014 7:35 pm
by admin
You get the new version with the two bugs fixed and whole bunch of new features added.

Re: Strange behaviour with 32 bit, splitter and NOT gates

Posted: Fri Oct 10, 2014 12:11 pm
by admin
BTW I’ve found short wire connecting two Nor inputs on AU Nor(86, 31). The wire is between pin 3 and 4. I guess you did not mean to have it.