- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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>Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by neeljoe@Aug 15 2006, 03:54 PM 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.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17627)
--- quote end ---
--- Quote End --- Did you initialized it using srand()? Paolo
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page