tarkyss
Full Member level 6

%mti_home%
I wrote a simple c program
#include "./veriuser.h"
#include "acc_user.h"
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
int myrandom() {
time_t *nowtime;
time(nowtime);
srand((*nowtime));
printf("the time is %d\nthe random is %d\n", (*nowtime), rand()%128);
}
s_tfcell veriusertfs[] = {
{usertask, 0, 0, 0, myrandom, 0, "$myrandom"},
{0} // last entry must be 0
};
when running gcc and ld, no warning no error
but when i run
vsim -c test -pli myrandom.sl
it said, system task $myrandom is not defined.
why?
I wrote a simple c program
#include "./veriuser.h"
#include "acc_user.h"
#include "stdio.h"
#include "stdlib.h"
#include "time.h"
int myrandom() {
time_t *nowtime;
time(nowtime);
srand((*nowtime));
printf("the time is %d\nthe random is %d\n", (*nowtime), rand()%128);
}
s_tfcell veriusertfs[] = {
{usertask, 0, 0, 0, myrandom, 0, "$myrandom"},
{0} // last entry must be 0
};
when running gcc and ld, no warning no error
but when i run
vsim -c test -pli myrandom.sl
it said, system task $myrandom is not defined.
why?