Giter VIP home page Giter VIP logo

Comments (3)

troelsfr avatar troelsfr commented on August 17, 2024

It may also be a difference in versions of SystemVerilog as you point out in the other thread.

from yosys.

cliffordwolf avatar cliffordwolf commented on August 17, 2024

I would assume that the two tools that you mentioned parse this as an empty module item, not an optional semicolon at the end of the statement. However, I don't think an empty module item is part of either Verilog or SystemVerilog.

Also: '0' is not a valid Verilog expression. The strings 0 and "0" both would be..

I thought I'd add support for empty module items and just print a warning for them, but as it turns out, at least the naive way of doing that would introduce reduce/reduce conflicts into the Yosys Verilog parser. So I'm not adding support for that..

from yosys.

troelsfr avatar troelsfr commented on August 17, 2024

First of, sorry about '0', it should just have been 0, or 1'b0 - I wrote this minimal example from a more complicated one without testing it before submitting the ticket.

I am not sure what you mean by an "empty module item". Whether or not I have a semicolon at the "end" keyword, the code works and it behaves the same in both case, hence, the phrasing optional. Just to be sure that you understood me correctly here are the two versions:

module top(A, clk, rst);
   input clk, rst;   
   output A;   

   always @(posedge clk, posedge rst) begin
      A <= 0;      
   end;  
endmodule 

vs.

module top(A, clk, rst);
   input clk, rst;   
   output A;   

   always @(posedge clk, posedge rst) begin
      A <= 0;      
   end
endmodule 

This is not a reopening of the ticket, I just wanted to make sure that I was clear enough in the first ticket.

from yosys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.