From 37c459ba892e22eb4d8d021538b8fa9f4edc2224 Mon Sep 17 00:00:00 2001 From: slmnemo Date: Sun, 3 Nov 2024 19:51:30 -0800 Subject: [PATCH] Added hardlinks to derivative configs to imperas.ic for lockstep --- bin/derivgen.pl | 10 ++++++++++ config/buildroot/imperas.ic | 1 - 2 files changed, 10 insertions(+), 1 deletion(-) delete mode 120000 config/buildroot/imperas.ic diff --git a/bin/derivgen.pl b/bin/derivgen.pl index 58991faae..5dee10243 100755 --- a/bin/derivgen.pl +++ b/bin/derivgen.pl @@ -88,6 +88,16 @@ foreach my $key (@derivnames) { open(my $unmod, $configunmod) or die "Could not open file '$configunmod' $!"; open(my $fh, '>>', $config) or die "Could not open file '$config' $!"; + # Create symlink to imperas.ic for deriv if exists + my $baseimperas_ic = "$ENV{WALLY}/config/$basederiv{$key}/imperas.ic"; + if (! -e $baseimperas_ic) { + my $baseimperas_ic = "$ENV{WALLY}/config/deriv/$basederiv{$key}/config.vh"; + } + if (-e $baseimperas_ic) { # If imperas.ic exists for base derivative, create hardlink to it + my $imperas_ic = "$dir/imperas.ic"; + system("ln -T $baseimperas_ic $imperas_ic"); + } + my $datestring = localtime(); my %hit = (); print $fh "// Config $key automatically derived from $basederiv{$key} on $datestring using derivgen.pl\n"; diff --git a/config/buildroot/imperas.ic b/config/buildroot/imperas.ic deleted file mode 120000 index 43af05a2d..000000000 --- a/config/buildroot/imperas.ic +++ /dev/null @@ -1 +0,0 @@ -../rv64gc/imperas.ic \ No newline at end of file