Home > Community > Forums > Custom IC SKILL > *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n"

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

 *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n" 

Last post Tue, May 21 2013 1:21 PM by Andrew Beckett. 3 replies.
Started by skillseeker 20 May 2013 01:20 PM. Topic has 3 replies and 832 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, May 20 2013 1:20 PM

    *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n" Reply

     Hello,

    Try to Create a Cadence view from the verilog file. Here is my section of the skill that it is having problem with.  If somebody has a easier way to create a Cadence view from a file let me know as well. I know what the problem here is but do not know the solution yet.

           if((ddGetObj(libName cellName viewName fileN nil "r") != nil) then
          CCScopyWrealCV(libName cellName viewName copyViewName)   
          ddDeleteObj(ddGetObj(libName cellName viewName fileN nil "r"))
          fileId = ddGetObj(libName cellName viewName fileN nil "w")
          WfileName = fileId~>readPath
          oPort  = outfile(WfileName)
          fileOut = infile(fileName)
          while(gets(string fileOut)
              fprintf(oPort string)          
          )
          close(fileOut)
          close(oPort)

    Thanks

    • Post Points: 20
  • Mon, May 20 2013 10:58 PM

    • skillUser
    • Top 10 Contributor
    • Joined on Fri, Sep 19 2008
    • Austin, TX
    • Posts 2,535
    • Points 14,940
    Re: *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n" Reply

    Hi,

    The function schInstallHDL might be what you are looking for?

    regards,

    Lawrence.

    • Post Points: 20
  • Tue, May 21 2013 7:51 AM

    Re: *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n" Reply
     Thanks this helps but it is triggering the cross-view checks when it is being generated.... I have tried setting

    "vmsCrossViewCheck" to nil. It still brings up the pop-ups which is not desirable in my case. Is there an overwrite i can use or do i have to delete the view first before re-creating it.

    I am creating other filetypes along with this and it looks like schInstallHDL only works for Verilog.

    Is there any way i can do it the way i was doing in the above code and handle special characters properly,,

    Thanks
    • Post Points: 20
  • Tue, May 21 2013 1:21 PM

    Re: *Error* fprintf/sprintf: illegal format spec. - " $monitor(\"Time: %t, Control Variable %f\\n\",$time,Ctrl_1_);\n" Reply

    Not really enough info to go on to solve all the problems, but you can fix your original code by changing:

              fprintf(oPort string)          

    to

              fprintf(oPort "%s" string)          

    Regards,

    Andrew.

    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by skillseeker at 20 May 2013 01:20 PM. Topic has 3 replies.