Home > Community > Forums > Functional Verification > Reg : problem with reg declaration in IUS58

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Reg : problem with reg declaration in IUS58 

Last post Sun, Apr 22 2007 11:52 PM by archive. 4 replies.
Started by archive 22 Apr 2007 11:52 PM. Topic has 4 replies and 1321 views
Page 1 of 1 (5 items)
Sort Posts:
  • Sun, Apr 22 2007 11:52 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Reg : problem with reg declaration in IUS58 Reply

    Hi all, I have declared a data member as reg. when i use it in an assign statement, I am supposed to get an error.Now 1. If i use the +sv switch i am not getting an error. 2. its showing an error if i do not use the +sv switch,which is as expected. I am using cadence IUS58, please clarify on this. thanks Manmohan


    Originally posted in cdnusers.org by mssajwan
    • Post Points: 0
  • Mon, Apr 23 2007 12:24 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Reg : problem with reg declaration in IUS58 Reply

    Hi Manmohan,

    If the data member is used on transaction layer, please declear it as bit (0/1) or logic (0/1/x/z).

    Best regards,
    Davy


    Originally posted in cdnusers.org by davyzhu
    • Post Points: 0
  • Mon, Apr 23 2007 12:29 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Reg : problem with reg declaration in IUS58 Reply

    Hi Davy,

    I have used the declaration inside a module

    module test();
    reg a,b;

    assign a = b ? 1 : 0 ;

    endmodule

    in this code with +sv command line option its not giving me an error.


    Originally posted in cdnusers.org by mssajwan
    • Post Points: 0
  • Mon, Apr 23 2007 6:45 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Reg : problem with reg declaration in IUS58 Reply

    In SystemVerilog, such code is now legal. Here's a snippet from the LRM:

    SystemVerilog extends the functionality of variables by allowing them to be either written by procedural statements or
    driven by a single continuous assignment, similar to a wire.

    A wire can have multiple continuous assignments, like drivers on a bus. A reg can only have a single continuous assignment.


    Originally posted in cdnusers.org by TAM
    • Post Points: 0
  • Mon, Apr 23 2007 7:07 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Reg : problem with reg declaration in IUS58 Reply

    Hi TAM,

    thanks a lot for the reply. my doubt is now clear even though i have not checked the LRM but your comments
    are sufficient.



    thanks & regards
    Manmohan Singh


    Originally posted in cdnusers.org by mssajwan
    • Post Points: 0
Page 1 of 1 (5 items)
Sort Posts:
Started by archive at 22 Apr 2007 11:52 PM. Topic has 4 replies.