Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor exception printout bug #256

Open
garankonic opened this issue Oct 21, 2021 · 0 comments
Open

minor exception printout bug #256

garankonic opened this issue Oct 21, 2021 · 0 comments

Comments

@garankonic
Copy link

When an error code is printed as shown in the line below
20-10-21 17:19:46.696948 [7f23d1dbe700] ERROR - Bad response code (0x4 = 'bus error on read') received for Incrementing read at base address 0x41000014 (offset 0x1, node "user.timecon.tcds_sinerr_count"). URI: "chtcp-2.0://bridge:10203?target=amc:50001". Sent/received headers: 0x21b3010f / 0x21b30104 (25/25 bytes into IPbus payload)
Note 0x41000014 (offset 0x1, node "user.timecon.tcds_sinerr_count") - the register name is not printed correctly as the exception handler interprets "aWordCounter" as the offset and prints name for the register 0x41000015.
https://github.com/ipbus/ipbus-software/blob/master/uhal/uhal/src/common/ProtocolIPbusCore.cpp#L102
I believe that the expression aBaseAddress + ( (aType == NI_READ) or (aType == NI_WRITE) ? 0 : aWordCount) has to contain aWordCount-1
Was spotted when throwing an exception with the register that I am never using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant