Random Number Descriptor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Random Number Descriptor

ソリューションへジャンプ
1,190件の閲覧回数
apoorvabhatia
Contributor III

Hi,

This is the RNG descriptor that I have written:

/*****************************************

*----- Random Number descriptor -----*

*****************************************/

/* Header

*  1011 0000 1000 0000 0000 0000 0000 0111

*  ++++-+-- Header                    +-- 7 words in descriptor

*/ 

#define RNG_DESC1  0xB0800006

/* Load Data size register

*  0001 0010 1000 0010 0000 0000 0000 0100

*  Data: 0x0000 0010

* Loading the data size register with the size of the key to be generated

* Length : 16 bytes

*/

#define RNG_DESC2 0x12820004

#define RNG_DESC3 0x00000010

/* operation

*  1000 0010 0101 0000 1000 0000 0000 0000

* operation: class1-op rng (SH0) generate random, state handle: 0, normal (non-deterministic mode)

*/

#define RNG_DESC4 0x82500800

// Wait for Class 1 done

#define RNG_DESC5 0xA3000201

/* FIFO Store

*  0110 0000 0011 0000 0000 0000 0001 0000

* fifostore: msg len=16

*/

#define RNG_DESC6 0x60300010

#define RNG_DESC7 0x00000000 // assign the memory address to this in the main program where you call it

/***************MY CODE*************************************/

Now, it shows an error in the output ring: 0x40000504
which means that the fifth descriptor (#define RNG_DESC5 0xA3000201) is wrong. Basically i want to wait till the random number has been generated.

Can someone please help me with this? (i also tried 0xA2000001 which has been used in the SDK during instatntiation for similar purpose but still the same error is given)

Thanks.

タグ(2)
0 件の賞賛
返信
1 解決策
1,039件の閲覧回数
apoorvabhatia
Contributor III

Well, I was able to generate the random number. We don't need the wait command while generation. It was needed during instantiation because the key registers were being loaded.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,040件の閲覧回数
apoorvabhatia
Contributor III

Well, I was able to generate the random number. We don't need the wait command while generation. It was needed during instantiation because the key registers were being loaded.

0 件の賞賛
返信