FPGA computer Impulse C
Description of VHDL
In VHDL a design consists at a minimum of an "entity" which describes the interface, and an "architecture" which contains the actual implementation. Some designs can contain multiple architectures and configurations. It is important to note that VHDL is a description language not a programming language. Also, HDL can represent parallel operations, while programming languages can only do serial operations.
In VHDL, synthesizers correspond to compilers. Logic synthesis transforms an RTL description of a circuit in an HDL, into an optimized netlist representing storage and combinational logic.
The netlist can be transformed by using physical design tools into an actual integrated circuit layout. The binary file obtained from the netlist can also be used to program an FPGA.
Qualities of VHDL:
- VHDL is case-insensitive
- VHDL is a strongly typed language, the type of the inputs and outputs must be declared.
- The libraries must be declared before every entity.
VHDL consists of entities and architectures. An entity is the name of the circuit and the definition of its inputs and outputs. The architecture is a particular representation of the function of an entity.
We learned how to program the Digilab2e. we had to read the board's manual, which we dowloaded from digilent inc. web site. This development board contains the Xilinx Spartan 2E xc2s00e, a 50 MHz oscillator, serial port, and it is programmed by using the computer parallel port. We had to download the ISE Webpack from http://www.xilinx.com/ , also we downloaded a video from http://www.digilentinc.com/ explaining how to download the bitfile to the board's FPGA.
Description of Impulse C
CoDeveloper? is an integrated development environment that contains Impulse C libraries. Impulse C is a library of functions that allow the programming of parallel algorithms targeting FPGA-based platforms. One of the advantages of using Impulse C, is that it uses standard C. Impulse C can be used not only for processor acceleration but also for module generation. In our case we are interested in using it only for processor acceleration.
"Processor acceleration refers to the use of Impulse C, in combination with a Platform Support Package and in combination with FPGA vendor-supplied platform building tools, to create a hardware accelerated system" It is important to note that it is not necessary to have any knowledge of HDl's, nor FPGA design.
One important tool that CoDeveloper? has is Stage Master Explorer. With this graphical tool you can observe the processes generated by Impulse C. It shows the parallelization of code, and generated pipelines.
The functioning of Impulse C is based on processes and streams. Processes are segments of code that are running independently of each other. Processes can run either on the processor or on the FPGA. Streams are the main way of communication between processes. Other communication ways are by messages and by the use of shared memories.
The code is divided in two parts: one that is used by the processor and other used by the FPGA. In the hardware segment you write the configuration function. This function describes the application as a set of processes. This function is passed to the co_architecture_create function, as a function pointer.
void configure(void * arg)
co_architecture co_initialize(void * arg)
return co_architecture_create("filter _arch", "generic_vhdl", configure, arg);
Processes are created in the configuration function. In the next example we declare three processes: procHost1, procPe1 and procPe2. Theses processes are associated with three process run functions named Host1, Pe1 and Pe2.
#define BUFZIZE 4
co_process procHost1, procPe1, procPe2;
co_stream s1, s2;
s1= co_stream_create("s1, INT_TYPE(16), BUFZIZE);
s2= co_stream_create("s2, INT_TYPE(16), BUFZIZE);
procHost1 = co_process_create("Host1", (co_function)Host1, 1, s1);
procPe1 = co_process_create("Pe1", (co_function)Pe1, 2, s1, s2);
procPe2 = co_process_create("Pe2", (co_function)Pe2, 1, s1);
The co_process_create function accepts at least three arguments. The first one is a pointer to a character string that contains a stream name. This name is used only for the Co-Monitor Application. The second argument is a function pointer which identifies the run function to be associated with the call from co_process_create. The third argument indicates the number of inputs and outputs defined by the process. Then the ports are defined. For example in the definition of procPe1, the number of ports(inputs, outputs) is 2, so 2 ports are defined: s1 and s2.
If you want to read more information on ImpulseC the link is found in the links tab or here below: