UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor boring
Visitor
1,401 Views
Registered: ‎02-10-2018

PRBS with seed

Hello,

 

i read :

https://www.xilinx.com/search/site-keyword-search.html?searchKeywords=xapp884.zip

 

https://forums.xilinx.com/t5/Embedded-Development-Tools/Random-seed-without-Linux-OS/m-p/325109/highlight/true#M27322

 

I need to do random generation in Programmable Logic. Pseudo random is sufficient, no need of true random.

I want do it on Zynq (Zedboard), but compatibilty with Zynq/Virtex Ultrascale+ would be appreciated.

 

Simulation must be possible. I can't simulate with the second link (or don't know how). But it works well on target.

 

I will instanciate many random blocks. So i need to specify a different seed for each instance. There is no seed in the first link (PRBS).

 

To make it simply, i need a PRBS with a seed parameter on at least 8 bits. I could get 256 instances. More than 8 bits would be appreciated.

 

Could anyone help?

 

Thank you.

0 Kudos
3 Replies
Moderator
Moderator
1,392 Views
Registered: ‎07-30-2007

Re: PRBS with seed

For xapp884 couldn't you just redo the reset:

 

always @(posedge CLK) begin

if(RST == 1'b 1) begin

prbs_reg <= {POLY_LENGHT{1'b1}};

DATA_OUT <= {NBITS{1'b1}};

end

 

to something like:

 

always @(posedge CLK) begin

if(RST == 1'b 1) begin

prbs_reg <= SEED;

DATA_OUT <=  {NBITS{1'b1}};

end

 

You would have to provide a seed of the right length.

 

Roy


----------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution
----------------------------------------------------------------------------


0 Kudos
Visitor boring
Visitor
1,380 Views
Registered: ‎02-10-2018

Re: PRBS with seed

It sounds good. I could get up to 2^512 2^63 instances. I think it will be enough.

I will make a testbench to verify if it works well.

 

Thank you @roym.

0 Kudos
Visitor boring
Visitor
1,265 Views
Registered: ‎02-10-2018

Re: PRBS with seed


@roym wrote:

For xapp884 couldn't you just redo the reset:

 

@always @(posedge CLK) begin

if(RST == 1'b 1) begin

prbs_reg <= {POLY_LENGHT{1'b1}};

DATA_OUT <= {NBITS{1'b1}};

end

 

to something like:

 

@always @(posedge CLK) begin

if(RST == 1'b 1) begin

prbs_reg <= SEED;

DATA_OUT <=  {NBITS{1'b1}};

end

 

You would have to provide a seed of the right length.

 


Finally, it doesn't really works.

I made a first test with 10 instances and output on 8 bits. About 8000 clk after reset, all instances gave "00".

To verify if this was random or a correlation, i made a second test with 100 instances. And again, all gave "00".

 

This happens several times from the beginning to 8000 clk. And it also happens with "FF".

 

So this method induces correlations between instances.

 

Anyone has something else?

 

0 Kudos