Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verilog::Netlist now cannot recognize builtins (primitives?) #152

Closed
veripoolbot opened this issue Jun 18, 2007 · 0 comments
Closed

Verilog::Netlist now cannot recognize builtins (primitives?) #152

veripoolbot opened this issue Jun 18, 2007 · 0 comments
Assignees

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Jeff Trull (@jefftrull)
Original Redmine Issue: 152 from https://www.veripool.org
Original Date: 2007-06-18
Original Assignee: Wilson Snyder (@wsnyder)


This bug was cloned from Perl-RT, rt27624.

Email addresses have have been truncated.

Id: 	27624
Status: 	resolved
Left: 	0 min
Queue: 	Verilog-Perl
Owner: 	Nobody
Requestors: 	jetrull <jetrull@>

Severity: 	Important
Broken in: 	3.001
X Attachments
builtin_bug.tgz

     * Mon Jun 18 14:16:06 2007 (611b) by jetrull

#�_patch.diff

     * Mon Jun 18 15:05:26 2007 (2.5k) by WSNYDER

Mon Jun 18 14:16:06 2007 jetrull - Ticket created

Subject: 	Verilog::Netlist now cannot recognize builtins (primitives?)

In previous versions libs defined using builtin cell types such as
"buf", "bufif" etc. worked fine, but in 3.000 I get the following types
of messages:

%Error: ./lib/buffer.v:7: Cannot find buf

A test case is attached that will produce this message. Run command is:

./test.pl -y ./lib test.v

3.000 produces the above error message, but prior versions do not.

Subject: 	builtin_bug.tgz

[application/x-gzip 611b]
Message body not shown because it is too large or is not plain text.

Mon Jun 18 15:05:25 2007 WSNYDER - Correspondence added

This is fixed for the next release. The patch, minus docs and
testcases, is attached if you need it to make progress.

Subject: 	#�_patch.diff

[text/x-patch 2.5k]
===================================================================
--- Netlist/Cell.pm (revision 40586)
+++ Netlist/Cell.pm (working copy)
@@ -40,6 +40,7 @@
byorder => '$', # True if Cell call uses order based pins
1. after link():
submod => '$', #' # Sub Module reference
+ gateprim => '$', #' # Primitive (and/buf/cmos etc), but not UDPs
1. system perl
_autoinst => '$', #' # Marked with AUTOINST tag
]);
@@ -80,7 +81,11 @@
sub _link {
my $self = shift;
$self->_link_guts();
+ if (!$self->submod && Verilog::Language::is_gateprim($self->submodname)) {
+ $self->gateprim(1);
+ }
if (!$self->submod()
+ && !$self->gateprim
&& !$self->netlist->{_relink}
&& !$self->module->is_libcell()
&& $self->netlist->{link_read}) {
@@ -107,7 +112,7 @@

sub lint {
my $self = shift;
- if (!$self->submod() && !$self->netlist->{link_read_nonfatal}) {
+ if (!$self->submod() && !$self->gateprim && !$self->netlist->{link_read_nonfatal}) {
$self->error ($self,"Module reference not found: ",$self->submodname(),,"\n");
}
if (!$self->netlist->{skip_pin_interconnect}) {
===================================================================
--- Language.pm (revision 40586)
+++ Language.pm (working copy)
@@ -188,7 +193,7 @@
require Exporter;

use strict;
-use vars qw($VERSION %Keyword %Keywords %Compdirect $Standard);
+use vars qw($VERSION %Keyword %Keywords %Compdirect $Standard %Gateprim);
use Carp;

######################################################################
@@ -260,6 +265,12 @@

language_standard ('1800-2005'); # Default standard

+foreach my $kwd (qw(
+ and buf bufif0 bufif1 cmos nand nmos nor not notif0
+ notif1 or pmos pulldown pullup rcmos rnmos rpmos rtran
+ rtranif0 rtranif1 tran tranif0 tranif1 xnor xor
+ )) { $Gateprim{$kwd} = '1364-1995'; }
+
######################################################################
#### Keyword utilities

@@ -305,6 +316,11 @@
return ($Compdirect{$symbol});
}

+sub is_gateprim {
+ my $symbol = shift;
+ return ($Gateprim{$symbol});
+}
+
######################################################################
#### String utilities

===================================================================
--- vhier (revision 40586)
+++ vhier (working copy)
@@ -165,7 +165,7 @@
my %miss_names;
foreach my $mod ($nl->modules) {
foreach my $cell ($mod->cells_sorted) {
- if (!$cell->submod) {
+ if (!$cell->submod && !$cell->gateprim) {
$miss_names{$cell->submodname} = 1;
}
}

Mon Jun 18 15:05:29 2007 RT_System - Status changed from 'new' to 'open'

Mon Jun 18 15:05:30 2007 WSNYDER - Status changed from 'open' to 'resolved'

Mon Jun 18 18:11:38 2007 jetrull - Correspondence added

From: 	jetrull@

This patch resolves the issue for my test cases. Thanks!

Mon Jun 18 18:11:40 2007 RT_System - Status changed from 'resolved' to 'open'

Fri Jun 22 10:55:17 2007 WSNYDER - Broken in 3.001 added

Fri Jun 22 10:55:18 2007 WSNYDER - Broken in 3.000 deleted

Fri Jun 22 10:55:18 2007 WSNYDER - Correspondence added

Resolved in 3.001

Fri Jun 22 10:55:20 2007 WSNYDER - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants