Sunday, March 23, 2008

Software & Hardware ... are they really different?

A compiler is a program which takes a source program as input and produce an equivalent source program in a different language. In general a compiler translates a source program in low level representation which a CPU with a precise architecture can execute. This is the main reason a compiler is often related with a particular target architecture.
The code life-cycle starts from the high level representation (typically written by a sw developer) up to a low level representation, often a bit string standing for a sequence of a assembly instructions. If the target architecture is a configurable hardware, the bit string is a device configuration aimed to the mapping of a circuit on the programmable device. In next posts I will provide more hints about code processing.
An Interpreter is a program able to execute another program implemented with a particular language: it is possible to write interpreter for the same language used to implement it (here the most popular example :)). In general it is
easier to write an interpreter than to write a compiler, because a , in general, comprises different layers for different optimizations ... more or less architecture dependent.
  • See this site if you want to practice with interpreters implementation.
  • See this site if you want to learn something more about compilers implementation.
In next posts I will provide more links about some useful textbook on this issues, even if they require a good background in computer science and sw engineering.

The greatest part of people thinks the HW is an electronic device able to execute a SW program and only "expert" people know HW and SW are the same things ... a processor is simply an electronic implementation of an interpreter for a particular language: its own assembly language which is often known as ISA (instruction set architecture).
In general a standard CPU has a Data-path+Ctrl architecture and a hierarchical set of memory system: register file -> cache(s) -> RAM -> disk (virtual memory) . See below the MIPs arhcitecture, it is usually shown in the computational architectrues courses:
A programmable device executes a task after having acquired a configuration which implements a particular architecture: "general purpose" or more frequently "application specific". The configuration has a SW description by VHDL or verilog language written by hand or returned by a compiler. This issue will be analysed much better in next posts now what is interesting to mark is that a configuration stands for a piece of HW mapped on a configurable layer.
In the next generation architectures probably we will see packages of configuration sw libraries provided with CPUs coupled/interfaced with a configurable core: the CPU generations will be tagged by both HW specification (as the production process technology) and improvement of configuration libraries. Look at this.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home