0

For an iCE40 1k device, Following is the snippet from the output of the command "iceunpack -vv example.bin" I could not understand why there are 332x144 bits? My understanding is that [1], the CRAM BLOCK[0] starts at the logic tile (1,1), and it should contain:

  • 48 logic tiles, each 54x16,
  • 14 IO tiles, each 18x16

How the "332 x 144" is calculated?

Where does the IO tile and logic tiles bits are mapped in CRAM BLOCK[0] bits?

e.g., which bits of CRAM BLOCK[0] indicates the bits for logic tile (1,1) and bits for IO tile (0,1)?

Set bank to 0.
Next command at offset 26: 0x01 0x01
CRAM Data [0]: 332 x 144 bits = 47808 bits = 5976 bytes
Next command at offset 6006: 0x11 0x01

[1]. http://www.clifford.at/icestorm/format.html

Thanks.

Sajjad
  • 111
  • 1
  • 13
  • 1
    The checkerboard pattern should hopefully explain it a bit. And don't forget there is BRAM in there too, which is only 42 wide. – gatecat Jul 21 '20 at 06:58
  • @DavidShah, that is what i could not understand. height=9x16=144 (OK) But, Width=6x54+18=324 (which is different here i.e.332) How? – Sajjad Jul 21 '20 at 14:25
  • 1
    Looking at that diagram, I think there is just a bit of a gap in the middle – gatecat Jul 21 '20 at 14:53
  • Yes, I guess, this gap belongs to BRAM[0] to [3]. How Width of 332 is calculated? I can't understand. In this width there are 1 I/O tile and 6 logic tiles, it should be Width=6x54+18=342. – Sajjad Jul 21 '20 at 15:17
  • @DavidShah 324 in the 2nd comment is a Typo. It is 342. – Sajjad Jul 21 '20 at 15:18
  • 1
    The BRAM is only 42 wide so the correct calculation is 18+42+5x54 = 330 – gatecat Jul 21 '20 at 15:25
  • 1
    I don't know why it is rounded up to 332 resulting in a small gap. Possibly because 332 was an easier number to work with for some internal reason. – gatecat Jul 21 '20 at 15:26
  • Thanks @DavidShah. Then in the same file what is meant by "BRAM Data [0]: 64 x 128 bits" BRAM Data[] is not mapping to RAMB/RAMT bits? The snippet from file is: `Setting bank offset to 0. Next command at offset 23963: 0x01 0x03 BRAM Data [0]: 64 x 128 bits = 8192 bits = 1024 bytes` – Sajjad Jul 21 '20 at 15:44
  • 1
    That's BRAM initialisation, wrt the 42 bits I'm talking about BRAM routing/mode config – gatecat Jul 21 '20 at 15:55
  • @DavidShah thanks alot. http://www.clifford.at/icestorm/format.html says that there is "two zero bytes" to each CRAM while Writing SRAM content. That is why it 330+2=332. I guess. – Sajjad Jul 21 '20 at 16:00

1 Answers1

1

height=9x16=144 (1 I/O tile and 8 Logic tiles)

Width=18+42+5x54 = 330 (1 I/O tile, 1 ram tile and 5 Logic tiles) plus "two zero bytes" = 332.

Sajjad
  • 111
  • 1
  • 13