Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Verilog-Perl CPAN distribution.

Report information
The Basics
Id: 24247
Status: resolved
Priority: 0/
Queue: Verilog-Perl

People
Owner: Nobody in particular
Requestors: jetrull [...] sbcglobal.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.361
Fixed in: 3.000



Subject: Quoted cell names absorb terminating whitespace
Download (untitled) / with headers
text/plain 381b
A cell declaration like this: modname \UU_cellname (... gets stored in the parser as "\UU_cellname " (note trailing space). This isn't a problem if the cell name is simply read in and then written back out later, but if you want to use, for example, $mod->find_cell, it will fail without the embedded space. The solution is simple and a patch is attached. Regards, Jeff Trull
Subject: cellname_space.diff
Download cellname_space.diff
text/x-diff 499b
--- Verilog-Perl-2.361/Parser.pm 2006-10-02 06:22:50.000000000 -0700 +++ Verilog-Perl-2.361-mrhack/Parser.pm 2007-01-05 15:06:32.924728000 -0800 @@ -406,7 +406,7 @@ $self->{inquote} = 1; } elsif (($text =~ s/^([a-zA-Z_\`\$][a-zA-Z0-9_\`\$]*)//) - || ($text =~ s/^(\\\S+\s+)//)) { #cseddon - escaped identifiers + || ($text =~ s/^(\\\S+)\s+//)) { #cseddon - escaped identifiers my $token = $1; if (!$self->{inquote}) { if (Verilog::Language::is_keyword($token)) {
From: jetrull [...] sbcglobal.net
Download (untitled) / with headers
text/plain 808b
I guess it's not as simple as I thought - once the trailing spaces are no longer stored as part of the symbol (cell or net name) you need to take extra care to add whitespace whenever you output a quoted symbol. Minor changes to SigParser.pm and Netlist/Net.pm are required, which I can provide if desired (need to separate out my other patches). Jeff On Fri Jan 05 18:32:25 2007, jetrull wrote: Show quoted text
> A cell declaration like this: > > modname \UU_cellname (... > > gets stored in the parser as "\UU_cellname " (note trailing space). > This isn't a problem if the cell name is simply read in and then written > back out later, but if you want to use, for example, $mod->find_cell, it > will fail without the embedded space. > > The solution is simple and a patch is attached. > > Regards, > Jeff Trull
Download (untitled) / with headers
text/plain 366b
Hmm, my approach of removing the \ and space, then having a function to add back the quoting doesn't work, because of complicated pin connection expressions. It would need to know exactly where each signal name begins and ends. Instead, I think if I remove the \ and space for symbols that don't need it, it will all be consistent and cells will resolve properly.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.