Bug in data2mem…

I using data2mem to replace data in BlockRAM,
It confused me when I try to replace BlockRAM data in Spartan6 Devices.

There are correct in BRAM16 with 8bits and 16bits, only error BRAM18 with 18bits.

Update: bug exist in ISE 12.4, 13.4, 14.7.

The bmm file I write before is like this:

ADDRESS_SPACE rom_inst RAMB18 INDEX_ADDRESSING [0x00000000:0x000003FF]
BUS_BLOCK
pblaze_rom_inst/ram_1024_x_18 [17:0] PLACED = X1Y6;
END_BUS_BLOCK;
END_ADDRESS_SPACE;

My data file:

@00000000
20010
22001
0122F
...

The original verilog contain the same data:

...

.INIT_00(256'h5000600CB10090011045111050006005B200B1009001100711AF122F20010010),
...

.INITP_00(256'h00000000000000000000000000000000000000000002D2A2AAAAA2D8B50B540A),

When I regenerate bit file from commandline:

data2mem.exe -bm app.bmm -bt ..\top_68013.bit -bd ..\fw_pblaze\rom.mem tag rom_inst -o b top_app.bit

The top_app.bit can not run!

data2mem_bug

It’s look like bit-reverse!


top-68013.bit(correct):
8004: 2200: 1048: BC11:
10_0000_0000_0001_00|00 10_0010_0000_0000|0001 00_0001_0010_00|10_1111 0000_0100_01
*(0)******************* *(1)****************** *(2)*******************

top-app.bit(error):
8200: 2800: 43D1: 20F5:
10_0000_1000_0000_00|00 10_1000_0000_0000|0100 00_1111_0100_01|00_1000 0011_1101_01
*(0)******************* *(1)****************** *(2)*******************

MEM:
20010: 10_0000_0000_0001_0000 (0)
22001: 10_0010_0000_0000_0001 (1)
0122F: 00_0001_0010_0010_1111 (2)

the top-68013.bit is correct, and data is same as mem file.
but top-app.bit is bit-reverse!

when I write bmm like this, everything ok.


ADDRESS_SPACE rom_inst RAMB18 INDEX_ADDRESSING [0x00000000:0x000003FF]
BUS_BLOCK
pblaze_rom_inst/ram_1024_x_18 [0:17] PLACED = X1Y6;
END_BUS_BLOCK;
END_ADDRESS_SPACE;

So I think data2mem may work under this mapping on BRAM18!…


mem:|17 16|15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00|
bit:|17 16|00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15|

So I need to write this format: “… [0:17] PLACED = …”

This entry was posted in Memo and tagged , , , , . Bookmark the permalink.