soloist_huaxin Posted November 22, 2017 Report Share Posted November 22, 2017 I'm building a SV class where it basically acts like broadcaster(see attached, class "bcast" is what I'm building) where it gets data object from one channel and broadcast it to others. I got the following error when compiling: vcs -sverilog -debug_all scratch.v Error-[ICTTFC] Incompatible complex type usage scratch.v, 45 Incompatible complex type usage in task or function call. The following expression is incompatible with the formal parameter of the task. The type of the actual is 'class data_p::myD3', while the type of the formal is 'class data_p::myD2'. Expression: this.data_obj Source info: base_p::\chan#(data_p::myD2)::get (this.in_chan, this.data_obj); My understanding is that the parameter for class "bcast" should get passed down when declaring the class member "in_chan", but VCS doesn't think so...Is there something I'm missing? scratch.v Quote Link to comment Share on other sites More sharing options...
dave_59 Posted November 22, 2017 Report Share Posted November 22, 2017 Works for me in Questa, and in the VCS on edaplayground.com. I mean I get no compilation errors, did not check the functionality of your code. Maybe you are using an older version, Also, I suggest using *.SystemVerilog as file extension of using *.v and -sverilog switch. That helps keep legacy Verilog files working. Quote Link to comment Share on other sites More sharing options...
soloist_huaxin Posted November 22, 2017 Author Report Share Posted November 22, 2017 10 minutes ago, dave_59 said: Works for me in Questa, and in the VCS on edaplayground.com. I mean I get no compilation errors, did not check the functionality of your code. Maybe you are using an older version, Also, I suggest using *.SystemVerilog as file extension of using *.v and -sverilog switch. That helps keep legacy Verilog files working. That's interesting...I'm using VCS 2017.03 so definitely not old version... result from VCS on edaplayground.com seems to match my expectation on functionality. It's using VCS 2014.10 so I'm not sure about what happened between the versions... Agreed on the second point - I just quickly typed up the file as example. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.