This ol' REV just ain't what it used to be.... what else ain't what it used to be?
Peter Jakacki
Posts: 10,193
I was a little surprised to find what I thought was a bug with the REV instruction as I expected to work just like the old one. Turns out that this one is "crippled" in that it simply reverses all the bits from the source into the destination. I can't see why we couldn't have it work the way it used to work but are there any other "surprises" out there in P2ville?
Comments
LONG answer: Because that's the way Chip wants it. Now, get back to work:)
Huh? (as in "bonus")
The problem is that REVision B does not replace REVision A, it should have been a new instruction in addition to the old.
vs
Other than the confusion with the P1 version, I think the P2 version makes more sense. It now does precisely what the mnemonic implies. And I think the P2 code is more clear as to intent.
Well that is a matter of viewpoint I think because I noticed that you copied your source into the destination before the REV in the P1 version but that is not how I have ever done it so it really was a single operation before and now I need two instructions in the new improved P2 to do what I did in one in the old "inferior" P1.
New version is better, if we were starting over.
But, I've become a fan of making it easier to port from P1 to P2.
So, I guess I'm on the fence for this one...
It does look like 2 opcodes, and the P2 variant is likely smaller and faster, so that may be part of the reason for the change.
Maybe it needs a new name ?
A P1-version could be synthesized in the assembler, if there is not silicon room.
I'm inclined to say we modify the P2 name, and leave it at that, perhaps including a P1 compatable snippet in the docs.
REVSD for the new one?
Depending on the FPGA version (IV,V or Max10) it looks like the barrel shifter is the first thing to go erratic.
In case you missed it in the other threads, I have started a couple tables/grids to document the differences between P1/P2 (from the perspective of moving from P1 to P2). It's in your GDoc:
https://docs.google.com/document/d/1O27nO2tMjBTvUNblFFRtEp5DHvcvsSGXcPvH9FaJ9u8/edit#bookmark=id.n1suwwbjxuk4