Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%Error: ...: Unsupported tristate construct: BEGIN 'genblk5' #512

Closed
veripoolbot opened this issue May 9, 2012 · 3 comments
Closed

%Error: ...: Unsupported tristate construct: BEGIN 'genblk5' #512

veripoolbot opened this issue May 9, 2012 · 3 comments
Assignees
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Alex Solomatnikov
Original Redmine Issue: 512 from https://www.veripool.org
Original Date: 2012-05-09
Original Assignee: Wilson Snyder (@wsnyder)


Source code:

generate 
if (USE_OUTPUT_STROBE == "true") 
begin: output_strobe 
...
        if (USE_BIDIR_STROBE == "true") 
         begin 

error on the last line:

%Error: ...: Unsupported tristate construct: BEGIN 'genblk5'

This didn't happen before recent changes.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-09T11:00:59Z


Can you attach a complete testcase? There must be tristate generating or under that statement.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Alex Solomatnikov
Original Date: 2012-05-09T21:26:21Z


Test case:

module adq_dqs2_abstract (
         strobe_io,
         strobe_n_io
);

parameter USE_OUTPUT_STROBE = "true";
parameter DIFFERENTIAL_OUTPUT_STROBE = "false";
parameter USE_BIDIR_STROBE = "false";

inout strobe_io;
inout strobe_n_io;

localparam DELAY_WIDTH = 32;

wire [DELAY_WIDTH-1:0] dqs_out_dtap_delay;

generate
if (USE_OUTPUT_STROBE == "true")
begin: output_strobe
         wire aligned_os_oe;
         wire aligned_strobe;

         if (USE_BIDIR_STROBE == "true")
         begin
                 reg strobe_r = 1'b0;
                 reg strobe_n_r = 1'b0;
                 always @(aligned_os_oe or aligned_strobe)
                 begin
                         strobe_r =/*<= #(dqs_out_dtap_delay)*/ ~aligned_os_oe ? aligned_strobe : 1'bz;
                         if (DIFFERENTIAL_OUTPUT_STROBE=="true")
                                 strobe_n_r =/*<= #(dqs_out_dtap_delay)*/ ~aligned_os_oe ? ~aligned_strobe : 1'bz;
                 end
                 assign strobe_io = strobe_r;
                 if (DIFFERENTIAL_OUTPUT_STROBE=="true")
                         assign strobe_n_io = strobe_n_r;
         end

end 
endgenerate

endmodule


module adqdqs (
         strobe_io,
         strobe_n_io
);

inout strobe_io;
inout strobe_n_io;

         adq_dqs2_abstract adq_dqs2_inst (
                 .strobe_io( strobe_io),
                 .strobe_n_io( strobe_n_io)

         );
         defparam adq_dqs2_inst.USE_OUTPUT_STROBE = "true";
         defparam adq_dqs2_inst.DIFFERENTIAL_OUTPUT_STROBE = "true";
         defparam adq_dqs2_inst.USE_BIDIR_STROBE = "true";

endmodule

Error:

verilator --cc test.v --top-module adqdqs
%Error: test.v:24: Unsupported tristate construct: BEGIN 'genblk1'

Note that if adq_dqs2_abstract is compiled as top, verilator does not complain.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-10T00:34:49Z


Thanks for the case; fixed in git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants