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

Trouble mixing older Verilog port syntax with SystemVerilog interfaces #868

Closed
veripoolbot opened this issue Jan 7, 2015 · 3 comments
Closed
Assignees
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Kevin Thompson
Original Redmine Issue: 868 from https://www.veripool.org
Original Date: 2015-01-07
Original Assignee: Wilson Snyder (@wsnyder)


I am receiving the following error:

syntax error, unexpected '.', expecting IDENTIFIER

I inherited a number of Verilog files that I need to convert to SystemC. For some reason the port list is in the old Verilog format but then uses new SytemVerilog interfaces. I have produced a very stripped down example below that mimics this and I compiled it with unused, undriven warnings suppressed:

//`define OLD_PORT_LISTING 1

interface addr_if();
    
    logic aready;
    logic aid;
    
    modport master(input aready, output aid);

    modport slave(output aready, input aid);

endinterface


`ifdef OLD_PORT_LISTING
module mc_test(dclk,
                axi0_if);

    input dclk;
    addr_if.slave axi0_if;

endmodule

`else

module mc_test(input dclk,
	       addr_if.slave axi0_if);

endmodule

`endif

module mc_top();

    logic dclk;

    addr_if addr_if_dut();
  
    mc_test test_module(dclk, addr_if_dut.slave);
    
endmodule

If the `define is uncommented, the error that I specified before is generated.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-01-17T20:38:08Z


Thanks for the test case. Surprisingly it looks like Verilog-Perl's parser that should handle almost everything gets this wrong too, so verilator inherited it.

Fixed in Verilog-Perl git towards 3.409

Fixed in verilator git towards 3.869.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Kevin Thompson
Original Date: 2015-01-20T22:18:36Z


Thank you for fixing this issue.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-02-13T01:41:12Z


In 3.870.

@veripoolbot veripoolbot added area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: parser Issue involves SystemVerilog parsing resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants