Project

General

Profile

[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  Voneline
  WFH
General Info
  Papers

Issue #1205

Issue handling replications in new parser

Added by Leon Medpum almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
% Done:

0%


Description

Git version: 5f176d451876f859bce9ce294a67e3874aa2dfe6

We have some verilog that looks like this:
module submod1 (
    input [3:0] net1
);
endmodule

module top ();
    wire neta;

    submod1 submod1
    (.net1 ({neta,
             {3{1'b0}} })
    );
endmodule

When trying to link this verilog, I get the error:

%Error: top1.sv:10: Unexpected length in size of integer constant: "{3{1'b0}}".

I checked IEEE.1364-2005 and this seems to be legal syntax as per section 5.1.14

I can make it work if I convert this to the following, but I don't have the ability to actually modify our netlist.
module submod1 (
    input [3:0] net1
);
endmodule

module top ();
    wire neta;

    submod1 submod1
    (.net1 ({neta,
             3'b0 })
    );
endmodule

It links fine.

History

#1 Updated by Stefan Tauner almost 2 years ago

Leon Medpum wrote:

Git version: 5f176d451876f859bce9ce294a67e3874aa2dfe6

We have some verilog that looks like this: [...]

When trying to link this verilog, I get the error:

%Error: top1.sv:10: Unexpected length in size of integer constant: "{3{1'b0}}".

I checked IEEE.1364-2005 and this seems to be legal syntax as per section 5.1.14

I can make it work if I convert this to the following, but I don't have the ability to actually modify our netlist. [...]

It links fine.

Yes, replications are not supported with the pinselects option at the moment and I am not planning to implement them within the parser. The best option I see at the moment is to ignore them and copy them over as is so that it can be handled by user code if need be. The following patch accomplishes that.

Wilson: I have noticed another bug though, specifically when handling nested concatenations. The golden sample in @t/35_sigparser_ps.out:1150 is most likely not what we want. There the contents of {someotherbus[2],someotherbus[2]} are kinda duplicated. It is returned by the pinselects function as

{'netname' => '{someotherbus[2],someotherbus[2]}'},
{'lsb' => 2,'msb' => 2,'netname' => 'someotherbus'},
{'lsb' => 2,'msb' => 2,'netname' => 'someotherbus'}

Instead of the two individual components only:

{'lsb' => 2,'msb' => 2,'netname' => 'someotherbus'},
{'lsb' => 2,'msb' => 2,'netname' => 'someotherbus'}

I have fixed both issues in the following branch on github: https://github.com/uastw-embsys/Verilog-Perl/compare/replications_concats

KR, Stefan

#2 Updated by Wilson Snyder almost 2 years ago

  • Subject changed from Issue handling concatenations to Issue handling replications in new parser
  • Status changed from New to Resolved

Leon, thanks for the report, and Stefan for the patch.

Pushed to git towards 3.443.

#3 Updated by Wilson Snyder almost 2 years ago

  • Status changed from Resolved to Closed

Fixed in 3.444.

Also available in: Atom