Archive for July, 2008

To rename a bunch of files in a folder use the rename command. This example shows how to add a suffix for all files matching the ‘x*’ pattern:

user@user-laptop:~/data$ ls
x    x-10  x-12  x-14  x-16  x-18  x-2   x-21  x-23  x-25  x-27  x-29  x-30  x-32  x-34  x-5  x-7  x-9
x-1  x-11  x-13  x-15  x-17  x-19  x-20  x-22  x-24  x-26  x-28  x-3   x-31  x-33  x-4   x-6  x-8
user@user-laptop:~/data$ rename 's/(x.*)/$1.dat/g' *
user@user-laptop:~/data$ ls
x-10.dat  x-13.dat  x-16.dat  x-19.dat  x-21.dat  x-24.dat  x-27.dat  x-2.dat   x-32.dat  x-3.dat  x-6.dat  x-9.dat
x-11.dat  x-14.dat  x-17.dat  x-1.dat   x-22.dat  x-25.dat  x-28.dat  x-30.dat  x-33.dat  x-4.dat  x-7.dat  x.dat
x-12.dat  x-15.dat  x-18.dat  x-20.dat  x-23.dat  x-26.dat  x-29.dat  x-31.dat  x-34.dat  x-5.dat  x-8.dat
user@user-laptop:~/data$

The cell-simulator (systemsim) has some very verbose output turned on by default:

.....
[0:0:0]: (2602127425) (PC:0xC00000000005B000) :    502.4 Kilo-Inst/Sec :    814.3 Mega-Cycles/Sec
[0:0:1]: (2602127425) (PC:0xC00000000005B000) :    441.3 Kilo-Inst/Sec
[0:0:0]: (2605948674) (PC:0xC00000000005B000) :    505.7 Kilo-Inst/Sec :    820.4 Mega-Cycles/Sec
[0:0:1]: (2605948674) (PC:0xC00000000005B000) :    444.3 Kilo-Inst/Sec
[0:0:0]: (2609920536) (PC:0xC00000000005B000) :    523.3 Kilo-Inst/Sec :    850.3 Mega-Cycles/Sec
[0:0:1]: (2609920536) (PC:0xC00000000005B000) :    464.2 Kilo-Inst/Sec
[0:0:0]: (2613807964) (PC:0xC00000000005B000) :    514.7 Kilo-Inst/Sec :    836.4 Mega-Cycles/Sec
[0:0:1]: (2613807964) (PC:0xC00000000005B000) :    453.0 Kilo-Inst/Sec
[0:0:0]: (2617678402) (PC:0xC00000000005B000) :    511.4 Kilo-Inst/Sec :    829.0 Mega-Cycles/Sec

To disable it, use the following command:

systemsim %  mysim modify kips_format 0
KIPS format is 0
systemsim %

Alternatively, the command can be placed in a .tcl-script read by the simulator with the -f <.tcl script> flag.