Forum: µC & Digital Electronics initialization of EBR based ROM in Lattice MachXO2

von Thomas Hergenhahn (Guest)

Rate this post
0 useful
not useful
I'm currently learning how to work with FPGAs. Currently, I'm working 
with a Lattice  MachXO2 family device. I implemented some logic and a 
CPU core.
In order to run a program on that core, I currently do these steps:
- (cross-)assemble the program on a pc
- convert the resulting binary to a .mem file (addressed hex)
- I let Lattice diamond IPexpress regenerate the ROM using that .mem 
- I restart the whole tool chain to generate a .jed file (takes 5 to 45 

in IPexpress, I checked the option "allow update of inititialization 
file stored in UFM"

What I want to do is to generate new initialization data from a new .mem 
file and either combine it with the existing logic configuraton into a 
new .jed file. Or, generate a .jed file to program only the UFM part.

I can write UFM pages.

What I cannot do is convert a .mem file to the apropriate pattern of 0s 
and 1s the .jed file is made of.
I could not find a tool for that.
I can find where the initialization data starts in the .jed file
But I cannot figure out how the data from the .mem file is converted to 
the 0s and 1s in the .jed file.

I shall appreciate any help or hints

von Chris C. (customchris)

Rate this post
0 useful
not useful
I could really use your help, Im using a machxo2 7000HC and im in 
desperate need of using the UFM to store and read 2 bytes, or just 12 
bits. This is something over my head at this moment, everything else in 
my project is done. I would really appreciate it. Hope we can work 
something out, i really don't want to use external spi flash for just 12 


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.