and now my tb works again
# caravel
m
and now my tb works again
g
Doing |= isn't actually reading the set value of the LA for the or but reading back whatever comes back from the LA and then oring it
So if your LA connections don't loop back that bit or you don't have input enabled set, it won't work
👍 1
probably the most robust way is to do |= on a temporary variable and then set the LA data to that
m
I'm interested to know why it doesn't work anymore tho. Maybe that shows something important has changed in caravel that we should be aware of
g
I'm more surprised it ever worked
m
Not sure about that as there is the write and read register that are separate. So the |= should read what is already set
g
wait, mprj_datal isn't the logic analyser
m
Doh
Yeah not the la , The io
g
That doesn't have a split read/write
1
so I guess something has changed that's stopped the reading back from working...
m
Yeah. And management and caravel repos have both had a few updates since mpw7.
t
The one thing that changed significantly and is probably involved here: From MPW-7 and before, the housekeeping module communicated with the GPIO via a one-pin interface. That interface could be either input or output, but not both. When writing to the GPIO, the CPU would write to the housekeeping module GPIO data register, and for any GPIO that was configured as an output, it would see that signal, and for any GPIO configured as an input, nothing would happen. When reading from the GPIO, the CPU would read directly from the GPIO if the GPIO was configured as an input, and would read from the housekeeping register if the GPIO was configured as an output. Your code relies on that last part: You can read back what you wrote out, modify it, and write it back out again, for any of the GPIOs that are configured as inputs.
After MPW-7 (or as of MPW-7, I think) we identified that the timing of signals to and from the GPIOs was extremely long, and the one-pin interface made it impossible to buffer the lines to improve signal integrity, because you can only buffer a line whose direction you are certain of. So to maintain signal integrity out to the pads that are farthest away from the CPU, I had to change the behavior to a two-pin interface, always with one signal for reading, and one signal for writing. Then both signals can be buffered. I expect the difference is that because of the change in interface, if you read from a GPIO that is set to output, you will now read directly from the GPIO and not from the local register. You should be able to read the value back, but you will definitely need to have the GPIO set to bidirectional mode so that both the output and input drivers are enabled. Otherwise you're not going to get anything meaningful back from the input driver of the GPIO pin.
m
Thanks Tim