Format: perltidy spacing cleanup. No functional change.

This commit is contained in:
Wilson Snyder 2021-09-07 23:50:28 -04:00
parent 2a79e46c46
commit c678e7ec3e
30 changed files with 288 additions and 285 deletions

View File

@ -13,8 +13,8 @@ use warnings;
print "// DESCR" . "IPTION: Generated by verilator_includer via makefile\n"; print "// DESCR" . "IPTION: Generated by verilator_includer via makefile\n";
foreach my $param (@ARGV) { foreach my $param (@ARGV) {
if ($param =~ /^-D([^=]+)=(.*)/) { if ($param =~ /^-D([^=]+)=(.*)/) {
print "#define $1 $2\n" print "#define $1 $2\n";
} else { } else {
print "#include \"$param\"\n" print "#include \"$param\"\n";
} }
} }

View File

@ -5,6 +5,7 @@
require 5.006_001; require 5.006_001;
use warnings; use warnings;
use Cwd; use Cwd;
BEGIN { BEGIN {
if (!$ENV{VERILATOR_ROOT} && -x "../bin/verilator") { if (!$ENV{VERILATOR_ROOT} && -x "../bin/verilator") {
$ENV{VERILATOR_ROOT} = Cwd::getcwd() . "/.."; $ENV{VERILATOR_ROOT} = Cwd::getcwd() . "/..";
@ -165,7 +166,6 @@ if ($#opt_tests>=2 && $opt_jobs>=2) {
open(STDIN, "+>/dev/null"); open(STDIN, "+>/dev/null");
} }
mkdir "obj_dist"; mkdir "obj_dist";
my $timestart = strftime("%Y%m%d_%H%M%S", localtime); my $timestart = strftime("%Y%m%d_%H%M%S", localtime);
@ -250,6 +250,7 @@ sub parameter {
} }
our $_Max_Procs; our $_Max_Procs;
sub max_procs { sub max_procs {
if (!defined $_Max_Procs) { if (!defined $_Max_Procs) {
$_Max_Procs = `python3 -c 'import multiprocessing\nprint(multiprocessing.cpu_count())'`; $_Max_Procs = `python3 -c 'import multiprocessing\nprint(multiprocessing.cpu_count())'`;
@ -964,7 +965,7 @@ sub compile_vlt_flags {
sub driver_verilator_flags { sub driver_verilator_flags {
# my $self = (ref $_[0] ? shift : $Self); # my $self = (ref $_[0] ? shift : $Self);
return @Opt_Driver_Verilator_Flags return @Opt_Driver_Verilator_Flags;
} }
sub lint { sub lint {
@ -1053,7 +1054,7 @@ sub compile {
my @more_args; my @more_args;
if ($self->vhdl) { if ($self->vhdl) {
((my $ts = $param{top_shell_filename}) =~ s!\.v!!); ((my $ts = $param{top_shell_filename}) =~ s!\.v!!);
$ts =~ s!.*/!!;; $ts =~ s!.*/!!;
push @more_args, "-vhdltop", $ts; push @more_args, "-vhdltop", $ts;
} }
$self->_run(logfile=>"$self->{obj_dir}/nc_compile.log", $self->_run(logfile=>"$self->{obj_dir}/nc_compile.log",
@ -1814,7 +1815,8 @@ sub _make_main {
print $fh " contextp->commandArgs(argc, argv);\n"; print $fh " contextp->commandArgs(argc, argv);\n";
print $fh " contextp->debug(" . ($self->{verilated_debug} ? 1 : 0) . ");\n"; print $fh " contextp->debug(" . ($self->{verilated_debug} ? 1 : 0) . ");\n";
print $fh " srand48(5);\n"; # Ensure determinism print $fh " srand48(5);\n"; # Ensure determinism
print $fh " contextp->randReset(".$self->{verilated_randReset}.");\n" if defined $self->{verilated_randReset}; print $fh " contextp->randReset(" . $self->{verilated_randReset} . ");\n"
if defined $self->{verilated_randReset};
print $fh " topp.reset(new $VM_PREFIX(\"top\"));\n"; print $fh " topp.reset(new $VM_PREFIX(\"top\"));\n";
print $fh " contextp->internalsDump()\n;" if $self->{verilated_debug}; print $fh " contextp->internalsDump()\n;" if $self->{verilated_debug};
@ -2614,6 +2616,7 @@ sub is_any_left { return 0; }
####################################################################### #######################################################################
1; 1;
package main; package main;
__END__ __END__

View File

@ -27,10 +27,10 @@ if (!-r "$root/.git") {
next if $file =~ /nodist/; next if $file =~ /nodist/;
if (_has_tabs("$root/$file")) { if (_has_tabs("$root/$file")) {
$warns{$file} = "File not in git or .gitignore (with tabs): $file"; $warns{$file} = "File not in git or .gitignore (with tabs): $file";
$summary = "Files untracked in git or .gitignore (with tabs):" $summary = "Files untracked in git or .gitignore (with tabs):";
} else { } else {
$warns{$file} = "File not in git or .gitignore: $file"; $warns{$file} = "File not in git or .gitignore: $file";
$summary ||= "Files untracked in git or .gitignore:" $summary ||= "Files untracked in git or .gitignore:";
} }
} }
} }