Makefile

hi all,
i have a makefile which is having this sample code

comp = ncverilog +access+rwc -uvm -coverage all -seed random top.sv

test1:
$(comp) +UVM_VERBOSITY=UVM_MEDIUM +UVM_TESTNAME=test_case_1;
mkdir tc_1;
mv cov_work ./tc_1;
mv *.trn ./tc1

Now the question is here i am using -seed random. every time if i run the test it will take random seed number and it will generate a default log file called ncverilog.log in cadence
Here i want to create log file with seed value, just like (ncverilog_347372357.log) file that number is a random number.

In my log file that random number is present but, if i run the test1 again ncverilog.log file will reload with present random values. so previous values will wipe-out and present values will come. i don’t want it to happen

In reply to abhishek403:

So, you want to:

  1. Change ncverilog file with seed value name?
  2. Rerun the test with previous seed value?

So, I recommend:

  1. I’m not familiar with ncverilog. But you can work around like this:

SEED = $$RANDOM
comp = ncverilog +access+rwc -uvm -coverage all -seed $(SEED) top.sv
test1:
  $(comp) +UVM_VERBOSITY=UVM_MEDIUM +UVM_TESTNAME=test_case_1;
  mkdir tc_1;
  mv cov_work ./tc_1;
  mv *.trn ./tc1
  # Change log file
  mv ncverilog.log ncverilog_$(SEED).log

  1. You want to run with previous seed for test1. You have to override the SEED variable in your Makefile with the previous seed value (let’s say the vlaue is 123456789) by executing following command:

make test1 SEED=123456789

In reply to cuonghl:

In reply to abhishek403:
So, you want to:

  1. Change ncverilog file with seed value name?
  2. Rerun the test with previous seed value?
    So, I recommend:
  3. I’m not familiar with ncverilog. But you can work around like this:

SEED = $$RANDOM
comp = ncverilog +access+rwc -uvm -coverage all -seed $(SEED) top.sv
test1:
$(comp) +UVM_VERBOSITY=UVM_MEDIUM +UVM_TESTNAME=test_case_1;
mkdir tc_1;
mv cov_work ./tc_1;
mv *.trn ./tc1
# Change log file
mv ncverilog.log ncverilog_$(SEED).log

  1. You want to run with previous seed for test1. You have to override the SEED variable in your Makefile with the previous seed value (let’s say the vlaue is 123456789) by executing following command:

make test1 SEED=123456789

Thanks a lot chris Le

its working 100%

In reply to abhishek403:

make test1 SEED=123456789

instead of 123456789
if i give make test1 SEED=random
its not appending to my log file

its coming like tc_1_random.log and also i want to use a for loop in my makefile. so that i will get more number of tests for the same test based on the for loop, if i use random. if i want to run the same test, i need to call make test1 SEED=23245346 for several times. This is my problem.