Forum Discussion
My M9K blocks get always synthesized away!
Hey,
I am using MegaFunction to instantiate M9K SRAM blocks in my design and the Quartus 17.0 software always syntheszies away my M9K blocks, my design consists of Reset signal and the memory blocks driving outputs
Please help this issue is driving me crazy
My board is DE2-115
14 Replies
- ak6dn
Regular Contributor
Well, if Quartus detects that your memory is never written and holds a constant data pattern it can optimize it away and replace it with simple logic.
Quartus is pretty smart about optimizing away logic it detects as not being used (eg, generated logic that does not drive any other logic can be eliminated).
- KennyT_altera
Super Contributor
Quartus will show the reason why those ram was optimized away. Can you check in your Processing -> Compilation report. Look into all the details over there.
- AAlas3
Occasional Contributor
What I did is building a module that generates Sine wave and save enough samples of this wave in M9K blocks then I connect M9K blocks to VGA driver block so that I can see output on the screen but the fitter keeps destroying the entire memory and I don't know why
- ak6dn
Regular Contributor
First, does the design run in simulation? You describe what the design is supposed to do, but does it behave that way in simulation?
Second, look in your design .map.rpt file, couple of sections:
16. Registers Removed During Synthesis
17. Removed Registers Triggering Further Register Optimizations
will tell you which register blocks have been removed, and give a reason why.
- AAlas3
Occasional Contributor
The design runs in simulation as expected and to make sure more I made a hardware test where I used the VGA chip as a DAC and saw the sine on my scope and everything works perfectly but the problem arises after connecting the M9K blocks to internal
circuity to move on on my project
I will check the rest now
- AAlas3
Occasional Contributor
90% of removals due to stuck pins!
- KennyT_altera
Super Contributor
Do you mean stuck pin to GND or VCC? If yes, you should be able to correct it.
- AAlas3
Occasional Contributor
Yes stuck either to GND or VCC, Thanks a lot my friend you give me what I need to understand this behavior, from my code if statements don't cover everything related to M9K so these uncovered portions of my code synthesized to GND or VCC in RTL when I set a complete description to M9K everything is working as I designed it, but I have another question here, What is the difference between Logic Low (0) and GND in RTL? it seems the software differentiates between them
- KennyT_altera
Super Contributor
Logic Low (0) and GND should be the same. Can you look into the rtl viewer to see if they got different?
- AAlas3
Occasional Contributor
If anything connected to GND it will be synthesized away and if it is just a Logic Low it won't be synthesized away that's what I noticed, forgive me but I think they should be the same I am just telling you what I noticed