File: 46_link.t

package info (click to toggle)
libverilog-perl 3.460-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 4,188 kB
  • sloc: perl: 8,640; yacc: 3,362; cpp: 2,262; lex: 1,487; makefile: 8; fortran: 3
file content (41 lines) | stat: -rwxr-xr-x 999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl -w
# DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package
#
# Copyright 2000-2019 by Wilson Snyder.  This program is free software;
# you can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.

use strict;
use Test::More;

BEGIN { plan tests => 2 }
BEGIN { require "./t/test_utils.pl"; }

#$Verilog::Netlist::Debug = 1;
use Verilog::Netlist;
use Verilog::Getopt;
ok(1, "use");
{
    # Setup options so files can be found
    my $opt = new Verilog::Getopt;
    $opt->parameter( "+incdir+verilog",
		     "-y","verilog",
		     );

    # Prepare netlist
    my $nl = new Verilog::Netlist (options => $opt,
				   );
    foreach my $file ('verilog/v_gate.v') {
	$nl->read_file (filename=>$file);
    }
    # Read in any sub-modules
    $nl->read_libraries();
    $nl->link();
    $nl->lint();
    $nl->exit_if_error();

    print "Dump\n";
    $nl->dump;
}

ok(1, "done");