由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
EE版 - 怎么产生随机数?
相关主题
Re: 求教:有VHDL格式的随机生成0/1的程序吗?Matlab help: sqrt raised cosine waveform
关于在HSPICE下使用Verilog-A自带随机数函数的问题请教:傅立叶变换
matlab 里面的randnOFDM transmitter pulse shaping filter
需要一个high power,high current的pulse generator,哪里能找到?[发包子问] 求教一个filter
How to generate independent and equiprobable inputs with switching activity of 0.5 in Verilog请教: Artisan SRAM generator 的 综合问题
请问一个clock generator的问题 multi-phase请教一个Verilog-A的入门级问题
Re: I tried, it didn't work Re: 关于histogram问个学术问题
Re: 哪位同学能给我解释解释discrete cosine transform请教一个 Fractional-N PLL 的问题。
相关话题的讨论汇总
话题: random话题: cycle话题: 产生话题: lsfr话题: 随机数
进入EE版参与讨论
1 (共1页)
f********o
发帖数: 2181
1
硬件实现
uniform distribution就可以
用LSFR产生的好像都是[0,2^N-1]的数
如果我要在[0,10]里面随机产生数字
除了用LSFR出来的数字再乘个系数, 还有其他方法么?
谢谢~~~
D*******a
发帖数: 3688
2
mod
accept/reject

【在 f********o 的大作中提到】
: 硬件实现
: uniform distribution就可以
: 用LSFR产生的好像都是[0,2^N-1]的数
: 如果我要在[0,10]里面随机产生数字
: 除了用LSFR出来的数字再乘个系数, 还有其他方法么?
: 谢谢~~~

f********o
发帖数: 2181
3
Thanks for the suggestion
but I need to get the digit every cycle....

【在 D*******a 的大作中提到】
: mod
: accept/reject

z*****n
发帖数: 7639
4
You cannot get digit every cycle, every cycle produces
ONLY one bit.
Accept/reject is better if wordlength is short. Say if
you need digits 0-9(or 1-10), you can run 4 cycles and
get a 4-bit random number. Then accept only the ones
you are interested.

【在 f********o 的大作中提到】
: Thanks for the suggestion
: but I need to get the digit every cycle....

f********o
发帖数: 2181
5
多谢
linear feedback shift register应该是可以每个cycle输出一个N-bit的数字的
不过这个数列会重复
另外不知道有没有其他方法能产生真正的随机数
这样的话多个clock cycle出一个数字也可以

【在 z*****n 的大作中提到】
: You cannot get digit every cycle, every cycle produces
: ONLY one bit.
: Accept/reject is better if wordlength is short. Say if
: you need digits 0-9(or 1-10), you can run 4 cycles and
: get a 4-bit random number. Then accept only the ones
: you are interested.

z*****n
发帖数: 7639
6
all random-number generators are pseudo, unless
you have external random events.

【在 f********o 的大作中提到】
: 多谢
: linear feedback shift register应该是可以每个cycle输出一个N-bit的数字的
: 不过这个数列会重复
: 另外不知道有没有其他方法能产生真正的随机数
: 这样的话多个clock cycle出一个数字也可以

D*******a
发帖数: 3688
7
取mod可不可以做成固定cycle的运算?感觉是可以的

【在 z*****n 的大作中提到】
: You cannot get digit every cycle, every cycle produces
: ONLY one bit.
: Accept/reject is better if wordlength is short. Say if
: you need digits 0-9(or 1-10), you can run 4 cycles and
: get a 4-bit random number. Then accept only the ones
: you are interested.

h*******o
发帖数: 778
8
in fact one colleague in my group is designing a hardware random generator
for generating Guassian noise. You can google there are some paper
describing
using a complicate square/cosine functions to generate random number which
has avery very large reapting cycle...

【在 f********o 的大作中提到】
: 硬件实现
: uniform distribution就可以
: 用LSFR产生的好像都是[0,2^N-1]的数
: 如果我要在[0,10]里面随机产生数字
: 除了用LSFR出来的数字再乘个系数, 还有其他方法么?
: 谢谢~~~

f********o
发帖数: 2181
9
谢谢建议
也多谢楼上几位
最后我还是把其他电路部分改了, take random numbers between [0, 2^N-1]
因为用乘系数得到的数分布也不够均匀...

【在 h*******o 的大作中提到】
: in fact one colleague in my group is designing a hardware random generator
: for generating Guassian noise. You can google there are some paper
: describing
: using a complicate square/cosine functions to generate random number which
: has avery very large reapting cycle...

1 (共1页)
进入EE版参与讨论
相关主题
请教一个 Fractional-N PLL 的问题。How to generate independent and equiprobable inputs with switching activity of 0.5 in Verilog
Re: [转载] 请教,怎么生成高斯分布的随机变量?请问一个clock generator的问题 multi-phase
Re: [转载] 请教,住在电视塔附近会不会有辐射危害?Re: I tried, it didn't work Re: 关于histogram
请教:光刻 与 工作Re: 哪位同学能给我解释解释discrete cosine transform
Re: 求教:有VHDL格式的随机生成0/1的程序吗?Matlab help: sqrt raised cosine waveform
关于在HSPICE下使用Verilog-A自带随机数函数的问题请教:傅立叶变换
matlab 里面的randnOFDM transmitter pulse shaping filter
需要一个high power,high current的pulse generator,哪里能找到?[发包子问] 求教一个filter
相关话题的讨论汇总
话题: random话题: cycle话题: 产生话题: lsfr话题: 随机数