EXAPUNKS

EXAPUNKS

View Stats:
Spoiler - Synchronisation issue on MITSUZEN HDI-10
Fails on test run 59... I presume it's some sort of synchronisation issue between the reads from XA's m register by both XB and XC.

XB reaches destination host a few ticks before XC. XB's code path is slightly less steps than XC's but both read from XA's register and require that the reads from XA's register are in order [XB, XC, XB, XC, XB, XC, XB...]

So my hunch is that over time, the 2 reader exos are getting out of sync with the writer exo. However, if this was the case, I would expect to see this fail every test case at the same step, but it only happens on test case 59 (so far).

XA
LINK 800 MARK READ COPY #NERV X DIVI X 10 X MULI X -1 X COPY X M COPY X M JUMP READ

XB
LINK 800 LINK 1 LINK 1 MARK READ COPY M X COPY 40 #NERV SUBI X 1 X MARK WRITE TEST X = 0 TJMP READ SUBI X 1 X COPY -70 #NERV JUMP WRITE

XC
LINK 800 LINK 3 LINK 3 MARK READ COPY M X COPY -70 #NERV SUBI X 1 X COPY 40 #NERV SUBI X 1 X MARK WRITE TEST X = 0 TJMP READ SUBI X 1 X COPY -70 #NERV JUMP WRITE

Anyone can help?
< >
Showing 1-2 of 2 comments
Your hunch is correct, the EXAs are falling out of sync until the faster one ends up reading the same value twice before the slower one can get it. You don't see it consistently happen on every test since the parameters are different, test 59 is where it gives you a bunch of loops short enough to allow the desync to happen. They're only barely drifting so when the nerve readings are spaced out enough you get lucky, but this is why it gives you 100 different test cases to expose bugs.

I was able to fix your code to pass all tests, here's hints if you want them:
The desync happens because one of them is fast and one of them is slow.
Watch the output values as the code runs to see which one is ahead and which is behind.
Can you make them the same speed?
If you can't figure out how to speed up the slow one, you could just slow down the fast one.
Originally posted by Year of the Linux handheld:
Your hunch is correct, the EXAs are falling out of sync until the faster one ends up reading the same value twice before the slower one can get it. You don't see it consistently happen on every test since the parameters are different, test 59 is where it gives you a bunch of loops short enough to allow the desync to happen. They're only barely drifting so when the nerve readings are spaced out enough you get lucky, but this is why it gives you 100 different test cases to expose bugs.

I was able to fix your code to pass all tests, here's hints if you want them:
The desync happens because one of them is fast and one of them is slow.
Watch the output values as the code runs to see which one is ahead and which is behind.
Can you make them the same speed?
If you can't figure out how to speed up the slow one, you could just slow down the fast one.

I actually managed to fix it by adding 2 noops between the first "COPY X M" and the second "COPY X M" of XA
< >
Showing 1-2 of 2 comments
Per page: 1530 50