• 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. Custom IC Design
  3. Stimulus File Issues

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 15124
  • 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

Stimulus File Issues

Devin Atkin
Devin Atkin over 5 years ago

I'm working on the design for an image sensor and I'm trying to simulate a 64x64 array of pixels to make sure everything is working as it should because my design may potentially have some scalability issues. I have a stimulus file that I generated to provide each pixel with a different value to represent different levels of light exposure for the pixel. I decided to take an actual picture and run it through Matlab to create the stimulus file so that I could have a real image once I process the output of the array. 

The stimulus file looks like this 

simulator lang=spectre
LIGHT1 (\[#LIGHT<0>] 0) vsource dc=0.882353n
LIGHT2 (\[#LIGHT<1>] 0) vsource dc=1.217647n
LIGHT3 (\[#LIGHT<2>] 0) vsource dc=1.105882n
LIGHT4 (\[#LIGHT<3>] 0) vsource dc=0.988235n
LIGHT5 (\[#LIGHT<4>] 0) vsource dc=0.205882n
LIGHT6 (\[#LIGHT<5>] 0) vsource dc=0.270588n
LIGHT7 (\[#LIGHT<6>] 0) vsource dc=0.276471n
LIGHT8 (\[#LIGHT<7>] 0) vsource dc=0.258824n

on and on for 4096 different signals. But I'm getting these errors when I try and run the simulation 

1: Unexpected character `' in netlist. Cannot run the simulation because of syntax error. Correct the error and rerun the simulation.
ERROR (SFE-841):  1: Unexpected character `' in netlist. Cannot run the simulation because of syntax error. Correct the error and rerun the simulation.
ERROR (SFE-841):  1: Unexpected character `' in netlist. Cannot run the simulation because of syntax error. Correct the error and rerun the simulation.
ERROR (SFE-709):  2: No master specified for instance `LIGHT1'.
ERROR (SFE-874):  2: 8: Unexpected open square bracket "[". Expected block statement, end of file or end of line. Cannot run the simulation because of syntax error. Correct the error and rerun the simulation.

Any help would be really appreciated. I've been trying to find  guide that explains how to write stimulus files, but I haven't had any luck. 

Thank you, 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago

    There's a few issues here. First of all, stimulus files are not directly included into the simulator - they go through a process of mapping schematic names to simulator names (mostly this was useful in the days of flat netlisters when there was no clear relationship between the name on the schematic and the name in the netlist). That's achieved by using [#...] to map nets or [$...] to map instance names. For more info on this search in cdnshelp (which you can launch via the help menus in Virtuoso) for "stimulus file" or "Template Control File" (include the quotation marks in the second) to find the section which describes the syntax.

    In your case you've escaped the open square parenthesis, which means that the name translation doesn't happen, and the simulator gets the the literal square brackets - ([#LIGHT<0>] 0) - which is invalid spectre syntax. That's not what you wanted. So (in theory) you should have just omitted the backslash, but unfortunately there's a bug (CCR 752498 - has been there for some time) where the default mapping mechanism doesn't take into the account that it needs to add backslashes before the < and > in the resulting name, so it still fails, but in a different way. The older mapping mechanism that was used in the distance past worked OK, but since it was changed many years ago, it's been broken. The fact that it hasn't been fixed yet is an indication that not many people rely on this mapping mechanism. It is possible to tell ADE to revert to the older name mapping in the netlist, but I wouldn't recommend that in general just to fix this issue.

    By the way, you can click on the hyperlinks in the spectre log file and see the mapped file - you will see that it doesn't directly include your file, but instead includes a copy which has been copied into the netlist directory after mapping has been performed.

    So, the solution is just to use the names that are in the netlist - and then you can either specify the stimulus via the stimulus file or a model library or definition file (since you don't need it to do any mapping any more, you can also use model library or definition file). If you use model library or definition file to include it, it's a bit simpler:

    simulator lang=spectre
    LIGHT1 (LIGHT\<0\> 0) vsource dc=0.882353n
    LIGHT2 (LIGHT\<1\> 0) vsource dc=1.217647n
    LIGHT3 (LIGHT\<2\> 0) vsource dc=1.105882n
    LIGHT4 (LIGHT\<3\> 0) vsource dc=0.988235n
    LIGHT5 (LIGHT\<4\> 0) vsource dc=0.205882n
    LIGHT6 (LIGHT\<5\> 0) vsource dc=0.270588n
    LIGHT7 (LIGHT\<6\> 0) vsource dc=0.276471n
    LIGHT8 (LIGHT\<7\> 0) vsource dc=0.258824n

    If you use stimulus file still, you have to escape the escape, because the mapping process removes the first backslashes:

    simulator lang=spectre
    LIGHT1 (LIGHT\\<0\\> 0) vsource dc=0.882353n
    LIGHT2 (LIGHT\\<1\\> 0) vsource dc=1.217647n
    LIGHT3 (LIGHT\\<2\\> 0) vsource dc=1.105882n
    LIGHT4 (LIGHT\\<3\\> 0) vsource dc=0.988235n
    LIGHT5 (LIGHT\\<4\\> 0) vsource dc=0.205882n
    LIGHT6 (LIGHT\\<5\\> 0) vsource dc=0.270588n
    LIGHT7 (LIGHT\\<6\\> 0) vsource dc=0.276471n
    LIGHT8 (LIGHT\\<7\\> 0) vsource dc=0.258824n

    If  you want to get the real mapping issue fixed, I suggest you contact customer support and ask for a duplicate of CCR 752498 to be filed on your behalf.

    Regards,

    Andrew.

    • 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