Skip to content

Proper way to make LUT ROMs #4430

Answered by nakengelhardt
hackguy25 asked this question in Q&A
Discussion options

You must be logged in to vote

The warning is just complaining that it's a syntax error to declare a signal as wire and then assign it in an always block. You have to use the reg keyword in that case. Other than that the code does get interpreted as a combinatorial circuit and doesn't infer any latches, e.g. if I just put it in its own module and run synth_ice40 on that, the final stat shows it's converted into only LUTs:

   Number of cells:                 40
     SB_LUT4                        40

And it even explicitly notes that your code does not model any latch:

2.3.8. Executing PROC_DLATCH pass (convert process syncs to latches).
No latch inferred for signal `\top.\b2' from process `\top.$proc$top.v:8$1'.
No lat…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hackguy25
Comment options

Answer selected by hackguy25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants