Hi,
I need to print a signal value (signed) with the REPORT syntax. Can you tell me the easiest way? thanks a lot!!
Gary
Gary Hung
ASIC Design Engineer
Thanks Andrew ! it's cool !
Duncan, below is a link about signed integer.
http://www.evergreen.edu/biophysics/technotes/program/2s_comp.htm
Gary Hung
ASIC Design Engineer
Thanks Duncan and Andrew. For example,
dec hex bin
24 18 0001_1000
-24 E8 1110_1000 (2's complement of 0001_1000)
printf( "num in dec : %d \n", hex(18) );
num in dec : 24
printf( "num in dec : %d \n", hex(e8) );
num in dec : 232 (which I actually want to get -24)...
Hello Folks,
How can I convert a signed integer in hex or bin into integer in dec? hex() seems to treat number as non-signed only.
Many thanks!
Gary
Gary Hung
ASIC Design Engineer
Hi Folks,
I used to read in one file (unknown size)at a time and process each line one by one, like this:
open( IN1, "<./infile1.txt" );
foreach $line (<IN1>) {
if ($line =~ /.../) {
...
}
}
Now I need to read in two files (with same no. of lines) simultaneously and process...
Hello folks,
I am new to TCL and looking for a good TCL site which gives good command reference and examples so that I can pick it up quick.
Thanks in advance!!
Gary
Gary Hung
ASIC Design Engineer
Hi Folks,
I am new in Perl and in this forum. I would like to round my decimal number to the nearest integer but I couldn't find such kind of built-in function in perl. Also how about roundup and rounddown? Any comment is highly appreciated.
Many thanks!
Gary
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.