Thoughts of a sand carver

random thoughts on working, gtd, getting things done, hobbies, semiconductor industry,scripting etc.

Wednesday, September 8, 2021

Brahmins and muslims.

  •  Both are identities used by people across the socio-economic strata.
  • At some point of time one of the ruling classes of India identified with one of these identities.
  • Not every Brahmin or Muslim was the ruling class, Many were extremely poor.
  • The current ruling class of India no longer identifies with these identities.
  • Atrocities were inflicted by the ruling classes on the depressed classes.
  • There are still some people with these identities who justify these atrocities.
  • The vast majority just want to lead a normal life as citizens of this country.
  • Some sections want to oppress these communities because of the historic wrongs done by their ancestors( and justified by a section of current practitioners)

Monday, March 28, 2016

What should be my VPS size.

This may be one of the most frequently asked questions online. The typical answer is an unhelpful "it depends"
The following is my experience with a 512 MB Single code VPS with Digital Ocean

After installing the stock 32bit ubuntu server OS my resource usage were

CPU 3%
Memory ~90MB

I then installed Perl, nginx, starman with 3 worker threads and dancer.
The CPU and and memory usage did not change.

I tried a load test with 100 simultaneous connection per second, the load test did not impact memory much but CPU went upto 100%
A similar load test with 1000 connections resulted in starman crashing

I finally installed postfix,mysql,dovecot,spamassasin

My current stats are
cpu 1.3%
Mem 212M/495M

So as long as I do not see very heavy load  a 512M VPS should suffice for my purpose.

Friday, March 18, 2016

ASIC Design what next? specification for a new language

Given the amount of attention given to developing tools and methodologies for backend and verification design and system architecture look like the step child of semiconductor design.

Verilog is still the default design language, and compared to the first verilog compiler in 1984 the language has not made much progress even through it was revised in 2001 and 2005 and later clubbed with systemverilog.

Almost every language from that era or earlier has either died out, or metamorphised into a new language (e.g. Compare Perl 1 with Perl5 or todays Perl 6)or acquired a huge library set (e.g. CPAN or the Matlab/Octave libraries) which make them relevant to the current environment where design complexity is high and storage and compute resources are cheap.
In contrast the ASIC design field is still stuck in an 3 decade old era. The language built for designers who were hand crafting transistors and laying out custom cells is still being used with hardly any modification.

Today's design requirements


Today when we discuss a design we do not discuss the individual gates. Our discussion is more on larger components like interconnects, gearboxes, FIFO's, memories, hard macro's, analog components etc. We can describe a system in a few words and everyone across the table has a common idea on how it is to be implemented.
I can say "The subsystem needs an 32 bit ahb interface with 1 master and 7 slaves with the addressmap of {s1=>0,s2=>300,s3=>2000,s4=>2300,s5=>2800,s6=>3000,s7=>3700}" and every engineer will know how to design this system either manually or using a tool.
I can say that I need a gearbox from 64to66 bit and an engineer has a picture of what is required.
I can say that I want an asynchronous FIFO with input 32bit@200Mhz packet size 1024 interpacket gap of 12 bytes and idle character as 0x0a0a or packet boundry specified by 4 bit byte enables and again an engineer can go ahead and design an elastic fifo as per my need.

What is the current state of art?

Today we do not have a language to capture these design requirements.
  • SystemVerilog has hardly anything to expand the design abstraction,
  • IP-XACT is more a storage format to be used by tools but not suitable for humans.
  • Among the ESL tools Bluespec comes the closest to meeting the requirements as it supplies a library of common components like fifo's and gearboxes.
  • The gui tools are an intermediate solution with limited ability to save changes in a version control system and review it at a higher abstraction level. I am much at ease verifying the port connections in an RTL code compared to figuring out the rat's nest in the block diagram viewer GUI of either DC or Verdi.


What is the proposed solution?

To build a language which extends verilog, This language will allow interfacing with IP-XACT and tools to write compact design representation along with normal verilog code. a sample verilog+ code would look like this.

use ipxact ;
use tool ;
use constraints ;

use sv ;
generate verilog;
module modulename (
ipxact.ahb.master#(32) master,
ipxact.ip1.sysintf ip1sys(remove clk,rst),ip2sys(remove clk,rst),
output wire interrupt,
input wire clk,
input wire reset
);

tool.interconnect.ahbgen ahb_bus #(
type=>'simple,
addressmap=>(
master=>'master','m2',
slave=>(s1=>0,
s2=>300,
s3=>2000,
s4=>2300,
s5=>2800,
s6=>3000,
s7=>3700)
),
)
);
Connect interfaces to the entities
ahb_bus.s1=s1.ahb;
ahb_bus.s2=s2.ahb_bus;
<....>

tool.gearbox gbox_serdes #(in=>(in=>64,out=>66)
gbox_serdes.in<=mux(select=>ip_sel,connect=>(0:s1.data,1:s3.data,2:{s4.data,s4.command,s4.parity},3:{32'b0,bitreverse(s7.data)})
serdes.data<=gbox_serdes.out;

tool.csrgen(spec=>ipxact.regfile1)
s1 s1 (/*normal verilog port list*/);
s2 s2 (/*system verilog interface list*/)
serdes serdes (/*no portlist connected elsewhere in the code*/);
...
endmodule


The above code running in a few tens of line can generate thousands of lines of human readable verilog code when compiled.


Advantage of the above system


  • Version control friendly.
  • Easy to read and review.
  • Integrates existing and new tools from multiple sources.
  • Based on and extends verilog.

What is required to build this new language.

  • A proof of concept language will require tools for csr gen, interconnect gen, gearbox gen and fifo gen.
  • There should be a standard wrapper mechanism to convert the parameters passed in verilog to the batch input format for different tools (e.g. from ARM, Xilinx, Synopsys etc.)
    • Not every engineer will have access/license for the code generators so we should check whether the data for wrapper has changed before failing on tool invoke.
  • There should be a mechanism to integrate the generated code.

Wednesday, May 27, 2015

National Family Camping Nilgiris: Review

We were a part of the 20th May 2015 YHAI Nilgiris Camp in Ooty, Since this was the first time I had taken my spouse ( +SOUMYA JAHAGIRDAR ) and kid (6yrs) for camping, There was some amount of concern on what to expect. The internet was silent on YHAI family camps so this article is for all those who are thinking of camping but are not decided on whether to go for it or not.

Expectations

We often review stuff based on whether it met our expectation rather than based on whether what was promised was delivered or not, So I will start with my expectations before going for the camp.

  1. Camp location to be far away from human settlement.
  2. Did not expect basic creature comforts like electricity, running water, hot bathing water or bathrooms and loo's
  3. More time to "walk the woods" and to "stand and stare"
  4. A traveller experience rather than a tourist experience.
While some of the people shared my expectations there were others who had expected it to be a more touristy experience with sightseeing, mysore trips etc thrown in.

Reality

Location

Approx 30 tents
The camp is located on a hill in the middle of ooty town and occupies the empty space in front of the YHAI building which consists of offices dorm's, kitchen, dining area, bathrooms and loos. So while I am a bit disappointed that it was not in the middle of a dense forest, It was still a good place to relax and to unwind away from the noise of the city.

Comfort

All the creature comforts were a few meters away, the floor of the tent was covered with an 1/2 inch foam ground sheet(the black one that we normally use during trekking) adequate blankets were provided and the sleeping bags that we took with us ensured that we were warm and cosy and got a good nights sleep. The tent was large enough to accommodate a family of 4-5
View from tent of YHAI Office and Dorm's
The food was delicious and nutritious. The staff went the extra mile to accommodate my dietary needs.

Unwind time

While I was not heavy on the sightseeing aspect while planning the trip, adequate arrangements were made for it. 3-4 22 seaters from a local tour operator were booked on both the days to ferry us around. regretfully the driver on day one had some dispute with YHAI which he decided to take out on the passengers by not acting as a "proper tour guide" The replacement driver on day 2 more than made up for it.
I would have preferred less sight seeing, Instead of going to point X, then Y then Z my idea is to go to one good viewpoint and spend the entire day exploring the area. On the other hand my co-travellers would have liked to cover more points.
YHAI Office, The open space on left is the meal's area

Traveller vs tourist

A tourist experience is an insulated environment, you lock yourselves up in the hotel room, travel in a private car, do not interact with your fellow guests or natives, carries various trinkets as your souvenir of the visit
A traveller gets of know the natives and his co-guests, travels together, broadens his horizon and takes back the seeds of a new understanding as a souvenir of his visit.

I would put this as a mixed bag, The first two days were spent in frantic sight seeing. On the last two days I got to know an agriculturist from Chandrapur, An ayurvedic practitioner with interest in watershed management who had organized a visit to Hiware Bazaar and Ralegaon Siddi for a team of his villagers and was struggling to implement the same in his village, and ex-IT professional turned yoga instructor, each of them managed to chip away pieces of my cocoon and broaden my horizon in their own unique way.


Friday, March 22, 2013

Online voter registration.

Today's TOI had an article on issues with online registration titled "Online registration is a dismal failure" by +manu aiyappa . towards the end a quote was attributed to some electoral officer.
"The system alone is not to blame say electoral officers. People especially from the IT sector show a lackadaisical attitude towards the democratic process and are not taking advantage of online registration"
As a volunteer for some of the voter registration drives I had the fortune to interact with and update officials in the CEO's office on various issues faced by end users of their website, So I find it difficult to believe that a responsible person from the CEO's office will blame the victims (applicants for voter registration) for a bad product developed by CMC.

I will present few data points for the consideration of your readers.
  1. People from IT sector have been spending their weekends helping non IT people with online registration. I invite your team to visit the next voter registration camp listed on the smartvote.in website and interact with the volunteers and the people who have come there to register.
  2. In one of the camp's which I attended a significant number of people in the queue were IT literate who could have filled up the forms in the comfort of their office/home. They stood in line for hours because, even after repeated attempts the server did not accept their application. So they finally decided to take the assistance of volunteers to fillup the forms. One such person in the queue claimed to be the person responsible for developing one of the most visited travel related portal owned by an Govt of India Enterprise. If even he could not figure out why the system was rejecting his application, Then figuring out the issue with online forms would be a truely herculean task for a common citizen.
  3. Voter registration drive in Corporates basically consists of putting up a dropbox at some common location and sending an email to everyone about it. Just this one simple step has resulted in hundreds of application from each corporate entity where these drives were conducted. In some cases the number of registered voters in corporate houses increased from 50% to 90+% within days of launch of the voter registration drive. This is a simple scalable model which can be adopted by citizens across India.
  4. Volunteers are signing up on a daily basis to conduct a drive in their office/college/layout( http://www.smartvote.in/content/volunteer-signup ) Citizens across Bangalore are regularly requesting for a drive in their area ( http://www.smartvote.in/content/request-drive-your-area )
In conclusion I would appreciate the CEO and his team who have taken a good step by starting the online registration process and allowing citizen volunteers to conduct voter registration and awareness drives. Regretfully he has been letdown by a software vendor who provided him with a solution which was
  1. Poorly designed and architected.
  2. Contained very basic flaws when it was deployed for the general public.
  3. Based on a platform  which is known to have issues in handling heavy traffic and avoided by 80+% of the websites which get heavy traffic

Thursday, August 25, 2011

Initial notes about Aruna roy's draft.

Read the comparison table. notes below. Will update after reading the draft(s)
  • Aruna's comparison table is silent on
    • The transparency of operation
    • Citizen's charter. Time bound delivery of services failing which it can be treated as a corrupt practise.

  • Multiple independent organisation instead of one single organisation
    • Who will co-ordinate between the organization.
    • Why cannot they be departments under a single organization. It will be easier to move people around depending on the backlog.
    • How will the mining scam be handled in such an organization (People from all hierarchies of the government are involved)
  • Point #2 about jan lokpal in her comparison table is incorrect. refer to Chapter VII in the jan lokpal draft for knowing why the PM is more equal than others.
  • Horse trading and other note for vote schemes not covered in Aruna's draft.
  • Aruna's Selection committee is weak 3 member (PM, Leader of Opposition and One SC Judge nominated by CJI)
  • Janlokpal also includes additional SC Judge 2 HC Judge, CEC, CAG, All previous Lokpal chief.
  • Aruna's method of complaining against lokpal members is weak SC is the only option.
  • Jan lokpal has Chairman of Lokayukta, Human rights commission , CJ High court , 2 retired civil servents and 2 members of civil society under chairmanship of Retired high court judge evaluating the complaint.
  • Chairman of janlokpal is covered by SC.

Monday, February 7, 2011

Trying to make sense of SenSex....

Once every few years My colleagues are bitten by the sensex craze... Lunch table conversations discuss nothing but the stock price movements.... The common wisdom is to sell stocks when your colleagues are buying and to buy when they are selling.
But all in all the stock investing pattern in India is more speculation than Investment.

Why do we invest?
The answer is simple to make money.
So Let us say That I have Rs 100 with me today. What are the investment options available to me?

Do Nothing
With India's Inflation rate at 8.33% Next year my 100 Rs will have reduced to 92.3 Rs in purchase power....
Invest in bank FD
With Banks currently offering ~10% rates My 100 Rs would have grown to 101.5 Rs i.e. a growth of 2 Rs in purchasing power.
Invest in GDP (Note not stocks per se. but any activity linked to the GDP Growth)
India's growth rate is currently 8.90 Hence my 100Rs this year will yield 100.53% i.e. .5Rs growth in purchasing power.
Invest in Stocks
Currently most of the stocks on Sensex are @ at PE multiple of around 20/25 assuming the better figure of 20 My Investment of 100Rs this year will result in a Purchasing power of 96.9 next year. So why the frenzy about stock investing.... and the India Growth Story?

To understand the Stock Market Let us look at an entity outside India, The FII. America's current data is Growth 3.2%, Inflation 1.5% FD =4% (??)
So the Investment option above will result in 102.46 for FD, 101.5 for American GDP Growth, 103.4 for Indian Stocks.
Surely Investing in Indian stocks makes better sense for an American Investor.

So Back to making sense of Sensex.

For a pure long term investor Sensex does not make sense. For a person studying the FII Inflow/outflow If the American Growth story is good, Sensex will fall. If it is bad, Sensex will Rise....
And until India's Inflation and Interest rates fall to match the current rate in US. Stocks for Indians would be more speculation than investing