Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.verilog

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-10-2012, 08:51 AM
djarte
Guest
 
Posts: n/a
Default Using strings data types to force/probe desing signals (wires)

Hi everybody,

I am writing a generic verification task so i would like to parse the information of a table including signal names for a specific digital RTL block. I thought it could be a good idea to use a string data type to hold the signal names and then try to force them or probe them within my verification task. The problem is that as far as i know system verilog does not support string data types in force/probe commands. Please see the example below:

typedef struct { byte chicken_bit;
byte num_blocks;
string blk_names[];
string blk_clk[];
string blk_en_clk_check[];
string blk_clk_req[];
int clk_freq[];
} chicken_bit_s;

chicken_bit_s chicken_bit_table[];

There is a struct holding row information from the table initialized beforecompilation time. Also the dynamic array chicken_bit_table contains on each index the information for a specific struct variable (row). The dynamic string arrays defined inside the struct are used because each struct copy variable can have different number of strings. For example the blk_clk [] string dynamic array is initialized to the values {"tmp1_clk", "tmp2_clk"} where tmp1_clk and tmp2_clk are actual clk wires defined in the RTL. Ideally iwould like to use this string array elements to force or probe this signals in the RTL. As i said before this is not allowed in system verilog. You cannot probe or force a string. I can't also define this array as dynamic wire array and then initialize it using define commands to the hierarchy pathof the actual wires.

Any suggestion to solve this issue would be really valuable for me.

Thanks in advance.
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 07-10-2012, 04:31 PM
Mark Curry
Guest
 
Posts: n/a
Default Re: Using strings data types to force/probe desing signals (wires)

In article <09546fe4-1947-46f6-a7d4-624c291cf828@googlegroups.com>,
djarte <a.diakogiannhs@gmail.com> wrote:
>Hi everybody,
>
>I am writing a generic verification task so i would like to parse the information of a table including signal names for a specific digital RTL block. I thought it could
>be a good idea to use a string data type to hold the signal names and then try to force them or probe them within my verification task. The problem is that as far as i
>know system verilog does not support string data types in force/probe commands. Please see the example below:
>
>typedef struct { byte chicken_bit;
> byte num_blocks;
> string blk_names[];
> string blk_clk[];
> string blk_en_clk_check[];
> string blk_clk_req[];
> int clk_freq[];
> } chicken_bit_s;
>
>chicken_bit_s chicken_bit_table[];
>
>There is a struct holding row information from the table initialized before compilation time. Also the dynamic array chicken_bit_table contains on each index the
>information for a specific struct variable (row). The dynamic string arrays defined inside the struct are used because each struct copy variable can have different
>number of strings. For example the blk_clk [] string dynamic array is initialized to the values {"tmp1_clk", "tmp2_clk"} where tmp1_clk and tmp2_clk are actual clk
>wires defined in the RTL. Ideally i would like to use this string array elements to force or probe this signals in the RTL. As i said before this is not allowed in
>system verilog. You cannot probe or force a string. I can't also define this array as dynamic wire array and then initialize it using define commands to the hierarchy
>path of the actual wires.
>
>Any suggestion to solve this issue would be really valuable for me.


I've done similar in the past (well, just the probing part), and it boiled down to
one of two solutions:
1. Leverage the PLI
2. Using a Modelsim hook into TCL.

I chose the latter. Basically, I created some TCL in modelsim which monitored
for changes on an wire. When changes occured, it indicated that the testbench
wished to change what was being probed. From there modelsim took over and did
the requested operation. So most of the code was in TCL.

Don't know if/how this could be duplicated in other simulators. YMMV.
Not a pretty solution at all, but it worked.

Regards,

Mark




Reply With Quote
  #3 (permalink)  
Old 07-11-2012, 02:58 PM
djarte
Guest
 
Posts: n/a
Default Re: Using strings data types to force/probe desing signals (wires)

Hi Mark,

thanks a lot for the reply. Actually i have found a pretty solution in another forum for probing but also forcing signal wires when using strings holding the hierarchical path of the wire. If you are also interested you can look at the link below. Unfortunately i do not use a Modelsim simulator so it is rather complicated for me at the moment to follow your procedure.

http://verificationguild.com/modules...ewtopic&t=3422
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 03:56 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.