1#!/usr/bin/env perl 2if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } 3# DESCRIPTION: Verilator: Verilog Test driver/expect definition 4# 5# Copyright 2008 by Wilson Snyder. This program is free software; you 6# can redistribute it and/or modify it under the terms of either the GNU 7# Lesser General Public License Version 3 or the Perl Artistic License 8# Version 2.0. 9# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 10 11scenarios(vlt => 1); 12 13my @opts; 14# Typo 15push @opts, "-ccc"; 16# Typo of an option that starts with "--" 17push @opts, "--ccc"; 18# Typo of an option that starts with "-no-" 19push @opts, "-no-asserT"; 20# Typo of an option that starts with "-no" 21push @opts, "-noasserT"; 22# Typo of an option that allows "-no" 23push @opts, "-asserT"; 24# Typo of an option that starts with '+' 25push @opts, "+definE+A=B"; 26# Typo that takes arg 27push @opts, "-CFLAGs -ggdb"; 28# Typo of an undocumented option 29push @opts, "-debug-aborT"; 30# Typo of "-Wno" for partial match 31push @opts, "-Won-SPLITVAR"; 32# Typo after -Wno- for partial match 33push @opts, "-Wno-SPLITVER"; 34# Typo of -language 35push @opts, "-language 1364-1997"; 36 37my $cmd = ""; 38 39foreach my $var (@opts) { 40 $cmd = $cmd . $ENV{VERILATOR_ROOT} . "/bin/verilator ${var}; "; 41} 42 43run(cmd => [$cmd], 44 verilator_run => 1, 45 logfile => "$Self->{obj_dir}/sim.log", 46 fails => 1, 47 expect_filename => $Self->{golden_filename}, 48); 49 50ok(1); 511; 52