1/1

|
Practical example of using rng.v please?
by gruvin on Dec 2, 2011 |
gruvin
Posts: 1 Joined: Nov 18, 2011 Last seen: Aug 15, 2019 |
||
|
Hi
I'm just starting out learning FPGA -- self-teaching, using online material only. I've got a modified "VGA pong" going on a simple FPGA chip (thanks to fpga4fun.com), as it seemed a good place to start. I now want to generate pseudo random numbers. I found rng.v on OpenCores. But I don't know how to use it. (I'm confused about how modules even work, frankly. Not for long, I hope! :-P) I tried using it like so ... --------------- wire [31:0] random; rng random_num(.clk(clk), .reset(0), .loadseed_i(CounterX), .seed_i(CounterY), .number_o(random)); ... ... varX = random; --------------- It compiles fine. But varX is always just set to 0 (zero). I can't find any documentation for the module, which is here: http://opencores.org/project,systemc_rng ... not even the simplest code example. Nothing in code comment either. (Seems odd to write a module and never tell any one how to use it. Am I missing somewhere I should be looking for this info?) So any help would be much appreciated. Thanks. :-D |
|||
1/1

