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

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

Build:
Build:
LAST BUILD BRANCH: simplify-regex
DEFAULT BRANCH: master
Ran 27 Aug 2020 12:36AM UTC
Jobs 2
Files 10
Run time 1min
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

pending completion
535

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;
```

1092 of 1105 relevant lines covered (98.82%)

137.5 hits per line

Jobs
ID Job ID Ran Files Coverage
1 535.1 (MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && GCOV=gcov-7") 27 Aug 2020 12:36AM UTC 0
98.82
Travis Job 535.1
2 535.2 (MATRIX_EVAL="GCOV=gcov") 27 Aug 2020 12:38AM UTC 0
98.26
Travis Job 535.2
Source Files on build 535
  • Tree
  • List 10
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Build #535
  • 0aa25698 on github
  • Next Build on fix-inline-slice-logic (#540)
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

© 2025 Coveralls, Inc