Menu

#138 dr command hex conversion is wrong

0.17
open
None
5
2023-11-14
2023-11-14
Johnichan
No

I used a 254 bit part (custom ASIC) dr register and found the hex value found incorrect. Is it intentional or accidental? Tagging kawk to get an opinion.

jtag> dr out
00110010000010000010000000000000010001000011111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000001000000000100000001010 (0x00000000000000000000000000000000000000000000000000000028020080A)

As per python here goes the hex

hex(0b00110010000010000010000000000000010001000011111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001010000000001000000000100000001010)
'0xc820800110ff80000000000000000000000000000000000000000028020080a'

jtag> dr in
10101010101010101010101010101010101010101010101010101011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101010101010101010111010101010101010101010 (0x00000000000000000000000000000000000000000000000AAAAAAAAAAEAAAAA)

hex(0b10101010101010101010101010101010101010101010101010101011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101010101010101010101010101010101010101010101010101010101010111010101010101010101010)
'0x2aaaaaaaaaaaaaffffffffffffffffffffffffffffeaaaaaaaaaaaaaaaeaaaaa'

Discussion


Log in to post a comment.