Jump to content
wszhong631

why 'payloadsegment[0]' is not a legal c identifier name,but payloadseqment_0_ ?!

Recommended Posts

in order to watch UVM_details windows in questasim10.2c/10.2b,vlog option + questa_uvm_pkg options.

Makefile as follows:

 

questa_uvm_pkg=/app/mentor/questasim_10.2c/questasim/verilog_src/

 

vlog +incdir+$(uvm_home)/src $(uvm_home)/src/uvm.sv \
+incdir+$(questa_uvm_pkg) $(questa_uvm_pkg)/questa_uvm_pkg.sv
...............

under of simulation,report warning as follows:

questasim/verilog_src/questa_uvm_pkg_1.2/src/questa_recorder.svh(364) @4080840000: reporter [iLLEGALNAME] 'payloadsegment[0]' is not a legal c identifier name.change to
questasim/verilog_src/questa_uvm_pkg_1.2/src/questa_recorder.svh(366) @4080840000: reporter [iLLEGALNAME]
'payloadsegment_0_' Attibutes mus be named as a legal cidentifier.

 

and in monitor.svh,
     foreach(payloadsegment)
          payloadsegment=data;

and in UVM_details window, as sequence is added to waves

,we sees randomized sequence item ,payloadsegment_0_,payloadsegment_1_,payloadsegment_2_。

 

   why payloadsegment is not legal c identifier?!

   but if the same codes rerun in questasim10.1d,above warning not reported.

Share this post


Link to post
Share on other sites

You have a real error -- from the printout. It looks like you have a mis-spelling somewhere, although the error is not indicative of what is wrong.

 

1. How have you defined your payload???

From the output it looks like you defined something payloadseqment. (seqment)  NOT payloadsegment (segment).

2. The foreach look correct.  I would further debug this and see how you defined payloadse?ment.

 

Probably when you define the payload -- you spelled it as payloadseqment not payloadsegment and it is an array [] -- that is why you see the individual elements in the sequence.

 

I am not sure -- why you did not receive a compile error.

Share this post


Link to post
Share on other sites

You have a real error -- from the printout. It looks like you have a mis-spelling somewhere, although the error is not indicative of what is wrong.

 

1. How have you defined your payload???

From the output it looks like you defined something payloadseqment. (seqment)  NOT payloadsegment (segment).

2. The foreach look correct.  I would further debug this and see how you defined payloadse?ment.

 

Probably when you define the payload -- you spelled it as payloadseqment not payloadsegment and it is an array [] -- that is why you see the individual elements in the sequence.

 

I am not sure -- why you did not receive a compile error.

 

sorry,payloadseqment is a mis-spelling error when written this question. in sequence_item.svh,

   rand  [7:0] payloadsegment[];  // payloadsegment that  payload of some packets 

 

https://verificationacademy.com/forums/uvm/why-payloadsegment0-not-legal-c-identifier-namebut-payloadseqment0

 

Dave_59  says as follows

"This warning is generated by Questa's built-in UVM-aware debug facilities. In order to use the debugging tools, the UVM created paths need the ability to be parsed by the command line. All vendor tools have this problem. You can ignore these warnings if you do not plan to use these debug facilities.

Note that the upcoming UVM 1.2 standard plans to require proper identifier names, not just any string. You will get an error if you do not fix them. See http://www.eda.org/svdb/view.php?id=4712

"

 

 

indeed, if  not add "+incdir+$(questa_uvm_pkg) $(questa_uvm_pkg)/questa_uvm_pkg.sv", lot of warnings that sees if very Annoying will not be reported。

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×