Skip to content
Snippets Groups Projects
Commit a806fefe authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

Trying to use 64 bit val for time seed

parent 509be709
No related branches found
No related tags found
3 merge requests!439RCG 5.0 release fro deb 10,!350Merge branch 'branch-4.2' into master-branch-4.2-merge,!349Adding Noise module parameter that will allow the designer to specify a seed in order to re-run with the same RNG, also initializing the RNG with a tsc based seed by default. Updating some language around seeding the noise part.
......@@ -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";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment