• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. mailboxes

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 64
  • Views 16551
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

mailboxes

archive
archive over 17 years ago

Dear users,

I'm very new in programming SystemVerilog and hope, you can help me.

I just wanna use a mailbox inside a class and have written the following code:

class test;

.................

mailbox mbx_get;                           // mbx_get: layer gets data, mbx_put: layer sends data, mbx_int1 and mbx_int2: intern mailbox
mailbox mbx_put;
mailbox mbx_int1;
mailbox mbx_int2;
 
mbx_int1 = new;                           // mbx_int1: send (intern) from attach_header() to snd_pkt_phy()
mbx_int2 = new;                           // mbx_int2: send (intern) from receive_pkt_phy() to remove_header()


// Code

endclass : test


Note: class declaration is inside a program block.
Trying to compile this code fails with the error message (there are more, but these are the first:

ncvlog: *E,NOIPRT (class_layer2.sv,25|8): Unrecognized declaration 'mailbox' [SystemVerilog].
  mailbox mbx_put;
        |
ncvlog: *E,NOIPRT (class_layer2.sv,26|8): Unrecognized declaration 'mailbox' [SystemVerilog].
  mailbox mbx_int1;
        |
ncvlog: *E,NOIPRT (class_layer2.sv,27|8): Unrecognized declaration 'mailbox' [SystemVerilog].
  mailbox mbx_int2;
        |
ncvlog: *E,NOIPRT (class_layer2.sv,28|8): Unrecognized declaration 'mailbox' [SystemVerilog].


Can you tell me what to to. Searching by google just give me one hit and so, I couldn't solve the problem. Do I have to include something equivalent to the header-files in C programming language?

My second question ist the following:
I want to separate my classes from the program. Is there any possibility to generate something like object-files containing my classes?

I hope you can help me.
Thanks and best wishes!
Sebastian


Originally posted in cdnusers.org by sebastian
  • Cancel
Parents
  • archive
    archive over 17 years ago

    We addressed that exact topic almost exactly a year ago before we had support for classes. I did a search on mailboxes from this forum and found it. Go to http://www.cdnusers.org/Forums/tabid/52/view/topic/forumid/66/postid/2739/Default.aspx and you can find the discussion and an attachment that has the code for creating a mailbox class.

    Tim


    Originally posted in cdnusers.org by tpylant
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 17 years ago

    We addressed that exact topic almost exactly a year ago before we had support for classes. I did a search on mailboxes from this forum and found it. Go to http://www.cdnusers.org/Forums/tabid/52/view/topic/forumid/66/postid/2739/Default.aspx and you can find the discussion and an attachment that has the code for creating a mailbox class.

    Tim


    Originally posted in cdnusers.org by tpylant
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information