-
Notifications
You must be signed in to change notification settings - Fork 50
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
`include directive should be allowed anywhere #128
Comments
It looks like this same issue extends to all compiler directives. |
@DanChianucci do you know what is generating the error? Are you using Verilator? If so, it is known to crash hard on most UVM syntaxes. Please see #31. |
The bundled antlr parser is generating the error |
Hi @DanChianucci, I finally got around to this. I don't think the problem is the package my_uvc_pkg;
`include "transaction_class.sv"
`include "monitor_class.sv"
// etc...
endpackage
class joe extends uvm_object;
`uvm_object_utils(joe);
function new(string name = "joe");
super.new(name);
endfunction: new
enclass joe
|
Changing from .svh to .sv fixes Issue #127 but not the error I am talking about in this issue |
Thanks @DanChianucci, I am able to reproduce this now. There are quite a few places that are missing allowance of includes. I'll try and capture as many as I can find. |
always @( * ) begin
if ( cond1 ) begin
case ( sig_key )
`DEF_CASE1 : sig_name <= 8'b0;
`DEF_CASE2 : sig_name <= 8'b1;
default : sig_name <= 8'b1;
endcase
end
end Gives "no viable alternative at input" for: It seems that ` sign and default are problems here. |
When instantiating module and using some
for constant port value - I also get "no viable alternative at input" for ` sign |
Currently I get an extraneous input error if the `include is anywhere except file scope.
ie) With UVM, it is common for the uvc package to simple contain includes for individual classes
The text was updated successfully, but these errors were encountered: