Have we decided on a quick way to detect RevB vs RevA silicon?
Peter Jakacki
Posts: 10,193
in Propeller 2
I'm sure there is a simple test I can do with the instructions but have we come up with a quick and easy and standard way of detecting the new silicon?
Comments
Eric uses a difference in instruction encodings using PTRx ops. Weren't you doing the same?
Retutns 1 for RevA and 2 for RevB
Still, the storing code is smaller at least.
Oh, bugger, of course, that RDLUT is illegal when using revA assembly! I suppose revA assembly mode should be reserved for old code only anyway. New sources will always be assuming revB with crafted conditionals for revA comparing.
Anybody who has one has a nice paper weight or add a fan and have a desk top heater.
Mike
I like this ptra check much better than the xoro32 check, because it will keep working if there's ever a RevC or RevD. Depending on the values of a PRNG seems dangerous to me.
My code for checking revA vs revB uses another COG, so it doesn't disturb the current one. It's more verbose, but seems pretty robust and is what I used in MicroPython and my VGA driver:
It depends on what you're trying to detect. For many cases you'll want to determine whether the silicon is >= some revision, not exactly equal to some revision. The xoro check shown above only works to detect a specific revision. I suppose you could add a case for "unknown revision", but the code as presented doesn't do that -- it's just checking the high bit of the generated random number and deciding revA / revB based on that, which will fail if revC happens to generate the same high bit as revA.
Unlike RDLUT, XORO32 could be deliberately different for each revision, just need to test more than one bit if RevC and above.
You'd need to check all 32 bits -- which is fine, but please, let's not take shortcuts that can break in future revisions (like testing only 1 or 2 bits).
Yep, anyone can just forget if they want but don't forget that there are 100 revA EVAL boards out there that would be rendered useless by a simple "just forget about them".
It's only because there are people who do things the hard way first that it ends up easy for the rest, whereas if we did things the easy way first, it ends up hard for the rest.
That is an essential truth right there, and its downright sig-worthy.
I wonder if the rdlut instruction RDLUT PTRA,PTRA++ would work, meaning we wouldn’t need to overwrite PA.
Note using PTRB++ would also work.
IMHO I think ignoring those rev1 boards is a mistake for those who ponied up many $ for their boards. It’s way too early to leave them behind where possible. Of course, some things (instructions) just will not work on rev1.
Remember, same could happen to this rev if an obscure major bug turns up. Just sayin...
Off topic
Damn forum sw just kicked me off when I tried to post this and then decided it was time to renter my logon credentials. Lucky for me I have learnt to copy my post to the clipboard
On another note, I have no idea that the assembly/instruction set had changed. I thought it was already set on stone. I hope there will be a rev. C of the chip that passes the OnSemi requirements, though I was happy to see that the new chips consume half the power when compared to the previous iteration. That is already a big improvement, considering that rev. A chips are already low power and good for embedded applications. I'll have to do a current consumption comparison between the two versions, considering a real life use case (prime numbers, eheh).
Kind regards, Samuel Lourenço
Evan did a quite thorough power consumption between rev1 and rev2 chips. The scaremongering P2 power consumption was way overstated for the first rev, and basically the new rev2 has pretty much halved that
BTW I’m not expecting a rev3. If all goes well, that $80K IIRC can be saved including the additional 3 months IIRC again.
The rev2 added a few extra variant instruction to allow the bit instructions to also do a bit range - only applicable if the upper bits b8:5 were not zero, the PTR++ style instructions were fixed and expanded, the streamer mode bits were changed, and there were some ADC changes and additions. It’s all in Chips documents. Oh, and the signed bugs were fixed.
“G” IIRC). Of course this can be overwritten so it would need to be saved somewhere.
It would be a drag to carry Rev A baggage forward into every new effort, since there will always be only 120 of the Rev A chips in the world, amid hopefully millions of Rev B chips.
After the compatibilities are ironed out, and I understand the differences, then I'm okay with leaving revA to rot.
Gary's USB code was a good example. Not that it was me putting the effort in. A large piece of code and there was literally only a couple edits to make, as recommended by Gary, and yet it wasn't working. Being able to flick back and forth between the two boards to confirm nothing else was messed up helped with building certainty of where the problem didn't lie.
That's a bad route Chip, IMHO. That has the same effect of planned obsolescence. I was expecting the instruction set to be set on stone by this date.
Now that I've bought the Rev. B board, I don't have any interest on getting the sample replaced. Plus, there is a historical value on maintaining the board and sample as is.
Kind regards, Samuel Lourenço
RevA returns random data in PTRA
RevB returns contents of LUT
I agree, those boards are not cheap, and they still work.
This is not much effort, and it expands testing, and it's nice to have all practical possible P2 chips alive and working at this stage.
Work on RevIDs will also carry forward, to future RevC etc
Others are targeting both right now. Over a fairly short period of time, Rev A won't matter much.
Maybe a quick archive of the basic tools set aside is all Rev A needs longer term. And we have reasonable tools working on Rev A right now.
For right now, yes. Both make sense.
A few months from now when chips are moving? Does not make sense.
Perhaps you could provide a discounted price for a single Rev B board to any Rev A purchaser instead. If I had purchased a Rev A board I would be mounting it in a framed display case with a write up of how it came to be and it's is capabilities as soon as I received my first Rev B board. Might even add audio and video instead of a written description.
What about read a certain address in the ROM?
This was the first change I saw in the .lst. It may not be the best choice.