From a806fefefe3f8c7757cccfc429aea0e30bc8fc9c Mon Sep 17 00:00:00 2001 From: Ezekiel Dohmen <ezekiel.dohmen@ligo.org> Date: Fri, 1 Apr 2022 14:46:01 -0700 Subject: [PATCH] Trying to use 64 bit val for time seed --- src/epics/util/lib/Noise.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/epics/util/lib/Noise.pm b/src/epics/util/lib/Noise.pm index e137a662c..40341a35d 100644 --- a/src/epics/util/lib/Noise.pm +++ b/src/epics/util/lib/Noise.pm @@ -44,7 +44,7 @@ sub printFrontEndVars { print ::OUT "static unsigned long noise_seed = " . $::noiseGeneratorSeed . "LL;\n"; } else { - print ::OUT "static unsigned long noise_seed = 4101842887655102017LL;\n"; + print ::OUT "static unsigned long noise_seed = 0LL;\n"; } print ::OUT << "END"; @@ -92,8 +92,8 @@ sub frontEndInitCode { my ($i) = @_; if ($init_code_printed) { return ""; } my $calcExp = "\L$::xpartName[$i] = 0;\n"; - $calcExp .= "for (;noise_seed == 4101842887655102017LL;) {\n"; - $calcExp .= " rdtscl(noise_seed);\n"; + $calcExp .= "if (noise_seed == 0) {\n"; + $calcExp .= " rdtscll(noise_seed);\n"; $calcExp .= "}\n"; $calcExp .= "noise_set_seed(noise_seed);\n"; -- GitLab