Two instances of Microblaze ...

Hi all, I have a microblaze processor that I've built using the EDK and afterwards simulated and it seems to work fine. Now I need to make two instances of this Microblaze system in my design. Can I use the same module and instantiate it twice or I maybe I need to make a copy of the system and name it differently. If I instance the same module twice I figured out that it will be problematic to fill the BRAM with code data. Can anyone help ? Thanks, Mordehay.

Reply to
me_2003
Loading thread data ...

Just add the 2nd MicroBlaze in the XPS tool.

Göran Bilski

Reply to
Göran Bilski

Hi Goran, I did not understood your answer.. Do you mean that I need to create a system which contains two microblaze instances and afterwards export it to the ISE ?

What if I want to have these two microblazes in two different systems and afterwards export them to ISE separately (my top.vhd will contain two system (microblaze) instances ? Can I do it ? Can I use two BMM files in that case ?

Thanks in advance, Mordehay.

G=F6ran Bilski wrote:

Reply to
me_2003

Hi Mordehay,

I haven't tried this myself but you should be able to import two EDK system into a ISE project. You can't have two .bmm but you could merge them into a common .bmm. In a .bmm file there is the hierarchical path to the BRAMs so they should be possible to merge as long the paths are different.

Göran

What if I want to have these two microblazes in two different systems and afterwards export them to ISE separately (my top.vhd will contain two system (microblaze) instances ? Can I do it ? Can I use two BMM files in that case ?

Thanks in advance, Mordehay.

Göran Bilski wrote:

Reply to
Göran Bilski

G=F6ran Bilski schrieb:

em

be

If you just add two XPS instances to ISE then it says: "Two instances detected, only one is allowed" and doesnt proceed.

this is when you use normal flow where you just have XPS system as submodule in ISE

if you add the stub.vhd manually (And not the XMP file) maybe it want complain so much then

Antti

Reply to
Antti

You can instantiate a microblaze system twice in your toplevel. The only problem you have is the .bmm file. This is only describing the memory layout for one system. You can do the following:

- take the generated .bmm file (generated by edk);

- rename it to dual_mb.bmm for instance;

- copy the contents from the file at the end of the file:

ADDRESS_BLOCK plb_bram RAMB16 [0xffffc000:0xffffffff] BUS_BLOCK rtx/ppc_stub/plb_bram/plb_bram/ramb16_0 [63:56] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_1 [55:48] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_2 [47:40] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_3 [39:32] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_4 [31:24] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_5 [23:16] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_6 [15:8] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_7 [7:0] ; END_BUS_BLOCK; END_ADDRESS_BLOCK;

ADDRESS_BLOCK plb_bram RAMB16 [0xffffc000:0xffffffff] BUS_BLOCK rtx/ppc_stub/plb_bram/plb_bram/ramb16_0 [63:56] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_1 [55:48] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_2 [47:40] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_3 [39:32] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_4 [31:24] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_5 [23:16] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_6 [15:8] ; rtx/ppc_stub/plb_bram/plb_bram/ramb16_7 [7:0] ; END_BUS_BLOCK; END_ADDRESS_BLOCK;

- rename the name of the address blocks and rename the first part of every line which describes a memory part;

ADDRESS_BLOCK txc_plb_bram RAMB16 [0xffffc000:0xffffffff] BUS_BLOCK transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_0 [63:56] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_1 [55:48] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_2 [47:40] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_3 [39:32] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_4 [31:24] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_5 [23:16] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_6 [15:8] ; transmitter_core/ppc_stub/plb_bram/plb_bram/ramb16_7 [7:0] ; END_BUS_BLOCK; END_ADDRESS_BLOCK;

ADDRESS_BLOCK rxc_plb_bram RAMB16 [0xffffc000:0xffffffff] BUS_BLOCK receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_0 [63:56] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_1 [55:48] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_2 [47:40] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_3 [39:32] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_4 [31:24] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_5 [23:16] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_6 [15:8] ; receiver_core/ppc_stub/plb_bram/plb_bram/ramb16_7 [7:0] ; END_BUS_BLOCK; END_ADDRESS_BLOCK;

- include this .bmm file in your ise project and a dual_mb_bd.bmm file will be created. In your toplevel you should call the instances of your microblaze system respectively transmitter_core and receiver_core (using the example code above);

Now the problem is: how to get the software executable into both memory locations, because importing the .bmm file in the edk won't work (the system is only having one memory layout for one microblaze, while the generated .bmm file has two). You can fix this by manually import the software executable in the generated .bit file. You have to use the tool data2mem. Look at the following line and modify it to your own situation.

data2mem -bm syn\dual_mb_bd.bmm -bt syn\toplevel.bit -bd ..\code\executable.elf tag txc_plb_bram -bd ..\code\executable.elf tag rxc_plb_bram -o b download.bit

I use this solution for a dual powerpc system, but I am sure it will work for the microblaze too.

I had a conference call with xilinx in the past about this issue (using an edk project with one powerpc and instantiate it twice in a vhdl design). They told me that the tools are not made for this functionality. There solution was: make an edk project with both processors. This is not an option if you want to make a common block with one processor which you can instantiate multiple times.

The only problem you could have is debugging your software. With the powerpc system you can only have one jtagppc_cntlr in the fpga. So it must be placed outside the edk project. I gave it a try but was not able to make contact through the edk. The edk simply detected no jtagppc_cntlr in the .mhs file so it assumed there was none in the fpga. I don't know if it would work with the microblaze in combination with the opb_mdm module.

Frank

Reply to
Frank van Eijkelenburg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.