fvutils / pyvsc

Python packages providing a library for Verification Stimulus and Coverage
https://fvutils.github.io/pyvsc
Apache License 2.0
113 stars 26 forks source link

Getting "Attribute error:" while using "else_then" statement ! #6

Closed ShraddhaDevaiya closed 4 years ago

ShraddhaDevaiya commented 4 years ago

Hello, Follwing is the code that I am running for else_then statement : image

It is giving an error like following : image

Can you please help me in this and suggest some solution for this?

mballance commented 4 years ago

Ah... This is an interesting one. The Python error is certainly not very helpful. The way the current library is implemented, the vsc.else_then requires parens ( vsc.else_then(): ). So, if you add parens on the vsc.else_then branch, your current code will work.

After looking at this, I'm not sure it's intuitive that else_then would require parens. So, I've updated the library to work whether or not parens are specified. Thanks for pointing this out!

ShraddhaDevaiya commented 4 years ago

hello, I tried this "else_then()" modification but it is giving an error like following :

image

So, how can I resolve this?

ShraddhaDevaiya commented 4 years ago

It is working. There was an issue at my end. Thanks for helping !