Comparison of hex numbers (32'h and 0x) in tcl script -
I am writing a text script (in Qwestishim) which compares below but values are the same but still do not match Any indicator will be helpful for this.
Code snippet:
set XAPADR 0xffff0000 set edit "SIM: / TB_top / dot_top / m1 / m2 / m3 / acer" set actual edder "[check -HEX $ ADR] "If {$ realm == $ XAPDR} {" ADRD match detected @ time [XPR $ now / 1000000.0] puts us ") {other" ADRAD matches do not know @ time [ XPR $ now / 1000000.0] puts us "$ put $ $ $ XAPRR"
Result:
Address must be decoded. This is a work for scans
, one of Tcl's lightweight arbitrary superheroes!
You can now get numeric comparison ( == < / Code>) should be able to compare with 0xffff0000. As a bonus, you get the number of actual bits in the value (stored in the
bitwidth
variable).
Comments
Post a Comment