New Horizons






<< December 2006 >>
Sun Mon Tue Wed Thu Fri Sat
 01 02
03 04 05 06 07 08 09
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31


Table of content

New Horizons
What's new
Starting a blog
Writing a blog
I got a job

SystemC
SystemC from scratch. Part 1
SystemC from scratch. Part 2
SystemC from scratch. Part 3

ASIC/FPGA Design
Table of content
Index
FPGA design from scratch. Part 1
FPGA design from scratch. Part 2
FPGA design from scratch. Part 3
FPGA design from scratch. Part 4
FPGA design from scratch. Part 5
FPGA design from scratch. Part 6
FPGA design from scratch. Part 7
FPGA design from scratch. Part 8
FPGA design from scratch. Part 9
FPGA design from scratch. Part 10
FPGA design from scratch. Part 11
FPGA design from scratch. Part 12
FPGA design from scratch. Part 13
FPGA design from scratch. Part 14
FPGA design from scratch. Part 15
FPGA design from scratch. Part 16
FPGA design from scratch. Part 17
FPGA design from scratch. Part 18
FPGA design from scratch. Part 19
FPGA design from scratch. Part 20
FPGA design from scratch. Part 21
FPGA design from scratch. Part 22
FPGA design from scratch. Part 23
FPGA design from scratch. Part 24
FPGA design from scratch. Part 25
FPGA design from scratch. Part 26
FPGA design from scratch. Part 27
FPGA design from scratch. Part 28
FPGA design from scratch. Part 29
FPGA design from scratch. Part 30
FPGA design from scratch. Part 31
FPGA design from scratch. Part 32
FPGA design from scratch. Part 33
FPGA design from scratch. Part 34
FPGA design from scratch. Part 35
FPGA design from scratch. Part 36
FPGA design from scratch. Part 37
FPGA design from scratch. Part 38
FPGA design from scratch. Part 39
FPGA design from scratch. Part 40
FPGA design from scratch. Part 41
FPGA design from scratch. Part 42
FPGA design from scratch. Part 43
FPGA design from scratch. Part 44
FPGA design from scratch. Part 45
FPGA design from scratch. Part 46
FPGA design from scratch. Part 47
FPGA design from scratch. Part 48
FPGA design from scratch. Part 49
FPGA design from scratch. Part 50
Links
Acronyms and abbreviations
XCell Journals
CAD
A hardware designer's best friend
Zoo Design Platform
Linux
Installing Ubuntu Linux on a MacBook
Customizing Ubuntu Linux 1
Customizing Ubuntu Linux 2
Upgrading to Ubuntu 7.04
Install Ubuntu 7.04 with VMware
Making the virtual machine run faster
Ubuntu Links
A processor benchmark
Mac
Porting a Unix program to Mac OS X
Fixing a HyperTerminal in Mac OS X
A dream come true
Wireless freedom
Running
The New York City Marathon
Skiing/Skating
Kittelfjäll Lappland
Tour skating in Sweden and around the world
Top
Introduction
SSSK
Wild skating
Tour day
Safety equipment
A look at the equipment you need
Skate maintenance
Calendar
Links
Books, photos, films and videos
Weather forecasts
Travel
38000 feet above see level
A trip to Spain
Florida the sunshine state


Example Files
Verilog Testbench Body
Verilog Testcase
Verilog Setup
Simulation Result File
Simulation Report File




Photo Albums
Seaside Florida
Ronda Spain
Sevilla Spain
Cordoba Spain
Alhambra Spain
Kittelfjäll Lapland
Landsort Art Walk
Skating on thin ice


Favorites
Adventures in ASIC
ChipHit
Computer History Museum
Community of Sweden
DeepChip
Design & Reuse
Dilbert
EDA Cafe
EDA DesignLine
Embedded.com
EmbeddedRelated.com
FPGA Arcade
FPGA Blog
FPGA Central
FPGA Journal
FPGA World
MacApper
Mac geekery
Mac 2 Ubuntu
Get Perpendicular
Programmable Logic DesignLine
History of Linux
OpenCores
ORSoC
Simplehelp
SOCcentral
World of ASIC



New York City Marathon




If you want to be updated on this weblog Enter your email here:



rss feed



 
Dec 1, 2006
ASIC and FPGA design. Acronyms and abbreviations
It very frustrating to read technical literature scattered with acronyms and abbreviations you don't understand or don't know the meaning of. The "FPGA design from scratch" story is also full of acronyms. I try to explain them the first time they are used but if you don't find an explanation in the text you can look here.

Here are some links to web sites that can help you.

 Acronym  Explanation  Comment
ASIC Application-Specific Integrated Circuit
 
CLB
Configurable Logic Block

CMOSComplementary metal–oxide–semiconductor
DCM
Digital Clock Manager

DSOCM
Data Side On-Chip Memory Controller

DSP
Digital Signal Processor

FIFO
First In First Out

FPGA Field Programmable Gate Array
 
ISOCM
Instruction Side On-Chip Memory Controller

JTAG Joint Test Action Group
 
LUT
Look-up table

MAC
Media Access Controller

NRE Non-Recurring Engineering
 
RISC
Reduced Instruction Set Computer

UNH University of New Hampshire   
     
     
     
     


Posted at 08:28 am by svenand
Make a comment  

 
Nov 26, 2006
A trip to Spain
This summer we went to Spain to visit our daughter Sara, who was studying Spanish in Sevilla. Sevilla is the capital of Andalucia the most southern province in Spain. To see a map of Spain you can go to Google Maps. We traveled with Spanair from  Stockholm to Malaga. The direct flight took 4 hours.

We had a rental car from AurigaCrown car hire waiting for us at the Malaga Airport, a dark blue Seat Leon, good-looking sporty car. It was too late to drive that far so we decided to stay the first night in Malaga at Hotel Los Naranjos. The second day we planned to arrive in Sevilla late in the afternoon. On the way to Sevilla we wanted to make a stop in Ronda. We took the route E15/A7 driving west from Malaga. Along the way we passed the famous resorts Torremolinos, Fuengirola and Marbella. We didn't see much of Costa del Sol but we saw a lot of ugly looking hotel complex. From Marbella we turned right and drove A-376 towards Ronda. The road started to climb up the mountain and would take us more than 1000 meters up.
Ronda is one of Andalucia's loveliest towns, steeped in history. It stands on a towering plateau in the mountains of Malaga Province, and is famous through Spain for the plunging river gorge which divides the medieval from the 18th century parts of the town. This gorge is known as "El Tajo" - The Cliff and is spanned by a stone bridge, which once housed a prison. Visitors love to peer down into the gorge, to see the waters of the River Guadalevín.

We walked around in Ronda for several hours in the heat and burning sun. We visited the bullring, one of the oldest in Spain and we climbed down all the stairs to the bottom of the gorge. We had lunch in a beautiful restaurant, Restaurante Santa Casa Pola that is built in to the mountain side of the gorge. Here are more photos from Ronda.  After this fantastic start of our journey through Andalucia it was time to get back on the road again and head for Sevilla. On our way to Sevilla we passed Alogodonales a famous center for paragliding and hang gliding in Southern Spain.

Sevilla is a big city with  a population of more than 1 million, ranking as the fourth-largest metropolitan area of Spain. We had a hard time finding our hotel without a good map and not knowing where we were. After we got lost several times in the old town with all its narrow one way streets we at last found our hotel, Catalonia Giralda. When we got out of our car the heat almost knocked us. The thermometer displayed 46 Celcius (115 Farenheit) and we hesitated to leave the air-conditioned car. When we entered the hotel lobby it was 20C (68F) inside. The hotel was nice and perfectly located close to the oldest part of Sevilla. There are so many things to see in Sevilla you could easily spend several week here. The main attractions are the Cathedral with the Giralda bell tower and the Alcazar royal palace.

The Cathedral of Sevilla, formally Catedral de Santa María de la Sede (Cathedral of Saint Mary of the See) was begun in 1402, with construction continuing into the 16th century.It is the largest of all Roman Catholic cathedrals and also the largest Medieval Gothic religious building, in terms of both area and volume. It is 76 by 115 meters, and was built to cover the land previously occupied by the Almohad Mosque. Its central nave rises to an awesome 42 metres and even the side chapels seem tall enough to contain an ordinary church. Its main altarpiece is considered the largest in the Christian world.

T
he Giralda is the bell tower of the Cathedral of Seville one of the largest churches in the world and an outstanding example of the Gothic and Baroque architectural styles. The tower is a former Almohad minaret which, when built, was the tallest tower in the world at 97.5 m (320 ft) in height. It was one of the most important symbols in the medieval city.
The Alcázar of Seville is a royal palace. Originally a Moorish fort, the Alcázar(from the Arabic القصر al-qasr, meaning "palace") has been expanded several times. The Almohades were the first to build a palace, called Al-Muwarak, on the site. Most of the modern Alcázar was built over Moorish ruins for King Pedro of Castile  with construction beginning in 1364. Pedro used Moorish workers to build his palace giving it a distinctly Islamic design. The palace is one of the best remaining examples of mudéjar architecture, a style under Christian rule in Spain but using Islamic architectural influence.
The city sits well inland, but a mere 6 metres above sea level. Seville was long an important
sea port, prior to the silting up of the Guadalquivir. From Seville Ferdinand Magellan obtained the ships for his circumnavigation. Much of the Spanish Empire's silver from the New World came to Europe in the Spanish treasure fleet that landed in Seville.

Sevilla is especially known for its
Flamenco artists. The best Spanish Guitar players are from Andalusia, and many of them from Sevilla. You can also find in Sevilla many Flamenco Shows, with dancers and singers. Here are some photos from Sevilla. The barrio of Triana, across the Rio Guadalquivir from central Sevilla, used to be the quarter of the city's gitanos and the home of Sevillian ceramics. This is also where Sara lives. She share an appartement together with three other students.
The first week we used Sevilla as our starting-point for excursion to exciting places in the south-west of Spain. In a few hours time we can reach
Cadiz, Jerez de la Frontera, Gibraltar and Costa de la Luz. One of the most beautiful beaches in Spain is Los Caños de Meca, located 10 km north of Barbate.

After one week in Sevilla we take road A4 to Cordoba. On the way we make a stop in Carmona. Carmona stands on a low hill just off A4, 38km east of Sevilla. It is a charming old town with impressive monuments from many different epochs and with fine views.
We arrive in the afternoon in
Cordoba and find our hotel Macia Alfaros a beautiful place with a refreshing outdoor swimming pool. Cordoba is famous for a single architectural  treasure, the Mezquita symbol of the sophisticated Islamic culture. Cordoba's medieval quarter, once the home of the Jewish community, is called "La Judería" (The Jewry), a labyrinth of winding, narrow streets, shady flower-filled courtyards and picturesque squares such as La Plaza del Potro. That night we are having a exquiste diner at restaurant Casa PePe. We are sitting outside at 11 pm and it is still 30 C and it feels cool compared to the 43 C in the middle of the day.

Our next stop on our Spanish tour is
Granada. There is no doubt about it - Granada does enchant. The Alhambra palace-fortress stretched along the top of the Sabika hill amid its sumptuos gardens, and the warrenlike Albayzin, Granada's old Islamic quarter, are highlights of any visit to Andalucia. There's no other city in Andalucia where the Islamic past feels so recent. We have booked a room at Parador de Granada Hotel San Fransisco which is part of the famous Palace of Alhambra. We were told we had to make reservations many month in advance but we were lucky and could get a room just a few weeks in advance. Parador hotels can be found all over Spain and they are operated by the Paradores de Turismo de Espana, S.A. which is state owned. Parador hotels are normally found in beautifully restored castles, palaces, fortresses, convents and other fine locations.



Want to read more about Andalucia search for a book at
Amazon.

When writing this story I had great help from Wikipedia, the free encyclopedia. Since its creation in 2001, Wikipedia has rapidly grown into the largest reference Web site on the Internet. The content of Wikipedia is free, and is written collaboratively by people from all around the world. This Web site is a wiki, which means that anyone with access to an Internet-connected computer can edit, correct, or improve information throughout the encyclopedia, simply by clicking the edit this page link.

Top

Posted at 08:58 pm by svenand
 

 
Nov 24, 2006
A processor benchmark
How fast is my MacBook? Let's compare it to some other computers. Here are the contanders.

 Model  Processor  Speed  Memory  Operating_System
 Compaq EVO N610c
 Pentium 4-M
 1.8 GHz
 512 MB
RedHat Rel 3.0
 SUN SunBlade 1500
 Ultra SPARC IIIi
 1.5 GHz
 1 GB
Solaris 10
 HP Proliant DL145
 AMD Opteron 200
 2.6 GHz
 32 GB
RedHat Rel 3.0
 Apple MacBook I
 Intel Duo Core
 2.0 GHz
 1 GB
 Note 1.
Mac OS X 10.47
Ubuntu 6.06
 Apple MacBook II
 Intel Duo 2 Core
 2.0 GHz
 1 GB
Note 1.
Mac OS X 10.48
Ubuntu 6.10

Note 1. On the MacBook all files are stored on the local disk. All the others have the files stored on an external file server.

The benchmark consists of two tasks. The first task uses ncvlog to compile a Xilinx macro library including 3100 Verilog files. The second task runs a verilog simulation using ncsim. Here are the results (in seconds) :

 Task  Compaq  Sun  HP  Apple I
Apple II
 Verilog compilation
 58  72  25  2423
 Verilog simulation
 60  59  31  2817



Top

Posted at 08:25 am by svenand
Make a comment  

 
Nov 22, 2006
A hardware designer's best friend
When designing an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA) you use a hardware description language (HDL) like Verilog or VHDL. To verify that your design is correct you need a hardware simulator. To find a hardware simulator you have to contact a company that makes computer-aided design (CAD) tools. The three major companies developing CAD tools are Cadence, Mentor Graphics and Synopsys. Cadence has the Incisive Functional Verification Platform, Mentor has the Questa Scalable Verification, and Synopsys has the Discovery Verification Platform.
Ever since I started as an ASIC designer in 1990 I have been using Cadence tools. Back then Verilog-XL was one of the few hardware modeling language available and Cadence owned Verilog-XL.
With the increasing success of VHDL at the time, Cadence decided to make the language available for open standardization. Cadence transferred Verilog into the public domain under the Open Verilog International (OVI) (now known as Accellera) organization. Verilog was later submitted to IEEE and became IEEE Standard 1364-1995, commonly referred to as Verilog-95.
Now it's time to install the Cadence hardware simulator. Let's go to the Cadence
software download page. Before you can start the download you have to register as a Cadence user. To register you must already have a Cadence product installed. To run the simulator you also need an evaluation license. There is no freeware when it comes to CAD software but try to convince Cadence that you are a presumptive buyer of their software and they may give you access to their download page and an evaluation license. After signing up, go to the Electronic Distribution page and follow these steps:
  1. Go to the Linux page.
  2. Download and install the program InstallScape. InstallScape lets you download and install selected Cadence products in a release in a single step. Create an install directory and download the compressed tar file to this directory. Use the command <tar -zxvf Iscape03.40-s012lnx86.t.z> to unzip and unpack the file at the same time.
  3. Before starting the installation create two directories, one to temporarily store the downloaded files (archive) and one directory where the final installation will be stored.
  4. Start Iscape in a terminal window using the script file ../iscape/bin/iscape.sh
  5. Click <Select Release> and choose a server near you. Protocol should be <http>.
  6. Click the <Select Release> button. Enter user name and password.
  7. Select Release and Platform. Click the Linux tab and select IUS58 or later from the list. Click next.
  8. Select Release : What do you want to do and select <Download a Release>. Click next.
  9. Select Release : Select Source Site to Download. Select one of the releases from the list. Click the download button.
  10. Download : What do you want to do. Select <Save Archive and Install>. Click next.
  11. Download : Save Archive & Install. Choose <I will select products manually>. Click next.
  12. Download : Specify Archive Directory. Select the archive directory. Click next.
  13. Download : Specify Install Directory. Select the install directory. Click next.
  14. Select Product. Select the full Incisive Unified Simulator (29300) from the list. Click next.
  15. Start the installation. You will need 2.7 GB of disk space for the archive and the install directories. When the installation has finished you can delete the archive directory. With a high speed connection the installation will take about 30 minutes. When finished quit the window.
  16. Before you can start to use the simulator it must be configured. Select <Configure Product> from the main Installscape window. Select <Install Directory> and click next button.
  17. Select product <29300 Incisive Unified Simulator> and click next. The configuration script will start and you have to enter IAGREE before it kicks off. When finished close the report window. The installation is now finished and you can exit InstallScape.
  18. To find out if the installation was successful you can start the verilog compiler <ncvlog>. Use the command install_dir/tools/bin/ncvlog. The compiler should start and print the following message:
    ncvlog : 05.82-p002 : ......
    Usage : ncvlog [options] source.file ....
The simulator will not start without a license file. Cadence uses the FLEXlm software license manager and you have to have the license  manager daemon running before starting the simulator (ncsim). You can ask Cadence for an evaluation license file that will last for 45 days. To generate a license file that will only run on your computer (node-locked) they need the MAC address of your machine. To find out the MAC address, execute the following command in a Linux terminal window.
<sudo ifconfig -a>. Look for eth0 and the HWaddr. The MAC address will look like this 00:91:B8:DF:D3:C0. Send the MAC address to Cadence and they will generate a license file for you. When you receive the license file you have to make two changes to the file. The file is in ASCII format and can be edited with a standard text editor. The first three lines of the file will look like this:
SERVER Cadence-SERVER 0091B8DFD3C0 5280
DAEMON cdslmd ./cdslmd
USE_SERVER
........
Replace "Cadence-SERVER" with the hostname of your machine. To find out the hostname execute the following command in a terminal window: <hostname>
Replace ./cdslmd with the full path name of the license daemon program located in the bin directory of the IUS58 installation.
My license file looks like this after the changes:
SERVER svenand-desktop 0091B8DFD3C0 5280
DAEMON cdslmd /home/svenand/cad/Cadence/ius58/tools/bin/cdslmd
USE_SERVER
.........
After editing the license file you start the license daemon using the following command:
install_dir/tools/bin/lmgrd -c license_file
When the license daemon is up and running you can start using the simulator. Good luck.
Don't forget to define the environment variable CDS_LIC_FILE before starting. Use the following command, replacing <hostname> with the host name of your host:
setenv CDS_LIC_FILE 5280@hostname (csh and tcsh)
export CDS_LIC_FILE=5280@hostname (bash)
or
setenv CDS_LIC_FILE license_file
export CDS_LIC_FILE=license_file



The picture shows a screenshot from my MacBook running Mac OS X with
Parallels Desktop installed. The virtual machine has Ubuntu Linux booted. In the Ubuntu Linux OS the Cadence waveform viewer Simvision is running. The same thing goes for VMware Fusion.

Top


Posted at 07:37 am by svenand
Make a comment  

 
Nov 20, 2006
Installing Ubuntu Linux on a MacBook
Now when we have the hardware in place lets go through the process of installing the software we need. The first thing we have to install is the virtualization software that enables us to run multiple operating systems on top of Mac OS X. There are several offers but I have choosen Parallels Desktop from Parallels Inc.
  1. Order the program and download it from Parallels download page.
  2. Installing Parallels is no different than installing any other OS X program that uses an installer. Double-click the installer, follow the prompts, and wait for it to finish. After installation, you'll find the program in the Parallels folder in the Applications folder. Behind the scenes, Parallels has installed quite a few things on your machine, including a kernel extension (a low-level tool that modifies the core of OS X) to enable its magic.
  3. The next step is selecting the Linux distribution we would like to use. All CAD vendors  tell us they only support RedHat Enterprise Rel 3 or 4 but that doesn't stop us from using our favorite Linux distribution. I will use Ubuntu 6.10. Ubuntu is a complete Linux-based operating system, freely available with both community and professional support. It is developed by a large community of developers and its small size (it fits on one CD) makes it perfect for our usage.
  4. Download the CD image (ubuntu-6.10-desktop-i386.iso) from the Ubuntu download page.
  5. The file is 700MB so try to find a high-speed connection.
  6. Start Parallels Desktop and click the "New VM" button. Click the Next button in the window displayed. The next window will look like this. Select "Create a typical VM" and click the next button.


  7. Select the guest OS to be used. Set guest OS type to  Linux and guest OS  version to Debian Linux and click the next button.

     

  8. The Configuration Editor window will be displayed. In this window you can change the configuration of the virtual machine. Select the CD/DVD-ROM setup to specify the image file to be read during installation. Select "Use image file" and enter the full image file name  .../ubuntu-6.10-desktop-i386.iso. You may also want to change the size of the memory from 256 MB to 512 MB if you have at least 1 GB installed in your Mac. If you need more than 8 GB hard disk you should also change the "Hard Disk" setup. When finished click "OK".



  9. Start the virtual machine by clicking the green triangle. The installation will now start and in a few minutes the Ubuntu installation startup window will be displayed.  Double-click the install icon to continue the installation. Then there a is six step process to define the default language, the time zone, the keyboard layout, username and password and to prepare the disk (erase all). From when you click the install button the whole installation will take less than 15 minutes.



  10. After the installation has finished you must restart the virtual machine. Before restarting, edit the setup and change CD/DVD-ROM back to default. The Ubuntu Linux will start and you are ready to login.
  11. For adding Parallels Tools see this tutorial.




If this didn't help here is an even better 
installation guide.

More information



Top  Next
 

Posted at 03:16 pm by svenand
Make a comment  

 
Nov 19, 2006
Customizing Ubuntu Linux 1
After installing Ubuntu Linux on my MacBook I need to add more software and to fix a number of setups to make everything run smoothly. In this chapter I will describe the process to make this Linux installation perfect for my needs. I had much help from reading the book Ubuntu Hacks by Jonathan Oxer, Kyle Rankin and Bill Childers. Here is a link to the Unofficial Ubuntu 7.04 Starter Guide.

Look for help

There are many places where you can look for help when you have a problem with Ubuntu Linux. Here are some places:
Software packages

One of Ubuntu's key strengths is the quality of the software packages that are included in the main distribution. They have been relentlessly tested, and come together to form a rock-solid Linux distribution. Although the main Ubuntu distribution is integrated and very solid, that stability comes at a price. Many of the optional packages you may want have been excluded from the main distribution. There are several ways to download and install packages. The most common way is to use the command <apt-get>. The use of <apt-get> and other ways of managing packages are well described in the book Ubuntu Hacks (see Package Management).
To install a new package use the following command :
sudo apt-get install <package-name> or use the use the Synaptic package manager found in the menu: System->Administration->
Synaptic Package Manager

Here is a list of packages I have added and a description of what they are for:

 Package  Description
build-essential GNU C compiler gcc, g++, make
libx11-dev Makes it possible to run X11 applications
libdb-4.1 Needed by Xilinx Coregen
alien Convert rpm package to debian package
sun-java5-jre
Latest version of Java from SUN
sun-java5-plugin
Latest version of Java plugins
mdns-scan
Browse Zeroconf services
avahi-discover
Zeroconf support
avahi-utils
Zeroconf support

libdb-4.1 is an old package not easily found. I downloaded the file libdb4.1-4.1.25-9mdk.i586.rpm and then used the program alien to convert the rpm package to a debian package using the command: sudo alien -c libdb4.1-4.1.25-9mdk.i586.rpm. To install the debian package I used the command: sudo dpkg -i libdb4.1-4.1.25-10_i386.deb.

To install the latest version of Java use the following command:
sudo apt-get install sun-java5-jre sun-java5-plugin
To install Limewire read
Torrentfreak.

Other must-have tools and programs.


Ubuntu Linux comes standard with the gedit text editor. My favorite text editor for many years is nedit. To download nedit go to  Nedit home page. Click the download tab and in the download page click stable binaries and download nedit-5.5-Linux-x86.tar.gz

Just found out about a new text editor called
jEdit. It is written in Java and runs on Mac OS X, Linux, Unix and Windows. I am going to try it.

Portable Document Format (PDF) is an open file format created and controlled by Adobe Systems, for representing two-dimensional documents in a device independent and resolution independent fixed-layout document format.
Xpdf is an open source PDF viewer for the X Window System and Motif. Xpdf runs on practically any Unix-like operating system. To download Xpdf go to the Xpdf download page. Ubuntu comes with the Evince pdf reader installed.


 Program  Decription  Download
 nedit Text editor
 www.nedit.org
 jEdit Text editor   www.jedit.org
 Xpdf PDF reader
 http://www.foolabs.com/xpdf/download.html
 Inkscape Vector Graphics Editor
http://www.inkscape.org

Default shell

In Ubuntu the default shell for /bin/sh is
dash. If you want to use bash in your script files use /bin/bash.

Keyboard mapping

The MacBook keyboard is setup to run Mac OS X and many keys are not defined the way Unix keyboards are setup. It is possible to map the keys any way you want and there is not one standard setup. I will show my setup and you can modify it to fit your needs.

The xmodmap program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the user's session startup script to configure the keyboard according to personal tastes. To map a key to a symbol you have to find the keycode and the keysum. To every key you can map up to four different symbols. To map key "9" to the four symbols : 9 ) }] you use the following command:

keycode 18 = 9 parenright braceright bracketright

To find out the keycode for a key you can use the program xev. Start xev and click in the small window, then hit a key and you will see the keycode and keysum displayed. Put all the mapping commands in a file called .Xmodmap and place this file in your home directory. When you login next time you will be asked to include the .Xmodmap file. You can also setup the mapping by running the command: xmodmap ~/.Xmodmap. To see the current mapping execute : xmodmap -pk. The keysum names can be found in the file keysumdef.h. Remove XK_ before you use the name.

Here is my keyboard mapping for my MacBook (I have a Swedish keyboard):

 Keycode  Default  Shift  Alt  Alt shift
64 (Alt left)
Mode_switch



113 (Alt right)
Mode_switch



11
2
quotedbl "at @
12 3 numbersign #
asciitilde ~  
13 4 EuroSign €
dollar $
 
17
8 parenleft (
bracketleft [
braceleft {
18
9
parenright )
bracketright ]
braceright }
35 (¨^)
backslash
bar |


This is what my .Xmodmap file will look like:

! Map left alt key as mode switch
keycode 64   = Mode_switch
! Map right alt key as mode switch
keycode 113 = Mode_switch
keycode 11    = 2 quotedbl at
keycode 12    = 3 numbersign asciitilde
keycode 13    = 4 EuroSign dollar
keycode 17    = 8 parenleft bracketleft braceleft
keycode 18    = 9 parenright bracketright braceright
keycode 35    = backslash bar

Changing screen resolution

In the latest release of Parallels Desktop (build 3150) this problems has been fixed. Parallels will now set the screen resolution to match the display connected.

When you boot Ubuntu Linux for the first time on your MacBook the maximum screen resolution is set to 1024x768. What happens if you connect an external display with a higher resolution. I have a 23 inch Cinema display (1920x1200) hooked up to my MacBook and without changing the resolution I can't use the fullscreen mode.
It is not possible to set the resolution higher than 1024x768 from the menu System->Preferences->Screen Resolution.
To change the maximum resolution you have to run the program:
sudo dpkg-reconfigure -phigh xserver-xorg.
After starting the program a window will be displayed and ask you for a video card driver, leave the vesa marked and then hit Return. In the next window you can enter the video modes to be used . Go down using the arrow down key and when you reach the resolution you would like to use mark it with the space key and then hit Return. The setup will be written to the file /etc/X11/xorg.conf. Next time you boot Ubuntu Linux you will have the maximum resolution changed.

File sharing between Mac OS X and Ubuntu

Parallels has not implemented the same simple file sharing system they have for Windows in Parallels Desktop. But there is a good substitute which I will show you here, the
SharePoints program. The SharePoints program lets you setup one or more shared folders in Mac OS X that can be accessed in Ubuntu Linux. Here is a short descriptions on how to use SharePoints to setup file sharing. But first we have to enable personal file sharing and Windows file sharing in the Mac OS system settings:


  • In Mac OS X download and install the SharePoints program.
  • Start the program.

  • Select a folder to used as a shared folder. I used the Public folder.
  • Give it a name (ParallelsDesktop)
  • Enable both AppleFileServer sharing and Windows sharing.
  • Set the permissions in the popup window

  • Allow Windows guests and set inheritance of permissions if needed.
  • You may have to set group permissions to r/w to allow writing files to Mac OS X.
  • Save the setup.
  • Start Ubuntu Linux and open the Networks Server window in the Places menu
  • Hopefully you will see the shared folder (SVEN-KE-ANDERSS).
  • If you are using VMware double-click the WIndows Network icon.
  • Double-click to look inside and read or write files from/to this folder. Voila!



File sharing using secure shell (ssh)

Secure Shell or SSH is a set of standards and an associated network protocol that allows establishing a secure channel between a local and a remote computer.
The first thing we have to do on the Mac side is to enable remote login (fjärrinlogging) and to find the ip-address (1x.z.1.y). We should also add the .ssh directory in our home directory.




Here is good
description on how to setup and use ssh. Let's follow it.
  1. Open a terminal in Ubuntu Linux
  2. Generate a new key. Use the command ssh-keygen -d
  3. Copy the key to the Mac OS X host using the secure copy cammand.
  4. scp ~/.ssh/id_dsa.pub 1x.z.1.y:.ssh/authorized_keys2
  5. We are now ready to test the ssh command: ssh -X 1x.z.1.y or use ssh -X userid@1x.z.1.y to connect to user <userid>.
  6. We are now remotely logging in to the Mac OS X host and can do almost anything, copying files, starting programs and much more. The DISPLAY variable is automatically set to display windows in the Ubuntu desktop.
  7. If you execute the command echo $DISPLAY you should see something like this: loacalhost:10.0. If the DISPLAY variable is not set read this link to learn what to do.
  8. To exit the ssh session use the command: exit or logout

Printing using an Airport Express

I use an
Airport Express for wireless printing in Mac OS X. Apple uses a technique they call Bonjour to allow printing using a usb printer connected  to their Airport wlan hub. Bonjour lets you create an instant network of computers and and smart devices just by getting them connected to each other. It uses something called Zeroconf or Zero Configuration Networking to setup everything.
To print from Ubuntu Linux to a USB printer connected to an Airport Express we will ignore the Zeroconf method and use the standard
Common Unix Printing System (CUPS) instead. To use CUPS we first have to find the IP address of the Airport Express unit. When we open the Airport Utility program under Mac OS X and scan the network for Airport Extreme and Airport Express units, we will see the following display:

   


The IP address
of the Airport Express is 10.0.1.200.  When we have the IP address we can scan this address to find all open ports. The port scan function built into the Network Tools (System->Administration->Network Tools) utility didn't display all open ports so I decided to install nmap instead. I downloaded and installed nmap-4.20-1.i386.rpm and here is the print out from the program:

==> nmap 10.0.1.200                                                                                         

Starting Nmap 4.20 ( http://insecure.org ) at 2007-03-05 17:30 CET
Interesting ports on 10.0.1.200:
Not shown: 1693 closed ports
PORT      STATE SERVICE
53/tcp    open  domain
5000/tcp  open  UPnP
9100/tcp  open  jetdirect
10000/tcp open  snet-sensor-mgmt

Nmap finished: 1 IP address (1 host up) scanned in 22.035 seconds

The port 9100 is used for printing and it uses a HP jetdirect printer driver. We are now ready to setup for printing to my Epson Stylus Photo 870. To add a new printer open System->Administration->Printing
. Double-click the New Printer icon and follow the instructions.



  1. Select Network Printer
  2. Select HP JetDirect
  3. Enter IP address of Airport Express or Airport Extreme where the printer is connected.
  4. Port number should be 9100
  5. Click Forward

  1. Select printer manufacturer
  2. Select printer model
  3. Select driver type
  4. Click Forward

  1. Enter printer name or use default name
  2. Enter descriptive text
  3. Enter printer location
  4. Click Apply


Select the Stylus-Photo-870 and make it the default printer (Edit->Make D
Posted at 08:17 am by svenand
Comments (5)  

 
Nov 18, 2006
Customizing Ubuntu Linux 2
More fixes

I wanted to add the current directory (.) to my PATH variable and tried to put the command in the .bash_profile file, but it didn't work. When I used the file /etc/profile it did execute. Open the file using the command <sudo nedit /etc/profile> and add the following line : <PATH=.:$PATH> to include the current directory in the PATH variable. When you log in the next time it will be set. If you read the Linux in a Nutshell book it says the following:
Bash reads these files:
1. /etc/profile. Executed automatically at login, first.
2. The first file found from this list: ~/.bash_profile, ~/.bash_login, ~/.profile. Executed automatically at login. Second.
3. ~/.bashrc is read by every shell, after the login files.

I coudn't get ~/.bash_profile and ~/.bash_login to work, but ~/.profile was executed. I put the following line <PATH=~/bin:"${PATH}"> in my .profile to add my bin directory to the PATH variable. Use the command <echo $PATH> to find out if all paths have been added.


Top


Posted at 07:34 pm by svenand
Make a comment  

 
Nov 17, 2006
Ubuntu Links
Posted at 06:47 pm by svenand
Make a comment  

 
Nov 10, 2006
A dream come true
I always dreamed of being able to use my Mac for all my computer tasks both at home and at work. I am an ASIC designer and in my job I use many different CAD (Computer Aided Design) programs. These programs used to run only on big Unix workstations from SUN and HP. But with Linux growing more and more popular they now can run on almost any PC, equipped with a X86 processor.

I bought my first
Apple
computer in 1993, a Macintosh LC III. It had a 32MHz 68030 CPU and 4MB of RAM.

It was a great machine. I used it for everything, playing games like Pacman and Tetris, writing all my documents and organizing the house association. To find out more about the Apple and Macintosh history go to
Low End Mac
or EveryMac.com.









My next Mac was a Performa 5400/180. It was introduced 1996 and had a PowerPC 603e running at 180MHz. It had 16MB of RAM and a 1.6 GB hard drive.









My third Mac was a PowerBook G3/400 codenamed Lombard. It had a PowerPC 750 (G3) processor running at 400MHz and was equipped with  64MB of RAM and  a 6 GB hard drive.






My fourth Mac was a PowerBook G4 1.67. It was introduced in 2005 and had a PowerPC 7447a (G4) running at 1.67 GHz. It had 512MB of RAM and 80GB hard drive.







My fifth Mac is the one I am using today and the one that has given me the possibility to use it for all my computing needs both at home and at work. It is a MacBook Core Duo featuring a 2.0 GHz Intel processor (T2400) with two independent processor cores on a single chip. I had it customized with 1GB of RAM and a 80GB hard drive. It uses the same processor as many PCs are using and lets me install and run  Windows XP and any Linux version I like.



My current setup looks like this. It consists of a MacBook Core Duo with a bluetooth keyboard from Apple  and a bluetooth mouse BT500 from RadTech. The display is a 23-inch Cinema display from Apple. When I leave home I just unplug the display grab the MacBook and have access to Mac OS X, Windows XP and Ubuntu Linux wherever I  go.
 
Posted at 10:36 am by svenand
Comments (4)  

 
Nov 7, 2006
Florida the sunshine state
During a more than one year stay, from October 2000 to January 2002, we (myself, my wife and our daughter) learnt to love Florida, its climate, nature, people and attitude. In September 2000 I was offered a job in US, working for Ericsson Inc as an ASIC designer. A company called Starburst located in Orlando performed the ASIC design project. Working for Starburst was like coming home. You felt like you belonged to the family from the first day you entered the company door.
The RTL design was done at Ericsson in Stockholm Sweden and Starburst did all the backend work, synthesizing the design, running timing verification and generating all test vectors. It was a busy but fantastic year and it was sad when we had to leave Florida to return to Sweden in January 2002. When we came to Stockholm it was  -10C and two feet of snow on the ground.

What we liked best about Florida were the gorgeous beaches. The first thing we did was to buy the book Florida Beaches to start exploring all the places. The front page of the book says "The Only Guide to the Best Places to Eat, Stay, Swim, and Play on Every Beach in the Sunshine State". With the help of this book we went to beaches all over Florida from the Panhandle down to the Keys.

There are so many beautiful beaches in Florida but here are some we liked the most.




Posted at 04:39 pm by svenand
Comment (1)  

Next Page