Sunday, May 6, 2007

BlazeCluster, to create cluster of microblaze

After I finished six-processor implementation, I realize that it's necessary to design a tool to generate multiprocessor architecture instead of manual design before I go to more microblaze processors. The architecture description file should be simple, straightforward and, as my preference, similar to natural language. And for future, the description can be an SVG graph.

Now the first version of BlazeCluster is done. It's available free at http://www.opencores.org/projects.cgi/web/mpdma/overview. The last six-microblaze architecture can be generated from such a simple script:

microblaze_m, microblaze, opb-master, 64k on-chip ram, jtag, opb-uartlite baudrate 9600 stdio, opb-cf-card readwrite
microblaze_cc, microblaze, 8k on-chip ram
microblaze_dct0, microblaze, 8k on-chip ram
microblaze_dct1, microblaze, 8k on-chip ram
microblaze_vlc0, microblaze, 8k on-chip ram
microblaze_vlc1, microblaze, 8k on-chip ram
dp_m_cc, dpram, 8k, left microblaze_m address 0x20000000, right microblaze_cc address 0x20000000
dp_cc_dct0, dpram, 8k, left microblaze_cc address 0x21000000, right microblaze_dct0 address 0x21000000
dp_dct0_vlc0, dpram, 8k, left microblaze_dct0 address 0x22000000, right microblaze_vlc0 address 0x22000000
dp_vlc0_m, dpram, 8k, left microblaze_vlc0 address 0x23000000, right microblaze_m address 0x23000000
dp_cc_dct1, dpram, 8k, left microblaze_cc address 0x24000000, right microblaze_dct1 address 0x24000000
dp_dct1_vlc1, dpram, 8k, left microblaze_dct1 address 0x25000000, right microblaze_vlc1 address 0x25000000
dp_vlc1_m, dpram, 8k, left microblaze_vlc1 address 0x26000000, right microblaze_m address 0x26000000
ddr, on-board ddr sdram, 256m address 0x30000000

The first six lines define six processors and their parameters. The next seven lines is about the dual port memories as interface between them. The last line define the shared memory. Use BlazeCluster to generate MHS, MSS and UCF file. Copy them into an empty project, synthesize and compile. Finally it works!

The code is all written in Perl. Basically it does some translations. First it reads the description file, convert it into an internal data structure and then generate MHS, MSS and UCF file. The code is straightforward and easy to understand. The first version supports only Xilinx XUPV2P board and microblaze only.