initialization of EBR based ROM in Lattice MachXO2

Guest #4545319
Rate this post
• ▲ 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 
file
- I restart the whole tool chain to generate a .jed file (takes 5 to 45 
min)

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
#4562152
Rate this post
• ▲ 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 
bits.

Reply

A question of your own? This thread is over 10 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.