Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ghung

  1. ghung

    How to print a signal in signed format with REPORT ?

    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
  2. ghung

    convert signed integer in hex/bin (2's complement) into integer in dec

    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
  3. ghung

    convert signed integer in hex/bin (2's complement) into integer in dec

    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)...
  4. ghung

    convert signed integer in hex/bin (2's complement) into integer in dec

    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
  5. ghung

    Reading in multiple files simultaneously

    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, &quot;<./infile1.txt&quot; ); foreach $line (<IN1>) { if ($line =~ /.../) { ... } } Now I need to read in two files (with same no. of lines) simultaneously and process...
  6. ghung

    TCL online documentation wanted

    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
  7. ghung

    How to do round, roundup and rounddown in Perl

    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

Part and Inventory Search

Back
Top