Friday, December 14, 2007

Uninstalled Netbeans 5.5.1 from my Ubuntu

It is not because I do not like Netbeans or something like that. But it is because I got the brand new Netbeans 6.0 IDE installed on my computer. So I think it is OK to uninstall the old version now :)

You can get Netbeans 6.0 IDE here!


Different versions of Netbeans IDE actually can coexist without any conflict. Unfortunately, my HDD space of Ubuntu partition is very limited (at 6 GB). So I need to keep only the programs I actually use.

Uninstalling program from Ubuntu Linux is done differently from Windows. I installed the Netbeans IDE using the Package Manager. But I cannot find a way to uninstall the program using it. So I checked Application->Add/Remove... but still got no luck. So I finally browsed to Netbeans 5.5.1 folder located at /home/m3rlinez/netbeans-5.5.1/_uninst/ and found an uninstall script (uninstaller.sh). I double clicked on it and selected Run in Terminal. Then, the nice GUI popped up and I uninstalled Netbeans.



After my experience from using the latest release of Ubuntu (7.10). I think Ubuntu is now ready for many computer geeks and Java developers. But it may not be ready my mom :( The team has to get more works done.

Friday, December 7, 2007

My Java Remote Method Invocation Tutorial in Thai

My assignment in course Distributed System forced me to study Java Remote Method Invocation or, in short, Java RMI. The requirements are to invoke some methods on the server, host my own server and let my client invoke method in it.

Java RMI is in the same position as .NET Remoting object I mentioned before. It facilitates the interprocess communication. However, I think both method are too hard to use. The .NET Remoting requires ugly configuations while Java RMI requires the policy file. They should be easier.

So, to help the less experience Java programmers getting started, I decided to publish an article on how to make use of Java RMI with Eclipse IDE. The article is in Thai language. You can find it here, http://m3rlinez.googlepages.com/RMITutorial.pdf

Edit: I got some feedbacks from my friends and found that there are still some mistakes in the tutorial. I will correct these when I have time.

Saturday, November 17, 2007

Load bitmap images onto Xilinx Spartan-3 FPGA board

As I mentioned before in this blog about my Hardware Synthesis term project, I designed the copy of Pong game using Verilog and tested it on Xilinx Spartan-3 FPGA Starter Kit. The highlight feature of my project is the ability to display bitmap images as game's components. The following instructions are how to do that.

Note: I will assume that the readers know how to design ASIC using Verilog language with Xilinx Webpack and have some background in computer programming.

First, since I was going to use 640x480 8-color mode, so I prepared 8-color bitmap images of in-game components. These are few examples.



To display these images, we need to store their pixel data somewhere in our circuit. There are few options.

  1. Hard-code the static wire or reg variables, which store pixel data, in the Verilog code. This is going to be easy. But you will suffer from long synthesis, post-place and route time. The size of .v files are going to be unacceptable big too.
  2. Utilize the Block RAMs available as external component on Xilinx Spartan-3 FPGA board. Just set the initial values of these Block RAMs to the pixel data of our images.
In this entry, I am going to use the latter method. For more information about how to use Block RAMs in your design, you can consult this documentation from Xilinx.

No matter which way you chose, we need to convert .jpg, .gif , .png, .bmp, etc. images data into easy-to-understand pixel data. This can be done via a little programming. The following Java program prompts user for an image and convert it to Coefficients File (.coe) for use as initial value of Block RAMs. The format of Coefficient File can be found in the Xilinx documentation I mentioned recently.
The program generates two files, name.coe for color images and name.bw.coe for black and white images. BW images consume less space.

You can now add new ROM module to your design using Xilinx Core Generator from with Xilinx Project Navigator. The detailed instructions on how to do this can also be found on the document I mentioned before. But I am kind enough to provide you this less-detailed screen shots :)



Create new source and select IP (Coregen & Architecture Wizard)



For this kind of use, a read-only Single Port Block Memeory would be enough.



You can specify some memory attributes here.



This is the most important part. You have to tick the "Load Init File" checkbox and click "Load File ..." button then choose the generated .coe file or .bw.coe file.



You can click on the "Show Coefficients" button to make sure that your file properly loaded.

Finally, click on the "Generate" button to generate your ROM module. Your ROM is now ready to use :)

I hope this helps.