Home > Community > Forums > Functional Verification > Share Queue between class?

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: *

 Share Queue between class? 

Last post Thu, Feb 1 2007 10:41 PM by archive. 2 replies.
Started by archive 01 Feb 2007 10:41 PM. Topic has 2 replies and 1159 views
Page 1 of 1 (3 items)
Sort Posts:
  • Thu, Feb 1 2007 10:41 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Share Queue between class? Reply

    Hi all,

    I am using IUS583. And I want to do transaction layer class object transfer using Queue.
    I think there maybe two methods listed below.
    1. share queue with two different class
    2. share queue (maybe local queue) with two different tasks within one class
    My queue contain class object, is it feasible in IUS583? And is there any simple example to do that work?

    I have write method 1 and method 2 ,but it seems IUS583 always give out ncelab error:
    ncelab: *E,CUVHNF Hierarchical name component lookup failed at 'cmd_queue'.

    //method 1 snippet
    module top_tb;
    class cmd_c;
    ...
    endclass

    cmd_c cmd_queue[$];

    class transaction_gen;
    task run;
        ...
        cmd_queue.push_back (cmd)
    endtask
    endclass

    //method 2 snippet
    module top_tb;
    class cmd_c;
    ...
    endclass


    class transaction_gen;
    local cmd_c cmd_queue[$];
    task run;
        ...
        cmd_queue.push_back (cmd)
    endtask
    endclass

    Best regards,
    Davy


    Originally posted in cdnusers.org by davyzhu
    • Post Points: 0
  • Sat, Feb 3 2007 7:32 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Share Queue between class? Reply

    The following code worked with : ncverilog: 05.83-p002:

    module top;

    class cmd_c;
    integer i;
    endclass

    cmd_c cmd_queue[$];

    cmd_c cmd = new;

    class transaction_gen;
    task run;
    cmd_queue.push_back (cmd);
    $display("cmd Pushed..");
    endtask
    endclass


    transaction_gen tg = new;


    initial
    begin
    tg.run;
    $finish;
    end

    endmodule



    Originally posted in cdnusers.org by mirzani
    • Post Points: 0
  • Sun, Feb 4 2007 10:30 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Share Queue between class? Reply

    Hi mirzani,

    Thanks a lot! Your code work fine!

    Best regards,
    Davy


    Originally posted in cdnusers.org by davyzhu
    • Post Points: 0
Page 1 of 1 (3 items)
Sort Posts:
Started by archive at 01 Feb 2007 10:41 PM. Topic has 2 replies.