spartan3 picoblaze how to make .bmm file work

I'm a newbie in fpga design, and am really struggling to create a bmm file that works. I am using an Spartan-3A starter kit, with ISE 9.2.0i on Linux. I am working with the dna reader project, and am capable of downloading the design, as well as modifying the assembly program (dna_ctrl.psm), and updating it via the whole "implement design" route.

I'm really interested in the direct modification of the bit file via data2mem because it promises much faster turnaround times when updating the picoblaze program, but I'm stuck with the bmm file generation.

I've told ISE to Locate the bram at X0Y0, and from the FPGA Editor i can see that this works. It has implemented a BRAMB16BWE at site RAMB16_X0_Y0

I've created a file my.bmm with these contents:

ADDRESS_SPACE ram RAMB16 [0x0000:0x07FF] BUS_BLOCK top/ram/program_rom/ ram_1024_x_18_1 [7:0] LOC = X0Y0; END_BUS_BLOCK; END_ADDRESS_SPACE;

which seems to be syntactically correct and has the correct number of bits (16kb)

When I try to merge the file with the mem file from kcpsm3.exe I get an error

data2mem -bm my.bmm -bd dna_ctrl.mem -bt reading_dna.bit -o b new.bit

ERROR:Data2MEM:31 - Out of bounds code segment for ram space in 'my.bmm'. Memory space 'ram' occupies [0x00000000:0x000007FF] Code segment #0 occupies [0x00000000:0x000009FF]

This same assembly file is assembled into dna_ctrl.vhd which is correctly built into the final bitfile.

So what am I doing wrong? Any help would be highly appreciated!

Bart

Reply to
Bart van Deenen
Loading thread data ...

Hi

here is the start and end of the mem file

line#

1 @00000000 2 00000 3 2E004 4 2C080 ... 1025 340FD

I presume the first nibble of the 5 is the 2 bit parity, at least it only has values 0,1,2 and 3. So this is an 18 bit data file. So how come the FPGA editor shows that it's a RAMB16BWE block?

Getting confused by now :-)

Bart (poster original question)

Reply to
Bart van Deenen

I don't know if this helps but I used Simgen to generate the bmm file for MicroBlaze. See my blog:

formatting link

Sven

Reply to
svenand

Hi Sven

thanks for the great series. Unfortunately I only have the ISE environment, and I don't (think I) have the simgen tool.

What surprises me most is the error message that the code segment occupies from 0x0 to 0x9ff, whereas the mem file is really only 1024 lines of data, each being 5 nibbles, line#

1 @00000000 2 00000 3 2E004 4 2C080 ... 1025 340FD

That is funny, the 0xA00 is the number of bytes in the 1024 lines of 20 bits. So it doesn't realize those things are 18 bit words!

I hope someone comes up with the answer.

Thanks for thinking with me.

Bart

Reply to
Bart van Deenen

I got it!!!!

xilinx answer database nr 21460 helped me. The correct bmm file is

ADDRESS_SPACE ram RAMB18 INDEX_ADDRESSING [0x00000000:0x000003FF] BUS_BLOCK top/ram/program_rom/ram_1024_x_18_1 [17:0] LOC = X0Y0; END_BUS_BLOCK; END_ADDRESS_SPACE;

It's probably the INDEX_ADDRESSING tag, but I don't really care, I'm in business now. I'll figure out the fine details later.

I'm a really experienced programmer and electronics designer, but this journey into fpga land is steep!!! I love it :-)

Bart

Reply to
Bart van Deenen

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.