Tests: Add t_udp_noname, bug468
This commit is contained in:
parent
68046244dd
commit
fb90e47e70
|
|
@ -65,6 +65,7 @@ struct V3ParseBisonYYSType {
|
|||
AstBegin* beginp;
|
||||
AstCase* casep;
|
||||
AstCaseItem* caseitemp;
|
||||
AstCell* cellp;
|
||||
AstConst* constp;
|
||||
AstNodeModule* modulep;
|
||||
AstNodeDType* dtypep;
|
||||
|
|
|
|||
|
|
@ -1731,6 +1731,9 @@ instnameParen<nodep>:
|
|||
id instRangeE '(' cellpinList ')' { $$ = new AstCell($<fl>1,*$1,GRAMMARP->m_instModule,$4, GRAMMARP->m_instParamp,$2); }
|
||||
| id instRangeE { $$ = new AstCell($<fl>1,*$1,GRAMMARP->m_instModule,NULL,GRAMMARP->m_instParamp,$2); }
|
||||
//UNSUP instRangeE '(' cellpinList ')' { UNSUP } // UDP
|
||||
// // Adding above and switching to the Verilog-Perl syntax
|
||||
// // causes a shift conflict due to use of idClassSel inside exprScope.
|
||||
// // It also breaks allowing "id foo;" instantiation syntax.
|
||||
;
|
||||
|
||||
instRangeE<rangep>:
|
||||
|
|
|
|||
|
|
@ -354,7 +354,8 @@ sub new {
|
|||
vcs_run_flags => [split(/\s+/,"+vcs+lic_wait")],
|
||||
# NC
|
||||
nc => 0,
|
||||
nc_flags => [split(/\s+/,"+licqueue +nowarn+LIBNOU +define+NC=1 -q +assert +sv -c ")],
|
||||
nc_flags => [split(/\s+/,("+licqueue +nowarn+LIBNOU +define+NC=1 -q +assert +sv -c "
|
||||
.($opt_trace ? " +access+r":"")))],
|
||||
nc_flags2 => [], # Overridden in some sim files
|
||||
nc_run_flags => [split(/\s+/,"+licqueue -q +assert +sv -R")],
|
||||
# Verilator
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003 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.
|
||||
|
||||
$Self->{vlt} and $Self->unsupported("Verilator unsupported, bug468");
|
||||
|
||||
compile (
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2012 by Wilson Snyder.
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
);
|
||||
input clk;
|
||||
|
||||
reg a;
|
||||
wire o;
|
||||
udp (o, a);
|
||||
|
||||
integer cyc; initial cyc=0;
|
||||
|
||||
// Test loop
|
||||
always @ (posedge clk) begin
|
||||
cyc <= cyc + 1;
|
||||
a <= cyc[0];
|
||||
if (cyc==0) begin
|
||||
end
|
||||
else if (cyc<90) begin
|
||||
if (a != !cyc[0]) $stop;
|
||||
end
|
||||
else if (cyc==99) begin
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
||||
primitive udp(o,a);
|
||||
output o;
|
||||
input a;
|
||||
`ifdef verilator
|
||||
wire o = ~a;
|
||||
`else
|
||||
table
|
||||
//o a
|
||||
0 : 1;
|
||||
1 : 0;
|
||||
endtable
|
||||
`endif
|
||||
endprimitive
|
||||
Loading…
Reference in New Issue