Can anyone help me to write testbench with varying input probability for unsigned multiplier design, which include .tcf file generation for power calculation
I am not sure what is meant by input probability. I suspect that you are referring to the signal probability of an input, which is defined as the ratio of average number of 1's to the number of input patterns, as the latter tends to infinity. You must first understand how to generate a sequence of zeroes and ones if the probability of 1's is fixed at p. Then extend this to all the other inputs.
Whatever probability you want on input, write MATLAB code with those probabilities and generate text file. (I am sure like CPR what you mean by varying input probability). Use this as an input signal file.
My current work is regarding unsigned multipliers and I had the same problem some time ago. What is important for multiplier testing is that to cover as much signals as possible. In the literature you can find many related publications, i.e. built-in self tests (BISTs) or random input generators. It certainly depends on what level or environment your measurements are going to be, i.e. gate-level, VLSI/analog level, VHDL/C++ level, etc. but BIST algorithm can be implemented in any of them. Verilog also comes in handy for generating input signals and compares the result of your circuit with the desired solution.
I personally enjoy writing my own benchmark that covers most of my design. These does not necessarily have to fit to your low-level implementation but may give you an idea of what it looks like although it does not a direct answer to your question.
Test Vector Name Multiplicand Multiplier
Full 1111 1111 1111 1111
Empty 0000 0000 0000 0000
Checkboard1 0101 0101 0101 0101
Checkboard2 0101 0101 1010 1010
Checkboard3 1010 1010 0101 0101
Checkboard4 1010 1010 1010 1010
Pattern1 0011 0011 0011 0011
Pattern2 1100 1100 0011 0011
Pattern3 1100 1100 1100 1100
Random1 0111 0100 1001 1110
Random2 1011 1101 0011 1011
Random3 0101 1101 0111 0010
If you are working in Cadence or SPICE environment, you also may use the vpulse to implement such numbers, but it would take some time.
If the inputs have to be purely random and if you have specific probability value requirements, then I would recommend Excel's rand() function also.