Lattice Diamond not recompiling files when editing and saving - Page 1
Forum section: electronics / general

author: kevinbrant
author_rank: Newbie
timestamp: March 21, 2017, 04:36:31 pm
content: Normally when I run Lattice, every time I edit and save a file that's included in the implementation it re-compiles it and gives tells me all the errors and warnings. For some reason that's no longer happening.It also usually updates the file hierarchy, bolding the name of the file that contains the top level entity in the file viewer, however it no longer bothers to try to figure out what the top level file is anymore. Right clicking in the file viewer and saying "remove from implementation" simply removes it from the implementation without making an attempt to figure out what the new top level entity is.This just happened seemingly in the middle of screwing around with implementing and excluding different entities and synthesizing for testing purposes, as far as I could tell I didn't change any settings when this occurred.I'm pretty sure a setting somewhere just toggled but I can't seem to find it anywhere. Any ideas?

author: ale500
author_rank: Frequent Contributor
timestamp: March 22, 2017, 06:00:37 am
content: You can set which top entity your project uses. Letting it figure it for itself is not the best idea. I would assume that the file you modified is not being used due to the wrong top entity, not in the hierarchy. I got the compiler to crash with some code but this.... not yet.

author: kevinbrant
author_rank: Newbie
timestamp: March 22, 2017, 11:28:25 pm
content: I can't set a top-level unit by right-clicking either, the option is grayed out. In the couple of months I've been using Lattice I've never had it select the wrong thing as the top level when everything else was working fine, but I'll keep that in mind.This does not just effect a single project, this is affecting my entire lattice no matter the project I open it's the same. It really feels like this is just a setting somewhere that I somehow turned off or on (although the not being able to set top level is very odd).I can simulate and synthesize, and both will compile and tell me my errors. Everything is mapped fine after synthesis, the netlist all looks like it used to, and the time analysis is the same as it should be. Simulation of my program works as before, selecting the correct top level entity itself, and I was just entering the testing in the real world phase of my project so my code running on my FPGA does not currently work however I'm pretty sure it I will be able to get it to work once I correct my minor circuit/programming error. If I change my program, the simulation changes with it, so it's not as if it's not saving or anything like that. Technically speaking, all the parts of the program that seemed to "break" weren't vital, especially since I'm at the bug testing phase right now and there's not much code left to write. However, not being able to check my code over without synthesizing or simulating is getting rather tedious, and not being able to see what entity is the top level is a bit of a concern (although when I simulate it opens all my files up in multi-sim and prompts me to select the top level entity, so again there are work arounds I can find).

author: kakemoms
author_rank: Newbie
timestamp: March 24, 2017, 05:37:07 pm
content: Did you right-click the implementation (by default called "Imp1" or something)? If you do that, select "properties" and then you can set the top level module. You have to edit the field and enter the top module name manually (not the file name) and it should bold out that file once it points to the module within it.

author: kevinbrant
author_rank: Newbie
timestamp: March 24, 2017, 08:51:02 pm
content: I found the implementation, set the top level entity name toController, my top level entity, and it neither gave me errors nor bolded anything. Upon synthesizing, it looked for the specified entity name, found it, and synthesized properly.I then set the top level entity name tokevinspacey, which is NOT the name of an entity anywhere. Again, after entering and clicking ok nothing was bolded and no errors were given. However, on synthesis it gave the errorUser specified top module kevinspacey not found in design.Again, it seems like it's doing exactly what it should when it NEEDS to, just not compiling when I save or change settings. Again, it really feels like a setting of some sort for people who get annoyed with their IDE lagging for a couple seconds whenever they save, and who only want it to check for errors when it needs to.I should note I have tried restarting lattice multiple times and my computer once to no success before anyone asks.