Tuesday 18 October 2011

C to RTL Synthesis

Hi again 

I want to post some update on current work. Right now me and collegues from Institute of System Programming am working on developing a system for our hardware  (FPGA project + system level code) capable of running calculations based on different C to RTL Synthesis tools. 

For now we are focusing on Open Source projects like ROCCC and C-to-Verilog (CTV). Both tools generate RTL code that can be inserted into FPGA project. The hardware interface is not very difficult to integate and depends on the C function prototype or interface. Imagine you have a C fucntion like
void my_func(int* Ain, int* Bout)
Where Ain and Bout are arrays of data you whant to process inside the function. When translated to RTL this  function will have a simple interface to memory: two ports (one per array) to static like (BRAM for example) memory will be generated. Besides that some simple control interface (reset, start and done signals) will be generated.

So as applied programmer you have to
1. Load data to memory from host
2. Connect memory to C-to-RTL circuit and send command to start calculations
3. After calc is finished fetch data from memory to host

Comparing ROCCC and CTV tools I can say that ROCCC generates more optimised RTL, but implies more restrictions on your C code.

The work is just started and there is a lot yet to be done, so I better get back to work :))


Tuesday 2 August 2011

FPGA Partial Reconfiguration through PCIe Interface

I have just finished pcie partial reconfiguration (PR) design on Xilinx Virtex 6 FPGA. Now right after computer powerup only small part of FPGA becomes configured from flash with small static part that contains pcie core and interface logic to internal configuration access port (ICAP). During BIOS PCIe bus scan our FPGA becomes dicovered and memory resources are assigned to it. After complete OS load user application can access FPGA by pcie interface and transfer there partial bit file for unconfigured region. 

IMHO there are at least 3 reasons to use this approach to FPGA configuration in scenario when FPGA is connected to computer host by PCIe bus:
  • FPGAs become bigger every year and size of bit files grows also. It implies that to use these modern FPGAs you need bigger flash memory device all the time, which may be a problem - for example there is no such dense SPI flash memory chips on the market.  PR can solve this problem, because only small static configuration file should be stored in flash in this case. 
  • While configuration file length rises so does the configuration time. And as stated by PCIe specification all pcie devices should be up and running and able to answer on BIOS configuration requests within 100 ms after computer powerup. Very often it is very tight limit for large FPGAs and PR approach can also help because it takes much less to for initial configuration to complete. 
  • Also this approach helps a lot when there is a need to reconfigure FPGA while computer is running. For example in high performance computing (HPC) field. 
So you should you do to use PR over PCIe in your next design? 

First, check out Xilinx Application note on this topic xapp883_Fast_Config_PCIe. It is a good starting point. 

Also you will need to learn how to use Xilinx PlanAhed software that supports PR design flow. I suggest you master Partial Reconfiguration User Guide UG702 which will help get aware of general partial reconfiguration process and give you some experince in using PlanAhead. 

On design entry level you will have to follow several rules, for example you will definatelly want to insert additional registers on all signals that cross partition boundary on both sides of it. It is needed to preserve timing, which is always an issue in design with partitions. Check Hierarchical Design Methodology Guide UG748 for more details on design flow with partitions.




Thursday 14 July 2011

First Entry

Hello

Let me introduse my blog. My name is Yuri Rumyantsev - FPGA designer and software programmer from Moscow Russia. I work for Russian company Rosta Ltd. I want to make this blog professinal - here I will discuss whatever conserns me in computer and electronic industry. I will try to share my skills and knowledge of hands on experience of FPGA design, embedded programming and system software development.

Also I am instructor of "FPGA Design Methodology" training course at Moscow State University, so I plan to post here topics on FPGA use cases in education and research.

Allthough I am from Russia, I plan to, but not restricted to, write in this blog in English for several resons.

  • To make this blog available for broader audience
  • Have a little more practice in English 
But language should not be an issue here, so I welcome comments also in Russian.