Thursday, June 09, 2005

Embedded Systems part 3

Given the current state of art of VHDL and FPGAs, I think that circuits and programs will walk around the networks. FPGAs are boards that can be programmed to emulate every digital circuit you can figure out. VHDL is how they are programmed.

If you can send a program over the net, by copying an instance of it in a given location, you can ask it to carry out a VHDL program, reach a particular target, access a FPGA board generate the circuit and next, ask the source to load theVHDL code.

Physical medium is most likely becoming optical or wireless, but to guys like me, it won´t matter. We will leave the information ready in bytes or whatever they will call it, so it reaches the physical medium and then gets broadcasted.

Embedded Systems part 2

Hardware and firmware are encapsulated to the programmer. OK, you could think that this is not TRUE programming, but remember digital circuits: you are not seeing all those C-MOS transistors that make all those gates that make all those latches and flip-flops.

The world is full of encapsulation.

Firmware should be written in C of course. Assembly might be used to, but in small bits. Not because I don´t like Assembly, because it is not readable, it is not easy to handle and maintain. Truth to be told, I mostly read the comments when I need to check out Assembly code rather than the code it self.

Suppose you write a program that reads temperature, pressure, and needs to generate an output for a electronic injection systems. In this case, using C is much better because all the code rely on low level.

Fun enough?

Embedded Systems part 1







Wednesday, June 01, 2005



I was wondering about Java and polymorphism. Actually, I am waiting for that the QA team to test my software so I can correct bugs and I was freaked out because I thought I could forget
OOP and Java so I thought I should try a little of it. :-)

I basically think of an abstract class A and derive B and C so I can have a 4th class that may use
any of the other 3 and I only write one implementation...

public abstract class A {

A( int a, int b ){};
public abstract void f1();

public class B extends A {

protected myC;

B( int a, int b, int c ){
super( a , b );
myC = c;

public void f2(){

public void f2b(){

public class C extends A {

protected String s;

C( int a, int b, String s ){
super( a , b );
this.s = s;

public void f2(){

public class D {

A aptr;

D( A a ){

// points to class A
// but knows which derived class it refers to
// because of the polymorphism
aptr = a;


void DoSomething(){


public class E{
public static void main( String[] args ){
B b = new b( 1 , 2 , 3 );
C c = new c( 1 , 2 , "asdasdd" );
D d1 = new D( b );
D d2 = new D( c );