Issue #256
vhier support of "myreg <= #`FFDLY 'b0;" Verilog notation
| Status: | Assigned | Start date: | 05/27/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Wilson Snyder | % Done: | 0% | |
| Category: | - | |||
| Target version: | - |
Description
When running vhier on the code with "myreg <= #`FFDLY 'b0;" Verilog notation, I'm getting the following error:
%Error: /mypath/myfile.v:some_line: syntax error, unexpected ';', expecting CLASS-IDENTIFIER or COVERGROUP-IDENTIFIER or TYPE-IDENTIFIER
The code is:
`define FFDLY 100 always @(posedge clk) begin if (reset) begin myreg1 <= #`FFDLY 7'd0; myreg2 <= #`FFDLY 'b0; ....
No other synthesis and sim tool has a problem with that.
History
#1 Updated by Wilson Snyder about 3 years ago
- Status changed from New to Assigned
- Assignee set to Wilson Snyder
Wow, you're right.
Looking at the spec, the leading hash means "# 1 'b0" must be interpreted as "# 1" then "'b0" while if the leading "#" wasn't there it would be "1'b0". Ditto any other place a integer can appear "next to" a based number. Thus numbers can't be determined standalone without knowing the context. That's a really nasty thing for any language standard to require.
Let me think about this. Meantime, use #(`FFDLY) or #`FFDLY 1'b0.
#2 Updated by Wilson Snyder over 1 year ago
This is a duplicate of bug406 (for verilator).
#3 Updated by Wilson Snyder about 1 year ago
See also bug507 (which was hacked around so now resolved).
![[logo]](/img/veripool_small.png)