Wednesday, November 07, 2012

Developing OVM based testbench environment: Lessons learnt

On experience front, I only started about couple months back and I'm sure there is lots more for me to learn further. Why I wanted to write this blog is that about 4 years ago I had done specman e, though for a very short period, I was quite thorough with all the basics, later moved on to work on System Verilog (SV) and ever since its all about only SV at work. Worst thing was that I had completely forgotten whats and hows of 'e' and this time don't want that to happen!
Read through a lot of blogs, websites like testbench.in, verification academy, some eetimes posts etc (all of those sites that come up as the first few google results for methodology search). After some enough learning of basics, started creating a fresh TB env and following are some of the important observations that I thought:

1. Going by the traditional Layered architecture method, I had pulled up an analysis port from driver, just after calling get_next_item, that which my scoreboard will refer and does the comparison against the analysis port from the output monitor. 
  - What I should have actually done is to use an input monitor and the analysis port declaration in here for the scoreboard to pick the input packet. On a large scale, this layer is critical given that all we are targeting via any methodology is reusability. And by not doing this, I limit my scoreboard to be used just as a plug and play item at SoC level (say what I developed is at sub-system level) and now when I try to get this scoreboard to SoC level, it might need multiple modifications to suit the SoC level drivers and I'm only complicating the env instead of easing it.

2. $cast: I was, not a lil, but a lot confused and I'm not sure if I'm still all that clear with this. Firstly, when do I use this: for ex in my env, I use get_next_item and get the first sequence item. I $cast it to the configuration packet object and drive this one on the input interface to the DUT. 
For a long time, I was thinking, $cast is about the simple System Verilog dynamic casting where we try to cast an item of one datatype onto the one of different datatype. And in my env, because I always $cast a sequence item which is the only OVM object on to the configuration packet which is a OVM component, I was convinced probably casting an object to a component needs something more than just what a copy system call can do. 
Now in a discussion, some senior tells me it is not just that (read not that) and there is something more. It acts more like a deep copy. And the concept of relating SV dynamic casting to casting an ovm object onto a component sounds kinda stupid! 
That said, the question next is whats the difference between a deep copy and $cast. I brainstorm and find out, in OVM it's about copying a parent object to child object or copying a derived object onto another inherited object that share the same parent (meaning - 1. it's always from parent to child 2. of which the object that gets copied can have (generally has) more properties/methods defined). I'm only sticking on to this explanation now.

3. set_config_object and assign_vi
 These two constructs were great to know concept wise and there were no confusions until I got here: http://www.eetindia.co.in/STATIC/PDF/201004/EEIOL_2010APR28_EDA_TA_01.pdf?SOURCES=DOWNLOAD.
This document in specific compared assign_vi and set_config_object.
Basically, both these constructs have something to do with interfaces. But going through this article kinda added to confusions and I probably went around doing a research for almost about a day but I'm not convinced yet. Anyway, the simplest understanding is that set_config_object is complete only with a get_config_object and it is a one time declaration. while assign_vi is actually a task and whenever you want to call it, the task definition in that particular class adds additional code. 

4. ovm_report_object
 This is an interesting find for me. And only when I went about coding on my own, I hit this compile time error - Going back to the beginner level of verilog, every interview you give, you have this question the difference between task and function. So you can call ovm_report_object only from a function. That leaves you with this construct not being called from run task and okay with the other phases.

 5. There were couple of other scenarios that we were brainstorming about, may be trying to think out of the box ;) so 1. what happens if we have an empty ovm component defined in the environment - I think it would probably just throw a warning and would occupy some memory in the factory list of components. But the real time output - need to try out yet.  2. the incremental compilation stuff using factory. I kinda remember this existed in System verilog I mean the incremental compilation, not factory, but not sure though. Specman had this aeons ago needless to say. Also that, we have the verdi doing incremental compilation of the design to load the trace and waveforms after there are changes made to TB - got lots to explore huh!
 

Wednesday, April 04, 2012

2012

okay, I'm definitely not writing a new year blog, though I've been trying to gather a wee bit of interest ever since this year was born.
Quite an eventful year so far and happy to remember the amount of arguments with the spouse has gone way way down in this year. So when I say eventful, I must also be clear about to whom it was so and can't deny its been for him more than me ;)
Tirupathi trip - mid Jan, a very good darshan - felt peaceful and as if it was worked out at the right time of the year! Walking up the hill was an experience after years in life. Though the initial part was hectic and I was worried to see the hubby-dear struggle through the stairs, we somehow squeezed out energy and completed in 4hrs. The drive and company were an absolute pleasure, good to see the wedded life turning into heaven over time. Touch wood.
There has been another member arrived into the family, sister-in-law bore her 2nd kid and life has taken a new lead for all of us.
The new office space and the travel being made hectic, bangalore traffic is one helluva hopeless thing in the world - working from home is an utter bliss though its boring to be without the colleagues' company!
Couple of other good things in the making and I would post as and when it all take a great shape. To look back at all this reminds that however quick life moves on, there can never be a compensatory for what had happened, good or bad.
Reading through the Mahabharata (the illustrated retelling by Devdutt Pattanaik) these days, the couple hours I spend in the cab everyday - very refreshing!
Sometimes it feels, there is no excitement in whatsoever is "happening" in life. Signs of getting old, probably. But time and experience have definitely helped cultivate a lot of good habits. Turning into a more casual, helping, accepting personality in itself is a significant growth.
Being able to realize what the elders at home keep preaching since childhood, rather what was once considered the daily slogan that the jobless people at home sing around, is like, as if 'what goes around, comes around'. There is a very different learning from that, something of tremendous value.
To live with so many people, the way you start perceiving every relation, be it a friend or a cousin or a colleague or a stranger, over years, and such logic on similar lines, is all something I badly missed knowing couple of years ago.
When all "looks" well, at times there are things that are to be termed more than just "strange"! Well, I wouldn't completely agree, on the other hand, that its a strange quality, as what when consciously observed seems to be very common and there were very rare exceptions who did not belong to this pool, the pool that  lack comfort to just to be what they are. And even worse, they do not want others to be their own self.
A colleague here keeps saying that the Buddha teaches how to live in the reality. I admire this concept so much, that everytime when I get back to worry about something in the past, it rings to me that I gotta come back to reality! It teaches to not be carrying over any judgments from the day-to-day incidents, simply called being "non-judgmental".
For ex, you get into an argument with someone, say a week ago and then when I meet the person after a week, what I remember at the first look is about the argument that I had. In this, the reality is this week and the moment when I'm meeting this person, past is the week before and the then argument! I'm largely struck in the past that I lose the reality of meeting this person, here now and there's NO absolute argument in this reality! So, if you can be a Buddha, you'll probably not even remember the past week. and the percentage of happiness or a stress-free life is proportional. Will I gain this over practice, is a million dollar question. I'm however trying to do my best though.
These amazing concepts that, for once, when just listened will make you feel so light about life. And I can imagine how much of a positive impact can be gained, if only followed. The least I could do was to go on to read this book called "How to become Buddha in 5 weeks". I know, the title is roughly funny!
Curiosity and envy are the other two different foods for thought in a while now. I was reading this book "The difficulty of being good" by Gurucharan Das, he quotes that he is around 50+ now and so far in his life he has not met one single person who lives WITHOUT a bit of envy! And I feel, how true!
The goodness about growing up to be an adult is to realize that these are certain holes that are so common in a human and eventually we start accepting even an enemy - The benefits of growing up!
To end this post with, the recently spent Saturday early morning, driving along the NICE corridor - the thought what a good weather evoked in us - with no specific destination in mind, later end up on a typical  Kannada breakfast at the Kamat on the Mysore road is a pleasant musing to the tastebuds.
Life is good!
Thathatsu.

Wednesday, December 07, 2011

What has God got to do with your fork!?

Most days that went by, of late, I would say were quite philosophical, a little more than the normal dose. I'm not sure if that has got something to do with the Sani peyarchi that's coming the week next, like what my mom claims. But after all that which happened in the recent past and with a set of astrology followers around, I'm driven to give it a frequent thought, the topic that I always wanted to stay away from. More so because like a lot of other family mine was into misconceived astrology, way too much! For me astrology was always equal to fear. The fear of knowing mishaps of the future, with a few 'made-up' good things added by the 'incomplete' astrologer just to see some good profits. And therefore, to stay out of fear astrology became a blind-belief. Whatever bit of sense that I could make out of it is the cause of the 'sani peyarchi' statement above! :)

Getting back to the topic, more often than not I hear 'why is the most honest and ethical people are tested by "God" badly before they can taste success or even happiness, completely'! the keyword here - GOD!

I go back from here to remember Robert Frost's words,
"
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference.
"
While these are the commonly remembered words by a lot of us around, what impressed me now and always from "The Road Not Taken" were these:
"
Yet knowing how way leads on to way,
I doubted if I should ever come back.
"
All of us would have been taught various meanings of this poem, after all the school teacher has the authority ;) They all perhaps converge to the same idea.

It's like, in life there are going to be numerous such forks that you'll hit and it will solely be on one person, and that is you, to be responsible for the path that you choose and decide to traverse all along till the end with all the ups and downs, come what may! You may never be able to come back to a fork and try treading a different path than the one that you chose before - most importantly not without losing anything!
For me, pondering over this had let me realize the depth of decision making and the amount of responsibility an individual should take for a decision made by him/herself. So please, let's spare God alone!

If not anything else, let me strive to give him back the satisfaction for showering all his blessings on me through this one thing called 'life'. For no one can ever give back God anything for this gift of life - He is unconditional!!
For you the reader, I wish you get all the wisdom and be a better human everyday and thereby gratify the Almighty God!

Monday, November 21, 2011

1 Madhav Baug

Yesterday was a very fulfilled day after a real long time. Well not because my husband was out of town, not really. Somehow I could catch up with this 'far-fetched' concept in my dictionary - 'punctuality'. Starting my classes in the morning to being available for the get-together in the noon, I could make myself present on time. And to wrap all that up, a pleasant visual treat - impacts created by 1 Madhav Baug, at Ranga Shankara, ended my day in full contentment.

So whats all about this: Putting aside the story of the Play, which more discussed about the relationship between a Mother and a homosexual son, what impressed me was "Other Voices" and how the theater went on to conceptualize such an amazing idea! More here!
The play was at 9.30 in the night, Bangalore's weather contributing to the mind's chillness. It wasn't conducted in the auditorium where usually all the play/activities happen, which came across to be a sweet surprise. We climbed close to 4 floors up the building, lit by huge scented candles all along the path way. And there we have this cozy rectangular room at the corner set up with dim lights, mattress covered with a white bed linen and a couple of chairs on the sides., for the audience to sit... sit so closely to the actor. A very simple ambiance, dark wood table, a chair and a couple of lamps, created for the play, it added up to the richness of the idea. Revathi was all around the space, performing, the roles of the son and more of the mother. A role well done that she could push a few of them into tears and touch the emotional Q of a lot in the crowd. Hats off to Arundhathi Nag or whomsoever who contributed to all of it.

The play had a quite a lot of simple yet strong ideas to be conveyed. 'Everybody is unique and just someone, because it's a blood relationship, cannot be taken for granted';'Why is your children not growing up to be someone whom you expect them to be is a wrong question, have we all grew up to be what our parents exactly wanted us to be!' - they came across like a hard slap on my face - it felt very timely!

They had a simple Q&A at the end of the play and Revathi answered everything. During the play she often reiterated that the play has got nothing to do with her personal life that evoked this 'why' thought in me and 'whats wrong just if that's the case' which I asked her and was answered partly. What I liked the most is, when someone in the crowd confessed that he is a homosexual himself and his parents accepted him the way he is, she said its also about drawing a midway, before turning to be rebellious or accepted completely - how true!

It was a totally different experience, and I agree, it did create an impact to an extent that I did not expect it to!
Job well done! Kudos!

Monday, November 07, 2011

The best way

to kill time as I discovered is behavioral analysis. As in finding out the answers for the five magnificent "W"s in your own way. On that note, penning down a few funny and curious behaviors of people as I got discuss with 2 of my favorite friends over the weekend.

1. The previous generation, moms/dads and sorts, are so poor at covering up stuff.
- My friend explained an incident with his Mother. Like they planned to go out somewhere where his dad did not want them to go that day. They come back home with a Spencer's packet and his dad got to pull out some eatable, upon tasting he commented 'where did you buy this from, it tastes so bad. You must get this exchanged'. His mom answers curtly, 'the Spencer's next door.... NEXT DOOR na beta errrrr...'. The friend smirks wondering if he was on his dad's shoes, it would have just taken zero effort for him to get the situation so well. Now that's the previous generation for you. This is funny!
Another example: there is something about you that your relative knows already and they just want to open it up with you as if they had no clue about it while you can so very well make out the lame attempt! Now this is annoying!

2. The kind of people who just want to prove their point. As in a point that would be of no use proving it.
- A set of relatives (very elderly people - higher risk if they are in-laws) at home and then there is this someone who stays opposite door, that implies the one who can just watch your moves day in and day out. The previous night before the relatives arrived, I was "out" partying crazily. I was home late that the neighbor had noticed. The next morning while all the relatives are around, she pulls up this topic "so it was verrrrrry late by the time you were home last night, I peeped out at 11.30 and could not find your bike". I was like damn, is it so important to be talked now kinds, "not really I guess I was in by 11.30". Her: "no no.. not at all". Me: "Hmmm... may be 11.35 or something then". She says "Haaannn that's what! I checked exactly at 11.30" like as if she can NEVER be wrong. I mean I just could not make any sense out of the whole act. Or is it that the point proved is I was put at risk and there's some fun behind that? And this is more annoying :P

Onto, this set of elder generation who can never agree to what the younger ones say, well at the least not as a counter argument or as a "suggestion", not even while you have a general conversation. I'm unsure if I should call it ego or stubbornness or a time pass. Really. I mean there are people who want to make an argument, for the sake of passing time.
And then you find these people in town who make random comments. What's funny is that the amount of satisfaction they feel by doing that, how foolish! They can know that thing that doesn't even exist anywhere in the world, I mean that so random and then they can give you great ideas on all that if ever you tend to try that out!
Okay, its not that I want to create a Revolution 2020 that I want people to start thinking into stuff and work towards harmony. Just some passing thought, and of course, for the records ;)

So I wish you, the reader, to meet people who are that random, at some point of time in life, just to have some good laugh when you look back :)