P4080 SEC4.0 Job Descriptor to copy random numbers to system RAM

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

P4080 SEC4.0 Job Descriptor to copy random numbers to system RAM

ソリューションへジャンプ
1,784件の閲覧回数
jameshorton
Contributor II

I've tried several attempts to create a job desciptor for a Job Ring that would create 8 bytes of random data (via the RNG algorithm) and move it to system RAM. I keep getting errors. 

 

Attempt #1

-----------------

header            B0800005

Seq Out PTR F8000008

RAM Addr      05008000

RNG Alg         82500000

MOVE             6A220008

 

Resulting Status Word (JD + Status)

------------------------------

50004000  --that's where I put the JD and the intput ring was pointing there ok

4000040B -- Somethings wrong with the RNG command?

 

Also the SSTA is a 00000401

 

 

Attempt #2

See attached file

Original Attachment has been moved to: jd_rng_notes.txt.zip

ラベル(1)
タグ(2)
1 解決策
1,271件の閲覧回数
lunminliang
NXP Employee
NXP Employee

Question has been submitted as SR to technical support and ticket closed. Sharing below the comment of ticket for more community members reference:

You are using a strange data type code  (0x22) in store commands. Please find below valid RNG job descriptors:

### rnggen_1

[00] B0800006       jobhdr: stidx=0 len=6

[01] 12820004           ld: ccb1-datasz len=4 offs=0 imm

[02] 00000020               data:0x00000020

[03] 82500000    operation: cls1-op rng (SH0) generate random

[04] 60300020      fifostr: msg len=32

[05] 00004020               ptr->@0x00004020

If the SEC4 is going to be doing other things, this will be a better examples:

### rnggen_2

[00] B8800303       shrhdr: stidx=0 share=always len=3

[01] 82500000    operation: cls1-op rng (SH0) generate random

[02] 68340020   seqfifostr: rng-ref len=32

OR

### rnggen_3

[00] B0800008       jobhdr: stidx=0 len=8

[01] 10FA0008           ld: ind-nfifo len=8 offs=0 imm

[02] 42F30000               <nfifo_entry: pad->class1 type=msg/rsvd0F

ptype=rnd

[03] 00000400                               extlen=1024>

[04] 16860800           ld: deco-ctrl len=0 offs=8 imm -auto-nfifo-entries

[05] 7A920400         move: ififo->class1-alnblk -> ofifo, len=1024 (aux_ls)

[06] 60300400      fifostr: msg len=1024

[07] 00004400               ptr->@0x00004400

Note: #3 use the Info FIFO's "pad block" source for random data.

元の投稿で解決策を見る

2 返答(返信)
1,272件の閲覧回数
lunminliang
NXP Employee
NXP Employee

Question has been submitted as SR to technical support and ticket closed. Sharing below the comment of ticket for more community members reference:

You are using a strange data type code  (0x22) in store commands. Please find below valid RNG job descriptors:

### rnggen_1

[00] B0800006       jobhdr: stidx=0 len=6

[01] 12820004           ld: ccb1-datasz len=4 offs=0 imm

[02] 00000020               data:0x00000020

[03] 82500000    operation: cls1-op rng (SH0) generate random

[04] 60300020      fifostr: msg len=32

[05] 00004020               ptr->@0x00004020

If the SEC4 is going to be doing other things, this will be a better examples:

### rnggen_2

[00] B8800303       shrhdr: stidx=0 share=always len=3

[01] 82500000    operation: cls1-op rng (SH0) generate random

[02] 68340020   seqfifostr: rng-ref len=32

OR

### rnggen_3

[00] B0800008       jobhdr: stidx=0 len=8

[01] 10FA0008           ld: ind-nfifo len=8 offs=0 imm

[02] 42F30000               <nfifo_entry: pad->class1 type=msg/rsvd0F

ptype=rnd

[03] 00000400                               extlen=1024>

[04] 16860800           ld: deco-ctrl len=0 offs=8 imm -auto-nfifo-entries

[05] 7A920400         move: ififo->class1-alnblk -> ofifo, len=1024 (aux_ls)

[06] 60300400      fifostr: msg len=1024

[07] 00004400               ptr->@0x00004400

Note: #3 use the Info FIFO's "pad block" source for random data.

1,271件の閲覧回数
fmajeric
Contributor III

Hello,

I've just read your answer.

I tried to generate a simple random number @0x10000170 . But when I load the Job Descriptor Base Address into the Input Job Ring Register,

I haven't a Random number at the address  @0x10000170...

### rnggen_1

[00] B0800006       jobhdr: stidx=0 len=6

[01] 12820004           ld: ccb1-datasz len=4 offs=0 imm

[02] 00000020               data:0x00000020

[03] 82500000    operation: cls1-op rng (SH0) generate random

[04] 60300020      fifostr: msg len=32

[05] 10000170       ptr->@0x10000170

... what is the problem with this descriptor ?

What I don't make well ?

Please, could you help me ?

Fabien.

0 件の賞賛
返信