Issue #510
Error with unsized elements in tristate select
| Status: | Closed | Start date: | 05/08/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% | |
| Category: | Unsupported | |||
| Target version: | - |
Description
The following code fails:
module t (clk); input clk; wire [1:0] b; wire [1:0] c; wire [0:0] d; // Explicit width due to issue 508 wire [0:0] e; assign b[1:0] = clk ? 2'bx : 'bz; assign c[1:0] = clk ? 2'bz : 'bx; assign d = clk ? 1'bx : 'bz; assign e = clk ? 1'bz : 'bx; endmodule // t
The errors given are:
%Error: t/t_tri_select_unsized.v:22: Unsupported RHS tristate construct: SEL %Error: t/t_tri_select_unsized.v:23: Unsupported RHS tristate construct: SEL %Error: t/t_tri_select_unsized.v:24: Unsupported RHS tristate construct: SEL %Error: t/t_tri_select_unsized.v:25: Unsupported RHS tristate construct: SEL
(where lines 22-25 iare the lines with the select). The error does not occur if we give an explicit length, even if it requires extending. For example the following is OK.
assign b[1:0] = clk ? 2'bx : 1'bz;
Since we get the same error even if we declare wire [0:0] d;, this may be connected to Issue 508.
Please pull a testcase from https://github.com/jeremybennett/verilator/tree/z-select-unsized
History
#1 Updated by Wilson Snyder about 1 year ago
- Category set to Unsupported
- Status changed from New to Resolved
- Assignee set to Wilson Snyder
Fixed in git. This included a major tristate change, so it might have broken something else.
![[logo]](/img/veripool_small.png)