0

I have a MachXO3 chip. Family datasheet is available here: http://www.latticesemi.com/~/media/LatticeSemi/Documents/DataSheets/MachXO23/DS1047-MachXO3-Family-Data-Sheet.pdf?document_id=50121

The datasheet says that EBR is composed of 9-kbit on page 2-10. But the table 1-1 on page 1-2 lists numbers that are not dividable by 9 at all...

Also, I have the following code:

reg [7:0] lineB0[1:0][127:0];
reg [7:0] lineB1[1:0][127:0];

and the report says that it takes 4 EBR. That sounds completely un-optimized. Why is that? How can I craft my table of 2*(2*128) bytes = 512 bytes = 4096 bit = 4kbit which should hold in 1 EBR?

gregoiregentil
  • 1,793
  • 1
  • 26
  • 56

1 Answers1

1

The automatic inference algorithm seems to be not always super efficient. I generally would recommend to use the IPexpress to create a RAM or ROM if ressource usage is an issue. The tool report a resource use of 1 EBR for a 512*8 dual pipeline ram (RAM_DP). Depending on the organisation/application of your RAM a 128*(8+8) layout might be a good alternative under the assumption that you want to read always the same index for lineB0 and lineB1.

A friendly reminder: premature optimization is the root of all (or at least many) evil. So investing your time in other topics might be more worthwhile if the used amount of memory EBR is actually no limitation right now.

Christian B.
  • 816
  • 6
  • 11
  • I'm accepting your answer because it's the only one offered. are you part of Lattice? There are really strange (aka. "not logical" and "unexpected") things happening with Diamond. For instance, reg [7:0] lineData[5:0][127:0] synthesizes quickly while reg [7:0] lineData[1279:0] takes forever to synthesize - it's the same size. – gregoiregentil Apr 30 '19 at 09:41
  • I am not related to LatticeSemiconductor and I strongly disagree with their "support" policy. First they toke the forum offline with the remark one can use the ticket system and then they closed the ticket system. If I had a choice (read some alternative components with similar capabilities) I would have switch long ago. There are many quirks in their softwares. E.g. IPExpress created a non functional I2C module if "enable wishbone" was not selected although wishbone is not required for the I2C config module. After one year they managed to fix it (i.e. change one line in the module creation). – Christian B. Apr 30 '19 at 10:42
  • That said their (hardware) produces are amazing IMHO. The line data array is rather big you put up there. That is your usecase? I am sorry that I cannot give you a more convenient answer to your question than the "work around it" advice. – Christian B. Apr 30 '19 at 10:48
  • A forum would have been super useful because they are questions/answers/tips specifically to this platform. I'm aware of the ticket. Still, it's an interesting hardware. What are the alternative hardware in similar cost/package/performance? (I didn't find any for low cost and small package) – gregoiregentil Apr 30 '19 at 15:01
  • You could check out the IGLOO series and it looks like intel released a series as well called MAX 10. never heard of them before to be honest but the digikey search brought them up. – Christian B. Apr 30 '19 at 19:05