Quartus fitter ignores the RTL generated by the synthesis
Hello,
I am getting started with a simple Verilog project for a CPLD. The first thing I have to implement is a clock divider for the 50MHz clock on my eval board. My code works when I place it directly in the top level module. The design uses 30 of the available 240 LEs. However when I place the same code in a separate module and instantiate the clock divider module, the fitter reports using 0 LEs and the code does nothing. But in the RTL Viewer, I can see the clock divider module and the synthesis report says it used 30 LEs.
It doesn't matter if I put the clock divider module in a separate file or in the top level file.
Has anyone seen this type of thing before?
Thanks,
Jim
I found the issue that was causing the fitter to ignore all the RTL, but I could use some help understanding it.
In the top module, I defined a reg variable called reset_n that I wanted to use as a master power on reset. Then I had an initial block in the top module to assert and de-assert the reset_n.
initial
begin
reset_n <= `LO;
#10 reset_n <= `HI;
endThis worked fine when I put the clock_divider() code directly into the top module.
But when I tried to instantiate clock divider modules, I put reset_n into their port lists and the fitter gave me a message like "reset_n has no source, setting to GND". With reset_n always asserted, the clock_divider produced no clock output so it was apparently optimized out.
Any ideas why this happened? Can I not define an internal power on reset? Perhaps I don't need to? I had the "POWER UP DON'T CARE" setting OFF. I had read this causes all registers to initialize to 0