• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

leonardt / verilogAST-cpp / 535 / 2
99%
master: 98%

Build:
Build:
LAST BUILD BRANCH: simplify-regex
DEFAULT BRANCH: master
Ran 27 Aug 2020 12:38AM UTC
Files 10
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Aug 2020 12:18AM UTC coverage: 98.263%. First build
MATRIX_EVAL="GCOV=gcov"

push

travis-ci-com

leonardt
Fix inline blacklist logic for recursive case

Before if we had a module such as:
```verilog
module test_module (
    input [4:0] i1,
    input [4:0] i2,
    output [3:0] o0,
    output [3:0] o1,
    output [3:0] o2
);
wire [4:0] x;
wire [4:0] y;
wire [4:0] h;
wire [4:0] g;
assign x = i1 + i2;
assign h = i1 - i2;
assign g = h;
assign o0 = x[3:0];
assign y = i1;
assign o1 = y[3:0];
assign o2 = g[3:0];
endmodule;
```

We would get

```verilog
module test_module (
    input [4:0] i1,
    input [4:0] i2,
    output [3:0] o0,
    output [3:0] o1,
    output [3:0] o2
);
wire [4:0] x;
wire [4:0] h;
assign x = i1 + i2;
assign o0 = x[3:0];
assign o1 = i1[3:0];
assign o2 = (i1 - i2)[3:0];
endmodule;
```

Notice the (i1 - i2) is inlined into the slice node, which is invalid.

The reason was the blacklisting logic was not recursively checking
identifiers.  That is, when we encounter a slice, we let a an
identifier be inlined for another identifier into the contents of the
slice.  However, this is problematic when the identifier being inlined
will in turn be replaced by something which may not be valid (e.g. an
expression).  So, we improve the blacklisting logic to recursively check
inlined identifiers until we encounter an invalid driver of inlining.
At this point, we blacklist the current identifier so that it will not
be eventually inlined into the slice/index node.

So, for the above example we now get
```verilog
module test_module (
    input [4:0] i1,
    input [4:0] i2,
    output [3:0] o0,
    output [3:0] o1,
    output [3:0] o2
);
wire [4:0] x;
wire [4:0] h;
assign x = i1 + i2;
assign h = i1 - i2;
assign o0 = x[3:0];
assign o1 = i1[3:0];
assign o2 = h[3:0];
endmodule;
```

1075 of 1094 relevant lines covered (98.26%)

97.31 hits per line

Source Files on job 535.2 (MATRIX_EVAL="GCOV=gcov")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 477
  • Travis Job 535.2
  • 0aa25698 on github
  • Next Job for MATRIX_EVAL="GCOV=gcov" on fix-inline-slice-logic (#540.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc