qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH pic32 v3 02/16] pic32: use LCG algorithm for gen


From: Leon Alrae
Subject: Re: [Qemu-devel] [PATCH pic32 v3 02/16] pic32: use LCG algorithm for generated random index of TLBWR instruction
Date: Tue, 15 Sep 2015 10:46:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 06/07/15 07:14, Serge Vakulenko wrote:
> The LFSR algorithm, used for generating random TLB indexes for TLBWR 
> instruction,
> was inclined to produce a degenerate sequence in some cases.
> For example, for 16-entry TLB size and Wired=1, it gives: 15, 6, 7, 2,
> 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2, 7, 2...
> When replaced with LCG algorithm from ISO/IEC 9899 standard, the sequence
> looks much better, with about the same computational effort needed.
> 
> Signed-off-by: Serge Vakulenko <address@hidden>
> ---
>  hw/mips/cputimer.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

I cherry-picked this patch from the series and applied to mips-next
queue, thanks.

Leon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]