Altera_Forum
Honored Contributor
19 years agorandom number generator?
Hi I am new to nios ii and was wondering if there was a random number generator. I have been try to use rand(), but it seems to only return 0s. I was wondering if I was doing something wrong. Could someone explain what libraries I should include? These are the libraries I am using thus far:
# include "alt_types.h" # include "altera_avalon_pio_regs.h" # include "alt_ucosii_simple_error_check.h" # include <stdlib.h> # include <stdio.h> # include <system.h> # include <sys/time.h> # include <sys/alt_timestamp.h>