I am working on a GPIO IP for Designstart Pro Cortex-M0. Now in my Simulation there are some Read-Modify-Write cycles in order to set only single bits in a 32 bit register.
If the GPIO register is 0x0000000X and I just want to set bit 16, GCC produces [0x0000000X ORRS 0x00010000] and what the ALU makes out of it is then 0xXXXXXXXX.
Is this correct behaviour? I expected the result to be 0x0001000X.
tldr; ALU: [0x0000000X ORRS 0x00010000] = 0xXXXXXXXX
Why are you sure that the GPIO read will produce 0x0000000X? Have all the ports been set to read or read/write rather than write only? For write only it would be better to have a copy of what you expect to be there, orr that and then write that out.
I'm sure because I can trace the signal in the modelsim simulation down to the alu. Also the X in the GPIO is correct behaviour.