October 15th, 2007
I’m looking at porting some SIMD code from a windows platform, where I’m using the Intel Performance primitives, to the PowerPC on a VMetro VPF1. I’d also like to find out what other libraries there are, and how simple they are to port across to alternative processing platforms.
The most important thing to point out is that processors have small SIMD units that carry out more than one arithmetic operation at once. The SIMD or vector units in Intel and PowerPC processors are 128 bits long and can be used on floating point (float/double) and integer (32/16/8 bit) numbers. The obvious points to be taken from this is that using SIMD units can speed up code and that integerised code can go faster as more integer operations can occur at once. Achieving the full speed up is non-trivial, some technical resons for this are discussed in an article from Apple, aside for the simple reason that the bottle necks in code may not be improved by SIMD optimisations. Making some use of SIMD unit requires nothing more than turning on the right compiler flags, and letting the compiler pick out easily parallelised code automatically.
Making full use of a computer requires a good algorithm, well tuned for the avaliable cache, processors, SIMD units. The simplest way to acheive this is to use someone else’s code. The major numeric libraries include GSL, BLAS and VSIPL++. The VSIPL++ standard library has open source implimentations and is designed to be used on heterogenous systems, so could be extend to FPGA implimentations, as shown here.
Posted in HPC | No Comments »
October 8th, 2007
Here are a few thoughts about things to make real time embedded system design faster:
- Why are there so many system level design tools on the market and why can’t I make a sensible choice between them, so that I convince my boss to buy them?
- Why do I keep having to design interfaces and structural logic, aren’t there patterns for embedded systems and auto-coders, like there are for software?
- I am visually minded, surely I can keep a sensible balance between drawing out structures and coding them up. Why do I have to do both processes separately? Coding complicates both documentation and design!
- I know that fixed point logic is more efficient than floating point and can be more precise too. Why do I need to manually fixed-pointify algorithms, using Matlab for the analysis, and why do I have to recode them once I’m done?
- Why can’t I simulate final system performance early on? I need to know how fast the bits of my system go so that I can pipeline efficiently. Once I’ve got a model of my system, surely I should be able to compare the various hardware options in one go and not have to guess the bottle-necks and ‘have a go’ or ‘make an estimate’.
- What is it about control logic that means I can’t model it’s performance? I can easily find specs of GMACs for processing and MBytes/s for data flow, why can’t I get a MLoops/s or GBinaryOps/s, they’re just as important.
- We all know the principles required to make efficient digital systems: data/code locality, partitioning algorithms, balanced pipelines and minimum communications. Why can’t this be applied to my algorithm automatically - after all, aren’t computers supposed to be faster and more reliable than their biological masters?
- Why do we re-design each time we go from algorithm to design-document to test-plan? Surely it would be simpler to design using a high-level tool and let a computer (with a little guidance) generate the low level implementation. As it is, it’s hard to know whether one is debugging the test bench, digital logic or algorithm it’s self.
- Could there be a unified tool kit? Surely all the programming languages and HDL languages that we use can be converted into a common structure. From that we could work on optimising, scheduling instructions and connecting processors. As an output, we could generate existing languages, like VHDL/C to feed the existing tools, complete with glue logic. Gcc compiles virtually everything (for Harvard Architecture Machines), so we would have end to end simulations.
There are of course a few existing tools that solve some of these problems:
- Direct C to FPGA conversion - Handel-C, use pre-tested code, experiment with pipelines.
- System-C - End to end simulation, with full control of implementation.
- Matlab to C conversion - AccelDSP, analyses fixed point, use pre-tested code, experiment with pipelines.
Posted in HPC | No Comments »
April 1st, 2007
You might be surprised to know that I don’t run a virus checker (they really slow things down) and I don’t have a spy ware detector either. Despite this, I don’t have any unwanted toolbars in my browser, nor do I have any funny icons in my notification area (by the clock). You too could be this way; If viruses and so on get onto your computer, it’s probably because you’ve downloaded them!
- Do not open email attachments that you do not expect. Do not open attachments with funny videos. Do not open attachments that claim to fix anything. Just don’t open attachments, unless you absolutely must.
- Likewise do not download software from any old website. You can just about trust Microsoft, Adobe, Apple and other high street names (except AOL, who install a whole host of rubbish which is very difficult to get rid of).
If you want to get free software, think of free beer. A lot of free software is funded by annoying advertising and is packed full of spy ware, detecting information about you for marketing use. There are kind people out there who develop free software as a service to the community. ‘Open Source’ software released under the GPL (General Public Licence) is pretty safe. As the source code is publicly available, it has been thoroughly reviewed. You can get this sort of software from SourceForge. You can get a selection of other free, but not necessarily ‘Open Source’, software at the Free Country, a list which is well edited.
If you are likely to put yourself at risk, you had better protect yourself. You can do this for free with the following tools:
- Firefox, a browser a bit like Internet Explorer. Firefox is a great browser, Internet Explorer picks up the main features eventually (like tabbed browsing) but Firefox leads the field of internet standard compliant browsers. Firefox is open source, so vulnerabilities are quickly noticed. It is also less popular with novice internet users, so unpleasant types put less effort into ‘hacking’ it.
- A Virus Checker like AVG anti virus. This will scan through your computer looking for viruses.
- A Spyware Filter like AdAware. This will scan through your computer checking for software that reports details about you.
- A Firewall is your last line of defence. If something nasty gets on your computer, this stops it sending your personal data over the internet. It also reports the incident to you, alerting you to the malefactor.
If you are at particularly high risk, not being wise of the ways of the internet or sharing a computer with multiple teenage users, then you would be well advised to get some physical protection. A router is an intelligent modem for connecting to the internet. It stores connection settings and acts as a firewall. Being a separate box, it is very reliable and secure, like a video recorder or microwave. These are quite simple to setup, especially if bought along with broadband or installed by someone else. If you use a wireless router, do ensure that wireless security is on. If you do not, everyone in your street will be able to share your connection and more seriously might be able to view files on your computer!
If you would like me to help with your computer problems, an offer open to friends and colleagues, Microsoft’s ‘Remote Assistance’ might be the solution. Assuming that the facility is enabled and you are running Microsoft XP or higher, click on the Start button and then Help and Support. Click ‘Invite a friend to connect to your computer with Remote Assistance’ and email me the request. Telephone me with the password, or to be talked through the details.
Posted in PC Maintenance | No Comments »
March 27th, 2007
You might be surprised to know that British Computer Society reports a shortage of Computer Science undergraduates. The universities report that their computer science graduates are snapped up by industry. Although I’m an electronic engineer I work on embedded systems, so I spend plenty of time writing low level software. Back in the olden days, computer scientist were brought up programming their BBC micros and trying out joysticks that they made on bread board. The bad news is that school students are now learning how to play video games not write them. A good grounding in programming and how computers work is a very good start for a would be engineer or compsci. The good news is that it’s now even easier to learn (or teach) those skills with micro-controller systems.
These are a few of the systems that I’ve seen so far:
- PICAXE - I’ve used these with sixth-formers. These come with a very simple graphical programming environment that is simple enough for any secondary school pupils. I’ve seen first-years program these to control traffic lights.
- Lego Mindstorms - These are the latest micro-controller fuelled Technic Lego controllers. These are very easy to program and to integrate into Lego models. These would be an excellent way to demonstrate control systems.
- AtMega - I used these in my Fourth Year project. These can be programmed in C using avr-gcc which makes them capable of running a host of existing code. They can be programmed using a parallel port and a simple cable, so development has a very low cost of entry.
Here are a few development systems that I’d be interested in trying:
- XGame Station - A fully fledged games console (of 1980s standard) with information on games development.
- Nintendo DS - This hand held games system is very popular with younger teenagers. I’d love to buy one so that I could develop some educational games. A wireless game would be a great way to deal with short attention spans.
- PS3 - I’d really like one of these, they come with Linux pre-installed.
Posted in EngineeringInEducation | No Comments »
March 18th, 2007
The Royal Academy of Engineering’s BEST programme, aims to encourage and develop Engineers from 7-34. I’ve done the following parts of the scheme and enjoyed them thoroughly:
The Engineering Education Scheme (EES) is a scheme for sixth formers who want to find out about a career in engineering. It involves a real engineering project for a real company, supported by professional engineers. It involves a commitment of a few hours a week over a year and then a trip to a university’s workshops to construct your project. It aims to teach you what an engineering degree and a career in engineering have to offer. Contact your local (EES) coordinators via the website. The company that’s sponsoring you makes sure that you have the equipment to complete your project, so it’s a good opportunity to get hands on experience for your UCAS personal statement.
Whether or not you’ve done the (EES), you might like to try the Headstart Programme. As a first year sixth former, you stay at a university for a few days and have a go at some activities that you might do as an undergraduate. It’s about the most in depth open day imaginable, you certainly find out what the University has to offer and you might even have the chance to make a good impression on the admissions tutors. I made some good friends at Headstart, who I went on to do my YII and degree course with.
The Year in Industry(YII) has to be one of the best gap year opportunities out. You simply can’t expect to make money in your gap year, unless you stay at home with your parents and put your nose to the grind stone; The EES pays enough money to live away from home if you share a house and you’ll get priceless experience. As a YII student you’ll get to work in a real company and learn a lot about the world of work - It’s great fun. Take it from me, you’ll love it. Unless you’ve been working a lot during your holidays, you can understand that employers might not expect you to have many work related skills but they’ll be happy if surprise them! The more effort that you put in, the more tasks that your employer will give you. Some Year in Industry students have had made a big difference to the businesses they’ve worked for. All Year in Industry students learn a lot. After I’d finished my year out, I was certainly motivated to study at University. I also had sponsorship from my YII employer. The YII is a great opportunity for employers to find out about students, it’s like a 9 month interview. Many YII students maintain links with their companies, being sponsored through university and returning in their holidays and beyond.
Posted in EngineeringInEducation | No Comments »
March 18th, 2007
As I spend a lot of time ‘playing’ with technology, I thought I’d better make some notes so other people could benefit from my tinkering.
Posted in Uncategorized | No Comments »