Tuesday, August 19, 2008

Randy Pausch's Last Lecture

A fine lecture by a Carnegie Melon professor - Randy Pausch.

This lecture is titled "The Last Lecture". This video is about 80 minutes with over 6million views and 5-star rating by everyone who has rated so far.

This is also available in a nice interactive version which lets to read the transcript, move to any section of the video, text search the transcript, and view any ppt slides that sync with the video.

Randy Pausch died on July 25, 2008 from pancreatic cancer. He was 47.

Reblog this post [with Zemanta]

Friday, August 15, 2008

61

It is India's 61st independence day.

Abhinav Bindra winning India's first individual gold in Olympics after 28 years is indeed a great feat. This is his win, not India's. Though, many state governments wants to honor him with the tax payer's money. Probably, W. Bengal, Tripura, and Kerala governments might be the only three states not happy with Abhinav for how dare he defeat a Chinese in China?!

I read a nice article occasioning this day in today's Mint. The article is reproduced below.

If I Were Prime Minister...

My dear countrymen, countrywomen, brothers, sisters and dear children. Today we celebrate the 61st anniversary of our independence.

But given recent events and the disenchantment many Indians feel over the government, today I will diverge from my speeches past in this august location of the Red Fort, where our forefathers defended and fought for our freedom. I will not invoke the tricolour or the words of Mahatma Gandhi or even those of Pandit Jawaharlal Nehru. Because, my brothers and sisters, we have reached a critical moment in our nation’s history and the responsibility of its citizens. The state of India and the many fractious Indians within are in crisis, making hindsight and nostalgia a most useless exercise.

Let me be the first head of state to say that perhaps government will not be the answer to your problems. You are.

Thus, I dedicate these words not to the two-thirds of the nation I usually pander to — farmers — but the other two-thirds: our nation’s youth, those under the age of 35 who stand on the cusp of whether this 61-year-old experiment will prosper or sputter.

For at least two years now, I have come here and laid out my mission for this country: An India that is united in thought, not divided by religion and language. An India that is united in Indianness, not divided by caste and region. An India that is united in seeking new opportunities for growth, not divided by disparities. An India that is caring and inclusive.

I admit today, my fellow citizens, my government has failed on many counts. My party, particularly, has helped fuel this divide with its ambiguous policies on caste and religion. While affirmative action is definitely needed to correct ills, the current system treats lower castes like second-class citizens on college campuses, while general-caste students run around telling everyone how their failure is entirely the fault of others.

Meanwhile, pride in our own Indianness feels shaky. Just as it appears that young people are more confident in their own skin, we have popular nightclubs banning guests in “ethnic” dress. Among lower and upper classes alike, consumer products wage battle with promises of whiter skin.

Our cities have become bastions of resentment between old and new money, old residents and newcomers, often divides cut along ethnic lines. Perhaps you do not flinch when the Diwali party invite in your gated community includes a line saying, “No maids”. The middle class divides the world into two: maids and people.

Opportunities for youth have not been inclusive. Of the one million who graduate every year, only a quarter are ready to report to work. This represents a failure of our education system.

And so today, young people who represent this nation’s future, I offer you an apology. But unlike years past, I make no promises.

Because too many times, from this perch, I have listed all the ways government can and will help your life. Universal education, rural employment, health missions, committees devoted to this and that.

But let today go down in history as the first time an Indian head of state will tell you that government is not the answer to your problems. Don’t get me wrong — there is much we must do, there is much we will do. But somewhere in our conversations about the future of India, we have lost the covenant, the partnership between a people and their leaders, and the idea that only together they can make a country great.

So, brothers and sisters, I have no answers. You do.

For proof of this, look no further than our own home-grown hero Abhinav Bindra, who did us proud in Beijing with his gold medal in a 10m air-rifle competition. It marked India’s first gold medal in an individual sport — but no thanks to the government. Rather, Bindra relied partly on his own fortune and that of the Mittal Champions Trust set up by steel tycoon L.N. Mittal; the trust gave him a physical therapist, a trainer and practice equipment.

Young people of this nation, all of you have the power to be like Bindra. You might say you have no access, you have no connections, you have no clout. Bindra, an MBA graduate from a prosperous family in Chandigarh, had all those things and he had talent — and we in government still didn’t help him. But he did not wait.

At some point, all of you have been entrepreneurial enough to make up for the shortcomings of the government. I ask you to apply the same to your life — and to each other.

You cannot wait. If there are no jobs in your village, migrate. If you don’t speak English, learn. And as you go about your life, find ways to give back to where you came from, to each other and to society at large.

Let me conclude by rethinking the obligatory “Jai Hind”. Instead, I ask you to join me in my deep wish that India in its current form should not live much longer. But if the young of this nation rise — in ideals, compassion, service, responsibility, a belief in self and country — then that would be a New India worth celebrating indeed. Jai Hind.

Tuesday, July 22, 2008

I wanna be a Rockstar - Nickel Back


Lovely song.
Few lines from the song -

[...]
we all just wanna be big rockstars

And live in hilltop houses driving fifteen cars
The girls come easy and the drugs come cheap
We'll all stay skinny 'cause we just won't eat
And we'll hang out in the coolest bars
In the VIP with the movie stars
Every good gold digger's
Gonna wind up there
Every Playboy bunny
With her bleach blond hair
[...]


Wednesday, July 9, 2008

Philips DVD player unlock region code

ಇತ್ತೀಚಿಗೆ ನಾನು ನನ್ನ ಫಿಲಿಪ್ಸ್ DVD player ನಲ್ಲಿ seventymm ಮೂವಿ ರೆಂಟಲ್ ಸರ್ವಿಸಸ್ ದಿಂದ ತಂದ "The Alamo" DVD ನೋಡಬೇಕೆಂದು ಕುಳಿತಾಗ, ನನಗೆ ಕಂಡದ್ದು "Wrong Region" ಅಂತ ಟಿವಿ ಸ್ಕ್ರೀನ್ ಮೇಲೆ ಬಂದ ಮೆಸೇಜ್.
ನನ್ನದು Philips DVP3166 player. ಇದರ ರಿಜನ್ ಕೋಡ್ ಅನ್- ಲಾಕ್ ಮಾಡಲು ಇಂಟರ್ನೆಟ್ ಮೇಲೆ ಹುಡಿಕಿದಾಗ ಸಿಕ್ಕಿದು ಇದು:
- ಪ್ಲೇಯರ್ ನಲ್ಲಿ ಯಾವದೇ CD/DVD ಇಲ್ಲದ್ದಿದಾಗ, ರಿಮೋಟ್ ಅಲ್ಲಿ setup ಬಟನ್ ಒತ್ತಿ, Preferences ಪೇಜ್ ಗೆ ಹೋಗಬೇಕು
- ಅಲ್ಲಿ, ೧೩೮೯೩೧ (138931) ನಂಬರ್ ಒತ್ತಬೇಕು. ಆಗ, up/down ಬಟನ್ ಉಪಯೋಗಿಸಿ Region Code ನು ೦ (ಸೊನ್ನೆ) ಸೆಲೆಕ್ಟ್ ಮಾಡ್ಬೇಕು.

ಇದು ಮಾಡಿದ ನಂತರ ನನ್ನ DVD ಕರೆಕ್ಟಾಗಿ ಪ್ಲೇ ಆಯಿತು. ಈ ಇನ್ಫೊ ಸಿಕ್ಕ ಜಾಲ ನನ್ನ shared links windowದಲ್ಲಿದೆ.

Tuesday, July 8, 2008

ತುಣುಕುಗಳು

I think I am self-centered. But when I look around, I see people think they are the central characters in their lives.

-----------------------------

gmail ಮಾಡಲಾ ಇಲ್ಲಾ picasa ಕಳಿಸಲಾ

ಹೇಗೆ ಹೇಳಲಿ ನನ್ನ ಮನದ ಹಂಬಲಾ

gtalk ಮಾಡಲಾ ಇಲ್ಲಾ scrap ಮಾಡಲಾ

ಹೇಗೆ ಹೇಳಲಿ ನನ್ನ ಎದೆಯ ತಳಮಳ

----------------------------

Thursday, July 3, 2008

Another upstart to challenge Intel

Transmeta and Montalvo tried. And failed.

Now, its the turn of another upstart - Qualcomm.

In the fight for building a low-power microprocessor intended for MIDs and low cost PCs, Intel - the Microsoft of uP industry- has been able to ward off any competition that has arisen so far; by hook or crook that is irrelevant for the end users anyhow. Hope this time around Qualcomm, together with AMD and ARM, will be able to put up a good fight to Intel's Atom.

Saturday, June 28, 2008

Nice Power point presentation

SlideShare, the PowerPoint hosting company, has announced the results of the "World’s Best Presentation Contest" on their blog.

Of the few that have won the prize, the above presentation is the one I liked the most.

Link via: Digital Inspiration

Passing arguments to ModelSim's do file

I came across a query on the possibility of passing info to modelsim's do file.

The first thing that I thought was it is possible by using command line arguments. Since do file is nothing but a Tcl file (ModelSim uses Tcl as its command language), info as arguments can be passed from the command line.

ex: # tcl <filename.tcl> arg1 arg2 ... argn

Then we can use Tcl's global variables argc and argv to access these arguments inside the tcl file.

So by passing the info as arguments to the do file while invoking vsim command, info can be passed on to the do file.

That is: vsim ... -do "<filename.do> arg1 arg2 ... argn"

But when tried with this logic, the arguments passed were not passed on to the file. But instead I saw the vsim arguments echoed on the screen.

echo "No of command line arguments passed are: $argc"

set i 0

foreach index $argv {

echo "argument #$i: $index"

incr i

}

Adding the above lines of code in the do file (run_def.do) and then passing this file as a -do switch option to vsim command as,

vsim {other switch options} -do "run_def.do test1 test2" &

where test1 and test2 are arguments passed on to the do file. Instead of displaying argc as 3 and test1 and test2 as the arguments, it showed 21 as the argc and echoed the arguments of entire vsim command!

Since ModelSim uses Tcl as its command language, vsim invocation too is like running a tcl script with its switch options as command line arguments. The do file passed as -do switch option is taken to be as an argument passed. The script vsim doesn't consider the do file as a separate script file but as a part of vsim script itself. (It can be assumed that the contents of do file gets appended to vsim script at the end). So it is vsim script that reads the do file and executes the commands within it.

This is why argc and argv displayed the results as detailed above. Now it became simple to pass the info to do file. The info can be passed as a generic option of vsim command (-G switch option), which can then be searched for in the do file if the info is known in prior.

For my requirement, the do file had to execute different set of commands according to the category of testcase to be executed. So the do file needed to know the category of the testcase and based on this info selects the branch (if-else) for execution. Also if no category is passed then no branch is to be selected but run as normal.

If a testcase was part of a category then this info was passed as a generic parameter (with -G switch option) of vsim command. The do file searched for this prior defined generic parameter (in top level TB) within the argument list (argv) and then select the branch for execution.

TX_CATEGORY and RX_CATEGORY were defined as generics of boolean type in the top level TB file and the do file searched for either of these strings for the branch selection.

vsim -GTX_CATEGORY=TRUE {....} -do "<run_def.do>"

In the run_def.do file:

set x [lsearch $argv -GTX_CATEGORY=TRUE ]
set y [lsearch $argv -GRX_CATEGORY=TRUE ]
if "$x != -1" { #TX_Category

...

}

if "$y != -1" { #RX_CATEGORY

...

}

run -all

quit -f

The result of lsearch if successful in finding the string is the index of the argument list, argv, and -1 if it fails in finding the string. Each branch contains different set of commands to be run in prior to run -all command. If neither of the the generics are passed, then no branch gets selected, which is the required case.


Reference : Tcl tutorial

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Basic Idea on the use of do file:

Do file is basically a script file for modelsim to automate tasks like repetitive simulations for debugging purposes. All the commands that can be run on a ModelSim command prompt can be saved in a macro file (usually named with .do extension), and this file can be passed as an argument to vsim command with -do switch option. Once the ModelSim launches and loads the design, this file will be executed as "do <file.do>" automatically.

Since ModelSim uses Tcl for its command language, the do file can have simulation-specific commands as well as Tcl commands which can include graphic interface features, and a general programming interface for building up complex command procedures.

Idea2:

Use vsim command's generic argument switch (-G) to pass a generic to the design (The design is in VHDL.) This generic value can be used in the top level test-bench to create an event by turning high one of the signal meant only for this purpose. Based on the signal event going high, a particular branch should get selected in the do file.

Using 'when' command of Tcl to wait on an event and executing the branch statement is not possible because of Tcl's sequential execution. If the first when statement doesn't trigger then the execution doesn't proceed further. The execution of the further statements/commands never happens.

______________________________________________________

Thursday, June 26, 2008

Achmad - the dead terrorist

 

This video has had an astounding over 52,000,000 views and has a 5-star rating from over 200,000 reviewers.

via - Atanu Dey


Powered By Blogger