Archive

Archive for August, 2012

Two questions for better living

August 28, 2012 Leave a comment

I see many facebook posts showing the frustration of people towards the social, political and economic system, and the decision makers. Getting frustrated or angry is of no use in the long run. Agitations triggered by feeling at a thoughtless second in the life won’t change the system for good. When I feel like thinking that somebody is under performing, I ask myself the following two questions.
1. Could I have done better if I were at the exact same situation?
2. If yes, then why not?

99% of the time, my answer to the first question itself will be a ‘no’ or ‘probably no’. If you can’t do it, never expect somebody to do it.

Advertisements
Categories: Viewpoints Tags:

System C on Ubuntu – Installation

August 15, 2012 2 comments
Installation of systemc-2.3.0.tgz is straight-forward.. Just follow the instructions in INSTALL file. This log is for systemc-2.2.0.tgz

I am looking towards learning systemC. So the first step is setting up one on my PC. It was not so straight-forward for somebody like me who has done only a few hours of research about systemC. So I thought of logging my experience setting up systemC in Ubuntu 11.04. (The best way to backup information is to make it public)

1.What is it

Initially I was thinking it is a new language all-together, with a different set of tool-chain. With a little bit of research, I came to the conclusion – “to the user, systemC is c++ library and header file collection, that can be linked to other c++ files using any c++ compiler & linker”.

2. Where to get it

According to the wikipedia page on systemC, it’s just an IEEE standard, which anybody can implement. So there will be multiple versions of the systemC. Luckily, Accellera has a proof of concept implementation, which is available for free from here. You need to register, providing your email id. After registration and logging in, the systemc-2.2.0.tgz (I am not very clear about the TLM stuff. Will first experiment with this and then the latest 2.3.0, with TLM)can be downloaded. If you directly go for systemc-2.3.0.tgz, some of the steps here may be irrelevant.

3. How to setup

Unzipped the file, and read the README and INSTALL. Followed the instructions in INTALL file. But got a compiler  error in sc_utils_ids.cpp, regarding some namespace issue while running make. As an embedded engineer, I am really bad at any language other than plain C. So did the searching, the following two links came up

Link1

Link2

Downloaded the 0001-missing-system-headers-function-qualification.patch file from the second link. Patched the original sc_utils_ids.cpp file with the patch using command

patch -i ~/Downloads/0001-missing-system-headers-function-qualification.patch ../src/sysc/utils/sc_utils_ids.cpp

Then did a make and make install again. This gave me the libraries and include files in /usr/local/systemc-2.2.0 (As I have used the ../configure –prefix=/usr/local/systemc-2.2.0 to do the configuration).

Categories: Log Tags: ,