quarta-feira, 22 de fevereiro de 2012

Project number 2

The year was 2005 and I was a step away from becoming an electronics engineer. There was only one thing missing to finally end my student life: the final project. There were a lot of proposed projects to choose from, but none really caught my attention. Fortunately there was the option to propose your own project, so I came up with something that I thought it would be at the same time useful and really cool to develop: a vnc and rdesktop thin client. When finished it would be a small and simple board where you connect a display, keyboard, mouse and a network cable, then through vnc or remote desktop it would be a remote workstation.

Well, this was the original idea and the proposed project would divide in 3 major tasks:
  1. Develop a FPGA based 2D GPU (with dedicated functions for networ display).
  2. Build a prototype pcb for the main controller and GPU interface (it would be a mcf5407 with 32Mb SDRAM and 8Mb FLASH).
  3. Develop the code for the microcontroller.

So, after brought back to earth by my project coordinator it ended up being just the first part (the 2D GPU). The issue here was time... It was a one man project and it needed to be ready in less than 3-4 months (and it was not a full time job).

One Xilinx Spartan3 (XC3S200) was used to develop the GPU. The spartan3 kit that was available had on board memory to go up to 800x600x16bit and enough I/O to pull out a dedicated parallel bus for the cpu interface.

The Diligent Spartan3 Starter Kit used for the GPU development

So the remaining question was: "What will control the GPU?" For demonstration purposes I could just interface the GPU with a serial port or some cheap 8-bit microcontroller using spi or i2c. But since the initial idea was to connect a coldfire to the gpu that question had a simple answer: "The dusty 68000!" And there I was again... cleaning up all the dust from those breadboards!

The spartan3 kit already had a VGA connector but it was a simple 3-bit 'resistor DAC'... Yuck! So one expansion connector was used to interface a 24-bit DAC and another one for the cpu interface (the pins were enough for a full 16-bit I/O port).

24-bit DAC board: top view.

24-bit DAC board: bottom view

The GPU ended up working pretty nice. It was modular so that the available functions could be included/removed from the top module, depending in purpose of the application was for. And these were the functions I have developed:
  • putpixel, getpixel (the most basic functions for anything that display graphics). These functions have several working modes: A window could be defined and then post-increment or pre-decrement pixel manipulation methods could be used to fill the window (among other features).
  • clrscr (clears screen, filling with a pre-selected color)
  • poly (draws a polygon, points passed as arguments)
  • circle (draws a circle, center and radius as parameters)
  • text (places text in the display)
  • copyrect (copies a rectangle from a place to another).
  • save / load. (the remaining on board memory was used for a save and load function).
Alpha blending was also possible. Including all the functions, the synthesis wouldn't fit in the provided XC3S200. Using a 'bigger' FPGA this wouldn't be a problem.

Development (at my parents house during christmas season).

I remember that I had more fun than work during the whole project.
When I had the GPU almost finished I played a lot with the 68k and coded several small programs, things like a simple clock, image loading, mathematic function tracing, a simple 3d wiremaze game and 3D raytracing...

One of the the few pictures I've took during development showing a clock and some text in the upper left corner.

"Faculdade de Engenharia da Universidade do Porto" logo loaded from a .bmp file.

Too bad I didn't had enough time to play with it a bit more (and maybe finish the initial idea).

And this was the last project where my 68000 system was used...

A few months ago and after several years later I decided to play with it that 'spaghetti board' again!

And this is where uClinux comes in...

Sem comentários:

Enviar um comentário