Archive for the ‘ Linux ’ Category

The MythTV upgrade that escelated

This weekend the short version

fuuu_a followed by fuuu_b

This weekend the long version

New MythTV is out and Sooty was away for the weekend, so perfect time to do an update to the TV box.  I used to compile my own versions of MythTV but recently found it annoying having to compile with the exact same source on all the machines, so I moved to the ones supplied by rpmfusion. These work great and have all the init scripts in place, which makes life easier.

Because it is still a release candidate, it is only available in rawhide. No problem, turn on rawhide of all repos and do an update on myth*. That wants to update the whole world. Again no problem, Fedora 12 is just days away and there will probably not be any changes from now on, so a full update is sensible. Few hundred updated packages later I have what essentially is a Fedora 12 system, no going back now. Now finally do the kmod-nvidia nastiness and we are all done. Restart and an instant crash upon entry into X. removed xorg.conf and it works but in NTSC and not PAL. Created a bare minimum xorg.conf and it runs fine. Added the PAL-I line full system death (Nvidia hates Europeans?). Next step get and install driver from Nvidia site and install. Now an unresolved symbol with the latest Xorg because it is not yet supported. Nouveau has no TV support yet (although it looks so close).

At this stage I am rather tired of working with a terminal on an incredibly blurry 21″ TV I got in 1993. I saved up my pocket money for two years and combined with both Christmas and birthday I got that TV when I was 13. It would be so much easier if I could connect using a VGA or HDMI socket, then I wouldn’t have this PAL nonsense and I could just use nouveau. So I go to ebuyer, find a new TV pay the £20 to get it delivered on Monday morning.

gay_poetryI arrange to have the old one picked up by the council and recycled or whatever they do with it. Take it away to make space for the new set. Monday morning comes, no delivery. Turns out they screwed up on the cut off time for next day delivery and it will be delivered on Tuesday. Sooty comes back, no TV, have to listen to her reading gay poetry. Oh, and Craven still haven’t fixed the heating which is the reason for the hat indoors.

Making a silicon chip logo

utopium_bonding_diagramHistorically, when manufacturing silicon designs, it used to be a bit of engineering fun to add a little non logo or a cute little image to the design. There are some fantastic examples of this available at Silicon Zoo. Nowadays, it is actually an essential part of the process as a large visible logo makes it easy to spot the different designs on multi project wafers, and is a requirement by the people who do the wire bonding to make sure the chip is correctly oriented. The in-line image is what we send to the people connecting the silicon to the chip package using rather small wires. In the diagram there is the Utopium chip package with a, to-scale, die plot of the silicon with the logo clearly visible and all the wire connections we need. This serves two uses, firstly it shows the orientation of the chip, and secondly it makes sure we don’t have any crossing wires.

This time we48pinDIL are using a reather simple 48 pin DIL package which a rather retro package with relatively few pins, but it makes life easier when making the test board.

Making the Logo

origial_catSo, onto making a chip logo. You first need two pieces of information, the minimum top level metal size (in my case the level 8 metal layer for the UMC 130nm process has a minimum width of 1.5um) and the size of the logo (for this example I will make one 0.75mm x 0.6mm). Using those numbers you can determine the size of your canvas (“750um x 600um” / 1.5um is roughly 500 x 400 pixles).

Next, create an image in Gimp (or equivalent) of your required size. Use black on white. Here is our example cat. This now needs to be saved as a .pnm file. When the “Data formatting” dialog pops up, select Ascii. Keep the gimp window open as we will need it later.

Now we need to run pnm2cif on the file. This was written by Andrew Bardsley and is released under the “Whatever you like” licence (GPLv2+ or BSD). Download it to the same directory as the image, and run:

> ./pnm2cif.pl <pnm-image-filename> <cell-name> <scalar> <layer-name>

The pnm file is the image, the cell-name will be the name of the new cell, the scalar is the size of the feature size, and the layer-name is the name of the metal layer used. In our case these are:

> ./pnm2cif.pl cat_logo.pnm cat_logo 1500 ME8

The scalar of 1500 is because the minimum feature size in nanometres, and ME8 is the name of the top level metal layer.

imported_catHopefully this has now produced  a .cif file which can be imported into your layout editor. We will use Cadence Virtuoso for this. From ICFB select File -> Import -> CIF, enter the filename and set the Scale UU/DBU to 0.001 micron (the 1nm we used as a base unit) and select the library which it should be imported into. The two warnings are normal. Open up the newly imported cell and make sure it is the correct size.

Because the design is made of metal slices which are not connected we need to merge them all into one. Select all (Ctrl+A) and merge (Shift+M). Now that all the metal slices are merged, the logo is ready to go? Well, no, the design first has to pass the DRC rules.

Passing DRC

drc_failAt this stage the design is covered with “Design Rule Check” faults. The most common ones are two pixels meeting at corners, like shown in the in-line image. This essentially creates an infinitely thin wire (the fabrication folk don’t like making these). So, back to gimp, to manually fix these up with a pen. If you tried to use a dithered image, at this point you will be admitting defeat and moving to a simpler design.

copy_pixelsThe next thing to fix is the maximum wire thickness. This is 30um which is 20 pixels. In order to break up the design and make sure there are no blocks thicker than 20 pixels, we first select a strip of pixels with one white pixel and 20 black. Copy this to the clipboard. Select the bucket fill tool, select pattern fill (pattern from clipboard should be selected as default) and click any large blocks. Selecting two pixels, one white and one black, and doing a flood fill creates a striped pattern which creates a diffraction grading. Get someone with a physics degree to work out the size of the lines to create (I guessed).

sliced_catNow we need to repeat the whole process and run DRC to make sure there are no faults. It will probably take several attempts before all the errors are removed. At the foundry, in order to meet some other design rules, the process will do two additional things which may ruin the design: slotting (also known as cheesing) and metal fill. Slotting involves punching holes in all large metal areas, and metal fill makes sure a certain range of the area of the chip is covered with metal. To stop these from ruining the design, there usually is a layer you can add (in our case it was M8_CAD). This is acceptable only because the metal is non functional and thus does not have to adhere to some design rules. Make sure the design does not cover the whole chip, so there is enough space for the fab to metal fill.

And then you’re done. The Utopium logo looks like this. Make sure you get permission to use any copyrighted artwork or trademarked designs (I did, thanks Fedora for letting me use your logo).

utopium_logo

Mail Fail

Over the last two weeks I have been receiving a lot less junk mail, which is something I should be quite happy with. But then I was also missing my Aldi and Lidl newsletters, which I was not happy about. So first port of call was looking through the spamassassin logs to see why it decided to go very aggressive lately. But after a while of looking, it looked like spamassassin was not removing those mails. Next, sending mails to myself and although sendmail and spamassassin claim these were delivered, they were not there. All the while I am happily receiving many mails from lists I am subscribed to. So next thing to check was procmail. And there it was, a tiny typo that delivered any mail which did not get caught by one of the previous filters to a random filename.

This is what a standard procmail filter looks like. This says match mails from the mailing list and place them in an IMAP subfolder.

:0:
* List-Post: <mailto:list-name@domain.tld>
.Directory.Subdirectory/

Except when the star in the second line is missing. Then it says deliver all mail to a file called “List-Post:” happily hidden amongst the other files in the mail directory. And that is exactly what happened. Most mails were filtered to their correct directories until it hit this line and all remaining mail (mostly spam) was delivered to a file.

So what to do when you have done the same thing as me and you have what is essentially a “mbox” file with all the mail you wanted to be delivered properly? It couldn’t be easier, you simply split the mbox file into individual mails and feed them into procmail. To do this you run:

> cat List-Post: | formail -s procmail

You take the mbox, and pipe it into formail which then takes each mail and runs procmail on it. This delivers it to your correct mailbox. Obviously your mbox file might not be called “List-Post:”, but this way you will receive all your lovely mail that you have been missing. Now I have to catch up on the 400 mails that I have just received, on the positive side I have just won “250,000.00 euro (Two Hundred and Fifty Thousand Euros Only)”.