Want to stop simulation when i get a Error/warning

Hello,

I am getting the following error
Error-[CNST-ICE] Constraint infeasible constraints error
As the solver has encountered a failure due to an infeasible set of
constraints, the values printed during this solve cycle are invalid.
The solver will preserve original values.

Error-[CNST-CIF] Constraints inconsistency failure
Constraints are inconsistent and cannot be solved.
Please check the inconsistent constraints being printed above and rewrite
them.

This is seen only when running in vcs.

When i run in NCSIM i get OVM_WARNING

ncsim: *W,SVRNDF The randomize method call failed.
Observed simulation time : 1533247500 PS + 1
ncsim: *W,RNDOCS: These constraints contribute to the set of conflicting constraints:
ncsim: *W,RNDOCS: These variables contribute to the set of conflicting constraints:

OVM_WARNING @ 1533247500: reporter [RNDFLD] Randomization failed in ovm_do_with action

In both circumstances simulation does not stop and will continue to run.

I want to know ow can I stop simulation when i get the above error/warning.

Thanks in advance
Shreyas

You will need to check you vendor’s user manual. In Questa, there is a SolveFailSeverity setting that can be changed to stop the simulation.

In reply to dave_59:

Hi, Dave.

Is there a way to stop the simulation when a randomization constrain ERROR occured? For me usually that’s not a Warning but an ERROR.
I would like to do it from the vsim command line and not change the modelsim.ini.

Or to put the question in a different way: how can i change the values from modelsim.ini?
Is there an easy way to extend modelsim.ini without opening modelsim.ini and modifying a specific line?

Instead i would like to have like a file (e.g. modelsim_extension.ini) where i could change my own variables.

Thanks,
Aurelian

In reply to Aurelian_from_AMIQ:

You need to copy the modulesim.ini file and place it in a local directory so it it picked up first, or rename the copy and use -modelsimini switch.

In reply to dave_59:

Hi, Dave.

Thank you for the answer.
Unfortunately, that’s not extending, it’s just copying modelsim.ini localy or renaming modelsim.ini and then editing it in the same way: manually.

My keyword is automation. I’ll give more details about what i want to achive:

  1. There are a lot of settings available only from modelsim.ini (there is no vsim argument that does the same)
    E.g.
    SolveFailSeverity under vsim
    RunLength under vsim
    GenerateLoopIterationMax under vopt
    etc.

  2. I use a GUI to launch compilation (vlib,vlog) and simulation (vsim). The GUI gives me the flexibility of choosing arguments for compilation/simulation.
    E.g. : choose seed, testname, severity of certain messages, choose to fail on ranodomization errors, change the GenerateLoopIterationMax stop on first uvm error, change the RunLength etc.

  3. Sometimes i want to have SolveFailSeverity set, sometimes i don’t want. Sometimes i want to change GenerateLoopIterationMax to another value, sometimes i don’t.

  4. How do i change the value of SolveFailSeverity automaticaly (NOT by manually editing modelsim.ini)? I assume i need a super-smart script that finds exactly the place where SolveFailSeverity is placed in modelsim.ini, uncomment that line and change it’s value. That’s too complicated in my oppinion.

  5. I’ve tried to append to the end of modelsim.ini the SolveFailSeverity=1 but it does not work, because it seems it needs to be defined in the FIRST [vsim] area, somewhere in the middle of modelsim.ini. So, having a second [vsim] area inside modelsim.ini has no effect!

  6. My GUI script automatically deletes the old simulation directory and recreates a brand new one where it copies the modelsim.ini. But as i said i don’t want to open modelsim.ini and modify it manually. I want my GUI script to get my arguments and send them to vlog/vopt/vsim and even start the simulation automatically. So there should be no human intervention in between GUI script launching and vsim running and finishining with succes or error.

Having that said, i’m still positive that there might be a simple way to automatically change modelsim.ini and not manually edit it.

Is there, any?

I appreciate your time spent on reading the above.
Thanks.
Aurelian

In reply to Aurelian_from_AMIQ:

Aurelian,

The format of the .ini file is very simple and was defined for Microsoft Windows a long time ago. With an awk/perl/< insert_your_favorite_scripting_tool_here > script, it should be very simple to modify the modelsim.ini file to meet your needs.

This forum is not the best place to get help with specific tool support. You should contact Mentor support directly if you need more help.

Dave

In reply to dave_59:

Hello Shreya,

I simply use $fatal instead of $warning. I heard that, using high severity (as also mentioned by Dave) can be used to stop the simulation.

Hope this helps.

Regards, Vidya.