T
Tricky
Guest
On Mar 3, 9:15 pm, FPGA <FPGA.unkn...@gmail.com> wrote:
when they are put into the uniform function. Unitialised types when
used will take type'low as their value
positive'low = 1
std_logic'low = 'u'
etc.
so both of your first calls to uniform are seeding it with two 1s.
I dont know how the seeding works in matlab. It may not even use
positives, but the entire integer range. it is common in C to seed the
random number generator with the system time. Does matlab do something
similar? The C random function only has 1 seed, whereas uniform takes
2.
Uninitilised positives (the seeds in this case) will take a value of 1I have written a process to generate random numbers using UNIFORM. I
was trying to check the results using "rand" in matlab. How do i
initialise the seed values of both these functions to the same value.
I see that the random numbers generated by UNIFORM are different
compared to rand when the seed values are left uninitialised.
What do I need to change so that I get same output from both programs.
Thanks
when they are put into the uniform function. Unitialised types when
used will take type'low as their value
positive'low = 1
std_logic'low = 'u'
etc.
so both of your first calls to uniform are seeding it with two 1s.
I dont know how the seeding works in matlab. It may not even use
positives, but the entire integer range. it is common in C to seed the
random number generator with the system time. Does matlab do something
similar? The C random function only has 1 seed, whereas uniform takes
2.