Jump to content

MATCHLIB (Connections::Combinational)


Recommended Posts

I need to tap into a connection port implemented using MATCHLIB (Connections::Combinational) so that I just print the transactions that the port captures. Of course, I can not bind to this port. The port is in a instance in the design files below the top hierarchy. I only need to print the transaction captured by this port from the top-level test bench. How do I do this? 

Pls help!  

Link to comment
Share on other sites

I recommend searching for and looking at the section titled "Introduction to Channel Logs" in this pdf:

https://github.com/Stuart-Swan/Matchlib-Examples-Kit-For-Accellera-Synthesis-WG/blob/master/matchlib_examples/doc/matchlib_training.pdf

This will generate a text file of all the transactions in your system. You can use the scripts described to generate a log for just the port/channel of interest.

If that isn't quite what you want, you can look at the C++ implementation of the log_hierarchy() method and write your own version that does what you want.

The existing logging infrastructure relies on a "callback" mechanism, so you can just implement your own callbacks and plug it into the existing infrastructure.

-Stuart Swan

 

Link to comment
Share on other sites

I added this code under sc_main:

 

  if (plusargs::test("LOG_CHANNELS")) {
    // Create log with record of Connections channels traffic
    channel_logs logs;
    INFO("Channel logs: channel_logs*.log");
    logs.enable("channel_logs", true);
    logs.log_hierarchy(*tb_inst);
  }
 

It generated two files: 

1) channel_logs_names.txt which has this info:

1 tb.ems_inst.cdaxi_inst.cd_ras_cmd_comb_out_dat
2 tb.ems_inst.cdaxi_inst.cd_ras_rrsp_comb_out_dat
3 tb.ems_inst.cdaxi_inst.cd_ras_wrsp_comb_out_dat
4 tb.ems_inst.cdaxi_inst.cd_ras_pcmd_comb_out_dat
5 tb.ems_inst.cdaxi_inst.cd_ras_prsp_comb_out_dat
 

2) channel_logs_data.txt    which is empty. Why there is no data in this file though I see many transactions issued and the test passed? 

Pls help! 

 

Link to comment
Share on other sites

It is possible that you are not seeing the transaction data in the *data.txt file because you are using an older version of connections.h along with some newer compile options.

I recommend upgrading to the latest release here:

https://github.com/Stuart-Swan/Matchlib-Examples-Kit-For-Accellera-Synthesis-WG/tree/master

Do a clean install, then place your testcase into the kit and try it out and see if that solves the issue.

Thanks

Stuart Swan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...