• 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. MixedLanguage (Verilog+VHDL) Question

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 65
  • Views 2137
  • 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

MixedLanguage (Verilog+VHDL) Question

ashfaqh
ashfaqh over 15 years ago

 Hello:

 I am using  ncsim   09.20-s016.

 I have a VHDL DUT.  The testbench top level is VHDL.  But, I have a few Verilog modules in the testbench.

From one of the Verilog modules, I want to access (monitor) a signal inside the DUT (VHDL). 

For example,

if (top.level_1.level_2.sigout_1 == 1'b1) 
            $display("Posedge received at time: %d", $time) ;

 I get the following error:

 ncelab: *E,CUVHNF (...): Hierarchical name component lookup failed at 'top'.

 

1.  Is it not possible to monitor a signal  inside a VHDL block from a Verilog module?

 

Thanks.

  • Cancel
  • Mickey
    Mickey over 15 years ago

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mickey
    Mickey over 15 years ago
    Hello, If the top instance is vhdl the path should begin with a ":". With that in mind try (:top.level_1.level_2.sigout_1 == 1'b1). btw if you want to know the correct path to the object, you can comment out the problem code and go ahead and compile/elab/simulate in gui mode. when in the gui choose the sigout_1 signal from any of the simvision windows. then right mouse button and choose the describe option from the menu. The result will be the correct path to the object that should be used in the code. Hope that helps. Mickey
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Mickey
    Mickey over 15 years ago

    I'm sorry, but I gave you incorrect information in the previous post.  From a verilog scope you can't directly reference an object that begins with a vhdl instance.  What you need to use is $nc_mirror to mirror that value of the object into a reg in a verilog scope.  You can then use the verilog object in the code.  for example:

    reg my_probe;

    initial

         $nc_mirror ("my_probe", ":top.level_1.level_2.sigout_1");

    always @(my_probe)

         if (my_probe == 1'b1);

              do_something;

    Feel free to email me at jrodrig@cadence.com if you have any questions.

    Sorry for the confusion.

    Mickey

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • ashfaqh
    ashfaqh over 15 years ago

    Mickey:

    Your suggestion has worked very nicely!  Thank you very much for your help. 

    I wasn't aware of the $nc_mirror() task which allows VHDL signals to be probed from Verilog module.  

    I also successfully experimented by calling a user-defined Verilog task() from a verilog island module inside a VHDL top-level DUT -- that also works fine.

     For example, expanding on your example, the t_write() task call inside the island verilog module executes correctly in ncsim.

    Thanks again.

    -ashfaqh

     

    reg my_probe;

    initial

         $nc_mirror ("my_probe", ":top.level_1.level_2.sigout_1");    // sigout_1 is a VHDL signal

    always @(posedge my_probe)

       begin

            $display("my_probe asserted high at time: %d", $time) ;
            top_vhdl_level.vhdl_level_2.vhdl_level_3.verilog_module.t_write() ;    // t_write() is task inside verilog module

       end

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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