cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
taichi730
Observer
Observer
1,641 Views
Registered: ‎07-02-2019

Unexpected "[Synth 8-6038]" and "[Synth 8-660]" errors

Jump to solution

Hi,

When I tried to synthesis RTL with a function having following characteristics I got unexpected "[Synth 8-6038]" and "[Synth 8-660]" errors.

Characteristics of function:

  • Defined in interface
  • Function name is same as system function
    • function name: countones
    • system function name: $countones

This is a sample code to reproduce this problem.

 

interface foo_if;
  function logic countones(logic v);
    return v;
  endfunction
endinterface

module top(
  input   logic i_clk,
  input   logic i_rst_n,
  input   logic i_d,
  output  logic o_d
);
  foo_if foo();

  always_ff @(posedge i_clk, negedge i_rst_n) begin
    if (!i_rst_n) o_d <= '0;
    else          o_d <= foo.countones(i_d);
  end
endmodule

Synthesize the above code then you will see error messsages below.

[Synth 8-6038] cannot resolve hierarchical name for the item 'foo' ["/home/ishitani/workspace/test/func_name/func_name.sv":17]
[Synth 8-660] unable to resolve 'countones' ["/home/ishitani/workspace/test/func_name/func_name.sv":17]

Function name is changed to different name, e.g. countones -> __countones, then this sample code can be synthesized.

I think this storange behavior is caned by Vivado's bug.

Regards,
Taichi Ishitani

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
apetley
Xilinx Employee
Xilinx Employee
1,616 Views
Registered: ‎06-14-2018
Hi,
Its not advisable to have same name of functions as that of system functions.
Coming to issue, yes vivado needs to fix this. Will raise a CR to get this fixed.

Regards,
Ajay

View solution in original post

2 Replies
apetley
Xilinx Employee
Xilinx Employee
1,617 Views
Registered: ‎06-14-2018
Hi,
Its not advisable to have same name of functions as that of system functions.
Coming to issue, yes vivado needs to fix this. Will raise a CR to get this fixed.

Regards,
Ajay

View solution in original post

taichi730
Observer
Observer
1,612 Views
Registered: ‎07-02-2019

Hi @apetley ,

Thank you for filing CR for this issue.

Regards,
Taichi Ishitani

0 Kudos