你好,
我在我的一个项目中使用PRS 2组件来生成一步一步的伪随机值。
该组件被配置为具有单周期和单步API模式的种子值0xFFFFFFF的32位分辨率(32, 30, 26,25)。
初始化是通过以下方式完成的:
下面的代码行是一步一步迭代的:
(sBuffer-[0])(Un
ti8)(SnBuffel&App:0x000),SunButo[[ 2 ] ]=(UTIN 8)((BNPCR>GT;8)和0x000×0.00 FF);SeNdBuff[1 ]=(UTIN 8)((BNPCR>GT;16)和0x000 000 FFF);SeNdBuff[0 ]=(UITN8)((BNPCR>GT;24)和0x000×00 FFF);UIT32 32 BNPCR= PRSY1I读数4);
因此,我从USB发送的移位寄存器中得到二进制值。然后在二进制编码中显示值(每行4字节,左MSB):
(1):10111001111111111111111111α(2):0101011111111111111111111(3):010101111111111111111111110,4:110 1011111111111111111111100,5:111010011111111111111111111001,6:100101111111111111111111110011α7:011011111111111111111100100111 8α0:11111111111111111111111111111111011011111111111111111111001110 #九:11110001111111111111111110011101 #十:10100101111111111111111100111011 # 11: 00001101111111111111111001110111 # 12: 00011011111111111111110011101110 # 13: 00110111111111111111100111011100 #十四:15:11011111111111111110011101110000 01101111111111111111001110111000 ## 16:17:11111 001111111111100111011100001 # 10110101111111111001110111000011 # 18:00101101111111100011101110000111 # 19:01011011111111000111011100001110 # 20:10110111111110011110111000011100…
在我的理解看来,每一步,一位是从转移到LSB的一面。但是MSB部分的5…7比特是什么??伪随机值应该从一个到下一步的shiftet新位相等呢?
有人能帮助我吗?)
拜伊
弗兰兹
以上来自于百度翻译
以下为原文
Hello,
i'am using the prs 2.0 component in one of my projects to generate step by step pseudo random values.
The component is configured as 32bit Resolution (32, 30, 26, 25) with seed value 0xFFFFFFFF in single cycle and single step API mode.
Initialization is done trough:
PRS_1_Start(); An following lines of code are step by step iterated:
uint32 binprc = PRS_1_Read(); SendBuffer[3] = (uint8)(binprc & 0x000000FF); SendBuffer[2] = (uint8)((binprc>>8) & 0x000000FF); SendBuffer[1] = (uint8)((binprc>>16) & 0x000000FF); SendBuffer[0] = (uint8)((binprc>>24) & 0x000000FF); USBUART_1_Write(SendBuffer, 4); PRS_1_Step();
So I get the binary values from the shift register sent through u***. The values are then displayed in binary coding (each line a step of 4 bytes, left MSB):
#0: 11111111111111111111111111111111 #1: 10111001111111111111111111111111 #2: 00110101111111111111111111111111 #3: 01101011111111111111111111111110 #4: 11010111111111111111111111111100 #5: 11101001111111111111111111111001 #6: 10010101111111111111111111110011 #7: 01101101111111111111111111100111 #8: 11011011111111111111111111001110 #9: 11110001111111111111111110011101 #10: 10100101111111111111111100111011 #11: 00001101111111111111111001110111 #12: 00011011111111111111110011101110 #13: 00110111111111111111100111011100 #14: 01101111111111111111001110111000 #15: 11011111111111111110011101110000 #16: 11111001111111111100111011100001 #17: 10110101111111111001110111000011 #18: 00101101111111100011101110000111 #19: 01011011111111000111011100001110 #20: 10110111111110011110111000011100 ...
For my understanding it looks like that with each step one bit comes shifted in from the l*** side. But what are the 5..7 Bits in the MSB part?? Pseudo random values should be equal from one to the next step up to the shiftet in new bit?
Can anybody help me :)
Bye
Franz