Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Help!
#1

addition (problem solved...bug found in LBP2)

Archive: 7 posts


ok, I am having a strange thing happen.

I have a binary number (14 bit) run through a binary/bcd converter that displays the value numerically. This works fine.

I also have my register set up with an adder so I can add values to it, and this is where it gets strange. When I was testing the setup with a 4 bit register everything went fine. i could add, subtract, whatever.

Now, whenever I pulse in a value to be added it does fine on that bit. On the next bit, any time there is a carry coming in, it behaves strangely. The best i can gather is that the carry in is staying active long enough to be counted twice. which is odd since it is just a single pulse.

let's say I have 150. i add one, and get 151. that's right, but then I do it again and I get 148. next time 149, then 146. When I add 1 it does this +1/-3 pattern repeatedly. If I add 2, it changes to +2/-6.

If I try to subtract 25 from 150, I get 109. Subtracting 50 gives me 68.

Anyone have any ideas?
2011-03-07 22:43:00

Author:
tdarb
Posts: 689


ok, after tons of testing and looking and testing and beating my head I have found the problem. It is a bug in LBP2.

Somehow, some way, the outputs on my microchips got swapped. i don't mean i had them reversed by mistake. They were actually reversed, so that when opened I had one on the right and one on the left, and when closed the one on the right was left and left was right. Everything was connected properly even though they were cosmetically reversed on the closed chip. My value out was still the value, and my carry was still my carry.

I didn't think much of it until I placed a copy over a the chip on a sample counter that was working properly (Identical chips when opened), and the closed chip righted itself so everything was lining up again.

I made a fresh chip and copied both the correct one, and the one from my broken register. I then took both outputs off of each and attached them to circuit nodes directly above where they came of the chip. When opened, sure enough the outputs from my working counter copy were not crossed, but the outputs from the broken register copy were crossed.

I rewired the whole thing on a fresh chip, and checked that nothing is crossing. It works fine now. Apparently that little weird bug was affecting the timing on my adders so that I was actually getting a carry out when the value went from 0 to 1, and was not getting one when it went from 1 to 0. Very strange.
2011-03-08 05:19:00

Author:
tdarb
Posts: 689


Yeah, I encountered this a while ago, didn't really think much of it though. Whenever I open/close large microchips, I do it twice. The first time has the potential to be messed up, but the 2nd time is always correct.2011-03-08 05:35:00

Author:
SSTAGG1
Posts: 1136


For some reason these were staying screwed up. I've saved the bad chip so I can play with it more.

i didn't think it would actually screw up calculations. i wasted 4 hours tracking that down lol.
2011-03-08 05:39:00

Author:
tdarb
Posts: 689


I've noticed this seems to happen when you have chips rotated off from the inputs to the left, outputs to the right orientation. I had one chip which would insist on swapping it's outputs when closed. I flipped the chip that contained it to point in the normal direction, opened it and closed it again, and the problem went away.2011-03-08 21:23:00

Author:
Tygers
Posts: 114


Somehow, some way, the outputs on my microchips got swapped.

Yeah. It's been like that since the beta. Usually occurs when changing the orientation of chips, but I was unable to find a consistent reproduce case, so I never filed a report.

Not that it would've helped, probably, I filed a ton of reports which were never addressed, like chip I/O ports losing their names when you move components around, or merging multiple ports into one, if they're fed from the same source.

This one's not too bad, though, as it's fairly simple to detect and correct.
2011-03-08 21:31:00

Author:
Aya042
Posts: 2870


Tygers, I noticed that too while playing with it today. I was messing with a chip with contsant inputs and constant outputs, so it doesn't really hurt anything and i don't feel like wiring it up a third time just for that. It's that binary to BCD chip I showed you (i rewired it with your three adders). If I rotate it to the proper orientation all of the outputs are in the order they should be, but the inputs flip around; rotate it left and it's the opposite.

Aya, I've had it happen a few times before too. I noticed the swapping, but it's strange that it can affect the timing on the chip as well. I mean, I didn't think just flip flopping the outputs cosmetically would change the way it behaved. Sometimes they stay screwed up no matter what you do short of completely remaking it. That tiny delay that it added was enough to break my setup. lol it's not that bad now that I know what to look for though.

It's very strange.
2011-03-08 21:47:00

Author:
tdarb
Posts: 689


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.