Showing posts with label Research. Show all posts
Showing posts with label Research. Show all posts

Tuesday, February 12, 2008

This is ROFLOL!

I love PhDComics. I recommend anyone planning on entering graduate school to read it. It's friggin' hilarious! Today's comic made me laugh so hard. Alright, it might be a tad geeky for normal people to understand, but it's soooo funny. To the engineers among you, I hope that you enjoy the joke (unless of course you are an undergrad, in which case the joke's on you!).

*** image from phdcomics.com .. used without permission but i assume that it should be okay, as the author allows sharing the comics through other services. ***

Wednesday, January 23, 2008

Where to Work?

Since I'm nearing the end of my PhD, I was thinking of starting my job applications soon. On a whim, I did some mental calculations on whether it'd be better to work in Malaysia or the UK. My rough calculations said that it was better to work in Malaysia. Since this was against the normal belief, I thought that I'd put things in a spreadsheet and work it out in more detail. If you have a google account, you can see the formulas in the spreadsheet here.

Disclaimer:

  • I don't claim that it's 100% accurate. These are the best numbers that I could find. If you have something better, email me the information.
  • This is merely looking at things from a pure money point of view. When making a decision on where to work, you have to consider a lot of other things (e.g. weather, food, people).
  • Granted, I have not taken into account every single detail, like mobile bills, internet bills, girl/boyfriend bills and what nots. You can factor these other costs in as well.
These are my findings:
  1. Western countries have an extremely high tax rate. This is because they have very few tax bands, typically 4. So, you very quickly hit the top tax bands. They also typically have a national and local tax rate. As a result, the take home pay is much less than the gross pay.
  2. Working in Malaysia isn't a totally bad thing. The amount that I can save up is more than I could if I worked elsewhere (besides Singapore).
  3. Time to go find a job in Singapore and save up the cash in Malaysia! However, the CPF problem is a sticky issue especially since the employee contribution is particularly high.

Some notes about the values on the spreadsheet:
  • Where I have been unable to find reliable information, or when the field may not be applicable, I have left the cell blank. If you find the information, please let me know and I'll include it.
  • The salaries will of course vary depending on job. The numbers shown are based on a reasonable post-doc academic position. If you're working in the private sector, it would be higher. If you lack a graduate degree, it'll probably be less.
  • Tax rates and pensions are generally extracted directly from the government websites or relevant wikipedia pages. Where local taxes may vary widely, I have generally picked a rate that is average or flat.
  • Expenses vary from person to person. However, I tried to restrict it to a reasonably average lifestyle. It reflects rent of an apartment (2-person sharing), plus an average car (1.5L engine). The cost of food should be comparable everywhere. The entertainment assumes simple things like going to the cinema, buying some DVDs. If you go clubbing, expect the expenses to go through the roof. Likewise, if you walk or cycle or take public transport, adjust it accordingly.
  • Bank interest rates were extracted from, the world's local bank, HSBC in each country for 12 month timed deposits or equivalent. There are of course, better ways to grow your money.
PS: If you do find better numbers than what I have, please email me the links to the information and I'll update the spreadsheet. If you have another country to add in, send me the info as well.

UPDATE: Consider the spreadsheet as a fluid document. It will be updated periodically as I find out more information.

Tuesday, December 11, 2007

AEMB Virtual Ethernet MAC Madness

An ethernet MAC is the device inside a computer that provides the interface to an ethernet network. An example open source ethernet MAC consumes about 2800 slices in an FPGA. My new AEMB design only uses up about 1500 slices. It doesn't seem very logical to integrate a MAC that is almost twice the size of a processor, in order to make it ethernet capable.

So, if someone is interested in building an embedded application with an ethernet connection, they can either:

  1. Use an off-the-shelf ethernet MAC like the RTL81XX series of chips and stick it on the board. These come in a variety of bus interfaces to communicate with different processors. Then, they can write a low level software driver to drive this chip. The typical interface is either ISA (8-bit mode) or PCI (32-bit mode). There are a variety of vendors for these chips.
  2. Integrate a MAC into their processor and interface it to a PHY. There are quite a few embedded processor coming onto the market today that integrate a single built in MAC. Even little 8-bit controllers from Microchip have built in ethernet capabilities. Everyone needs an Internet capable toaster. The programmer treats it in much the same way as any other built in device of the micro controller, and write software to control it.
  3. Try to do something truly crazy, and implement a virtual MAC in software!
I've just been toying around with the idea of a virtual software MAC. I'm thinking of this in terms of using it with the AEMB. I can be quite certain that the AEMB can run at above 100MHz. This gives it about 50MIPS per thread. So, the question is simply, whether or not there is enough software power to implement a software MAC.

I started investigating a couple of different PHYs. I checked out the RTL8201 and LAN8700 chips. Regular PHY chips use the MII interface which is a defined standard (IEEE 802.3u). So, if a MAC (virtual or otherwise) conforms to this standard, it will be able to interface with most industry PHYs. So, reading the technical data-sheets, I find that the transfer interface is fairly simple. For a 10BaseT MII interface, the data is transferred in 4-bit nibbles at 2.5 MHz!

2.5MHz!

This is most certainly doable in software with a 50MIPS thread, if the software is written well and the hardware interface carefully defined. A 50MIPS thread can potentially bit-bang at a maximum rate of 12.5MHz. So, it seems that it is potentially possible to implement an entire ethernet chip in software! I'm so excited. Now, if I can only split myself into two so that one can work on this while the other works on my PhD!

Sunday, December 02, 2007

Improving the AEMB

My brain has been toying with some ideas for improving my existing 32-bit RISC processor design. At present, the processor has reached the stage of being very useful. It is being used in very unexpected ways by a very cool project. So, I have been thinking of the next direction for the chip. I will certainly solicit input from my users, but for now, I've been toying with a couple of themes.

Firstly, I have been toying with the idea of super pipelines, which is the concept of breaking up the existing pipeline into more shorter stages, in order to increase clock speed. The current AEMB has a 3-stage integer pipeline. It is certainly feasible to push this up to 5 stages, in a classic RISC configuration. This will not increase the speed of each individual instruction, but will increase throughput by having 5 instructions in flight at any one time.

Secondly, I have been toying with the idea of multi-threading, which is the concept of running multiple software processes concurrently, on a single core. This can effectively increase throughput on a core that has to handle a lot of I/O processes. It's quite normal for I/O processes to block, which is halting software processing, as it waits for the I/O to service. With multi-threaded processors, one thread can service the slow I/O, without blocking the other thread. However, this will require software applications to be specifically written to exploit it.

Both ideas will increase the amount of silicon area used for the chip. But hopefully, the increased speed and throughput will make up for it. I will have to balance all the considerations, as the target application for my processor is embedded applications, which typically emphasises size over speed. But it's an interesting way for keeping the design sexy and updated with recent trends.

So, just some ideas to toy with. Of course, I will already be adding L1 caches to the existing design to improve performance.

PS: I designed the logo using Inkscape and open source graphics. I've been playing with it recently. It's a superb drawing programme.

Monday, November 19, 2007

Swimming at the Form-Formless Interface

As I've mentioned earlier, I work mainly at the software-hardware interface. I used to believe that I could walk along the interface. But through my work, I have come to realise that it's more akin to swimming.

Working on pure software is easy, as everything is bounded by hardware. The designer has to come up with a solution to a problem, using whatever hardware is available. The first step usually involves selecting the right hardware for the job. Then, it's just a matter of coaxing the hardware to do the work by writing the right software for it. Although the task itself may be difficult, at least the problem is bound, so it's a finite problem.

Working on pure hardware is easy too. The designer has to design a solution to the problem, using whatever is physically available. The first step will involve selecting the right physical technology for the job. Then, it's just a matter of wiring everything up and turning on the power. Once more, although the task itself is difficult, the problem is bound.

Now, the difficulty with working at the software-hardware interface comes from the fact that I'm working at a shifty boundary. I can solve the problem, either in software or hardware. This grants me the added flexibility of either implementing the solution in software or hardware. But this flexibility comes at a cost, as I have to double my search efforts to search for solutions in both hardware and software spaces.

When the multiple solutions are found, I will then have to compare them. It's easier to compare apples and oranges. They're both fruit. With hardware and software solutions, one solution is physical, and the other isn't. The only common metric that can be used is time, i.e. which solution is faster. If speed was the only criterion, then it is simple. The trouble comes when I need to trade-off speed for something else.

Sigh. I think it's more like sinking at the interface now. It's as frustrating as it is exciting.

Wednesday, August 15, 2007

Stack of Forms

I went to the porter's lodge today to check on my mail. I am still waiting on several payment cheques including the cash back cheque from HP. So, I'm checking my pigeon hole regularly. But, I was surprised to see two big envelopes instead.

I opened up the one marked CONFIDENTIAL. I was curious as to what were the contents. It turned out to be the Starter Pack for new staff members. It contains a whole bunch of documents, including my new employment contract and offer letter.

I'm not sure if I should reveal the terms of my contract in my blog. So, I won't go into the details. But it's just quite interesting. The employment terms here are certainly better than the kinds you can find back home. For example, I'm not allowed to work for more than a certain number of hours each week, without signing some extra consent forms. Also, I'm given quite a lot of annual leave days. This means that I can afford to go off on a decent holiday at the end of each term. This probably also explains how my supervisors can disappear for a month, over summer.

As you can see from the photo, there are a whole bunch of documents that I'll have to pour over. The place to start is the Starter Pack, which lists all the contents of the envelope. It contains some basic instructions on what I need to fill up and what I don't. It also contains various advice, guidelines and procedures for all kinds of stuff, including disciplinary actions! Then, there's the little green booklet that contains all the requisite Occupational Health & Safety related stuff. Looks like I have a lot of reading and form filling to do over the weekend.

PS: I think that I'm going to photocopy some of the forms after I fill them up for my own copy and safekeeping. If there's one thing that I've learnt is that it's important to keep copies of these things. Oh yes, don't ask me about the pay!

Sunday, June 10, 2007

Fountain Roof

This is a picture of CAPE (Centre for Advanced Photonics and Electronics) at West Cambridge. It is the beige-coloured building. I nicked this pic from Grace's blog. In the back of the picture is the Roger Needham building (Microsoft Research) while the left side is the William Gates building (Computer Lab). My lab is located inside the CAPE building.

Grace managed to capture the fountain that we, residents of CAPE, kind of dislike. The thing that we dislike about it isn't that it's a fountain. It's because it has a frakin' roof over it! What's the deal with that? There are so many stupid design decisions made on the building that we engineers can only say, "the architect must be crazy".

Our first complaint is that there is very little space inside the building. Most of us research students had to endure a massive downgrade of facilities when we moved out from the main engineering site into our own new building. Aside from the big professors, the rest of the staff had to endure this problem as well. My supervisor is notoriously cramped in his tiny new room. There is hardly any space for anyone to sit in his room, much less talk to him. I personally lost half my desk space and a bunch of shelves when I moved in.

It isn't that the building is small. It's just that they hired some crazy architect whom must've been high on something when he/she designed this building. Outside, as you can see, there is a roof over the fountain. Why does a fountain need a roof? Plus, there's a hole in the roof. There is no conceivable reason for such an atrocity! That roof is 2 stories high and covers a space that could easily be turned into more rooms for the already space starved division. The reason that we moved out into our own building was because we had run out of room at the main site.

Right inside, we have an atrium, which is where we will find Nadia's Patisserie. It's not quite Starbucks, but you can get some cakes and some coffee from it for a similar price. The atrium is a useless piece of space. It stretches all the way from the ground floor to the roof. So, it looks very posh to an outsider. However, instead of having a glass roof, the roof is fully covered! So, why do you need such a high atrium when it's going to be fully covered? Whole 3 floors of wonderful space was wasted. It only serves to make sounds bounce around directly into the research students area.

Then, for some reason, the two halves of the building are not of the same height. One side has 3 floors while the other has 2. The two-storey roof was filled up with stones and gravel and converted into some sort of roof top space. I guess that the architect thought that we would be having parties on the roof. The building is filled with stoic engineering research students. We don't have parties! When we do have the odd celebration, it's usually done at the atrium anyway.

It's a silly design.

Sunday, April 22, 2007

My fascination with computers

I'm currently still fairly fascinated with computers. Although I've been exposed to these machines for two decades, I can safely say that I'm learning new things about them all the time. I had a recent deadlock in my research work. However, after being inspired by Tanenbaum, he has set me down a path that allows me to discover new things every minute.

Let me talk a bit about my background with computers. I was exposed to the Atari consoles before I had even gone to school. At 9, I taught myself how to programme. At 20, I taught myself how to design microprocessors. For the last two years, I have been exploring very exotic processor designs as part of my PhD. I have discovered that the current standards have achieved dominance through commercial reasons, not technical ones. There are a lot of interesting microprocessor architectures out there.

For example, at the turn of the 20th century, computers were largely mechanical. During WWII, electronic analogue computers played a crucial role in weapons design as well as calculating bomb trajectories. It wasn't until the end of the war that electronic digital computers began to play a prominent role, with their code breaking prowess. In the 1950s there were heated debates on which type of computer was best. The digital one won as a result of it being cheaper to run than the analogue ones.

Now, I'm discovering new types of computer architectures that are so abstract that I have never even heard of before, much less seen one. The current dominant form of computation can be considered a form of Random Access Stored Programme (RASP) machine. There are so many other forms of digital sequential computer architectures that are good for different things. As usual, good enough is the enemy of best. So, although current computers aren't exceptionally good at doing many things, it's good enough for almost everything. Plus, they got predictably cheaper every 18 months. So, these alternative architectures do not see the light of day and are crushed by existing standards.

I've also been studying computer architecture at a different abstraction level, virtual machines. Through this, I have discovered how software compilers actually work. In essence, a C compiler (for example) will compile the code to run on a machine that usually isn't the computer microprocessor. This model will then be translated into actual machine instructions that the actual microprocessor can execute. So, the microprocessor is actually running code that makes it perform like another virtual microprocessor, which the C code is compiled for. You may wonder how it is possible that a computer has the capabilities to run code that wasn't designed for it. Well, a very smart chap from King's College (Cambridge), Alan Turing, has essentially shown that any practical computer can perform the tasks of any other computer. So, just accept for a fact that a computer can emulate another computer, which should be obvious to anyone who has used an emulator before.

All this is very exciting and interesting. It's the kind of thing that only certain people (like me) will be fascinated over. I would really like to continue to study these machines in detail. I wonder if I should consider a career in academia, working on microprocessor designs for the rest of my life. I don't actually mind working in this field of study, however, the politics in academia would totally kill me. So, I guess not. I'll just have to find some other avenue to study these alternative microprocessor architectures.

Friday, April 06, 2007

GraphViz: super graphing tool


There are many techniques to design microprocessors. Some people use a top-down approach, while others use a bottom-up approach. Personally, I use both, to see the architecture from a high-level while being able to visualise the workings of each component part at a low-level.

Therefore, I will not start any actual implementation work of a microprocessor until I've got the whole design, down to the lowest level, drawn on a piece of paper. Then, when the design works on paper, I will then transfer the design into a computer model, which I can simulate and verify, before implementation. Usually, I would use a physical pen and paper to put my designs down.

I just didn't know of any useful drawing tools to use for my designs. This was fairly troublesome for a later stage, when I would need to write up documentation for the processor as it is difficult to transfer a paper design onto a computer document. So, needless to say, my documentation had little diagrams in it.

Recently, I had discovered this tool called GraphViz, which is an open source graphing tool that came out of AT&T labs. It is very useful for visualising various concepts. A graph is essentially a diagram with nodes and connections, which is quite similar to a mind-map.

The most interesting thing about this tool is that it doesn't require any 'drawing' skills per se. It's highly structured. So, I just need to describe the structure of a graph into a 'dot' file using it's custom language. Then, hit a compiler and voila, it'll spit out the graphs in various formats including EPS, which can then be directly imported into Latex.

Some people may think that it's easier to use some GUI tool to draw the graphs. However, when using a GUI tool, most of my time is spent fighting with the tool, rather than doing the actual work. This was the case with word processing [that's why I use Latex] and was also the case with diagram tools. Making beautiful graphs has never been easier.

Monday, January 29, 2007

Submission Date!!!


Oh my... Just logged into CamSIS today and guess what I saw!! My submission date has been set at 4-Jan-2008!!! Hahaha... It's all a bit surreal... The end of the tunnel is visible now.. So, if all goes well, I should be able to submit in Michaelmas and then graduate!! Cool!! I don't think that I'll bother to apply for an extension unless truly warranted... And I should better make sure that it's not!!

The question now is what I should do AFTER i graduate... Many people have been asking me that and I've got no real answer except that academia isn't it... I'm considering all options including going into business.. My typical answer would be to work wherever opportunity presents itself... Either way, I'll only need to decide after Easter...

I'll be making job applications about 6 months from my submission date.. I assume that I'll know by then whether or not I'll be able to make the date... I'm probably going to apply for all kinds of jobs, including engineering/technology jobs, various consulting and also some banking work (shock + horror!!!)... It will usually take at least about 6 months to go through the various interview processes and getting myself an offer... Huhu, this means that I'll be making job applications about the same time as many of my other undergraduate friends...

Well, like I always tell my friends, no point pondering too much about the future.. I've got to finish my PhD first!! Haha!! The cool thing is that I have a submission date!! So, now I have a fixed target to aim for!! Hehe, hopefully, I can graduate next July then!! My family should be quite happy to come for my graduation.. I wonder if my sister and her family will come... I certainly hope that they do although she may be too busy to... Eh, once in a lifetime event okay!!

Sunday, January 21, 2007

History creeps up on me!


Heh, the believe that it's quite impossible to invent anything new is quite true. That's why I've been vehemently opposed to the whole principle of patents. It's totally impossible to invent anything totally novel and new. All ideas are somehow intertwined and is based on prior ideas and knowledge.

In the case of my research, I tend to take ideas that I have never seen or heard of. This is because, it makes it easier for research when no one else in the world is doing it. Firstly, there are fewer papers to read and I can pretty much do whatever that I want as there isn't anyone else to fight with.

I did it with my first PhD topic. I worked on a processor designed based on principles that were popular prior to the 1950s. However, I did it with a modern twist and it was interesting work for a while. There is truly a wealth of old knowledge that didn't quite make it into the modern world, not because they were technically unsound but because they were expensive. With modern fabrication techniques, some of these things are cheap today but people are just too lazy to use them (or they don't know about these things).

Then, for my second topic, I decided to work on something interesting. I searched the journal archives back 20+ years to see if there was anything remotely similar. Nothing. So, I felt safe to proceed with the topic. However, we learn new things everyday. Last week, I encountered several similar projects that date back before the 70s. So, I'm now reading some really old papers (before my birth!) to see if what they did was feasible and if it was any similar to what I'm doing for my second project. If there are any good ideas, I'll probably borrow them. If there are any weaknesses, I'll try to work around them. However, on first impression, it's not quite similar as the problem that I'm trying to solve has evolved quite a bit in the last 3 decades.

I just love history. I wonder if there is a career path for a technology archeologist. Someone who digs up old history for good ideas that have been discarded and to put a modern twist to them for use in the present and future. It should be quite an interesting career to have. I'm sure that there is a wealth of past knowledge that is totally untapped in all areas. However, I am against the whole principle of patents! I'm a strong advocate of intellectual property though, don't confuse that with patents.

* pd image from wikipedia. ada lovelace, generally considered the mother of modern computer programming. *