Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16612 Discussions

Help!!! Compilation Successful but zero logic element used!!!

Altera_Forum
Honored Contributor II
3,055 Views

Hi all, 

 

I am new in verilog and quartus.. I have a module that is successful compile but the logic elements is indicated to be zero used. The register and net inside my module is found to be undefined in vector waveform when i run simulation.... Any idea what's wrong with my code?? 

 

mixcolumn_en.v will be my top-level  

 

Regards 

Vinz
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
1,864 Views

I'm not a Verilog specialist, but I think that you should have at least have your last always block in your top level file to be triggered by a clock edge. I don't know how your code would be synthesized, but it probably won't do what you expect... If Quartus finds out that your outputs never change, it will just optimize the design by removing everything.

0 Kudos
Altera_Forum
Honored Contributor II
1,864 Views

I have tried clock edge in my top level. The problem still exist. I not familiar with hardware language as I use to do software programming. Hence I not sure whether i do it in the right way. But anyway thanks for your advice...

0 Kudos
Altera_Forum
Honored Contributor II
1,864 Views

 

--- Quote Start ---  

I not familiar with hardware language  

--- Quote End ---  

 

Yes, it's pretty obvious when seeing your code. I guess you'll need a tutorial or textbook. 

 

The below construct makes all datax variables undefined and can already explain, why you don't get any output from the design. N is simply ignored, so the code means to put the four signals in a logic chain. The meaningless construct will be discarded by a design compiler. 

always @(N) begin data1<=data2; data2<=data3; data3<=data4; data4<=data1; end
0 Kudos
Altera_Forum
Honored Contributor II
1,864 Views

If I understand correctly what you are trying to do, those statements should be in your last always block, triggered by a clock edge.

0 Kudos
Altera_Forum
Honored Contributor II
1,864 Views

Hello, 

I have met the same problem, trying to implement a CAN IP core, I built a project which contains only the core, the compilation is good but with 0 logic element used... I'm pretty sure about the verilog code (stable version downloaded from OpenCores and modelsim verified). 

So what kind of problem can lead to this problem, Can anyone help me ? 

Thanks a lot.
0 Kudos
Altera_Forum
Honored Contributor II
1,864 Views

Quartus optimises your component away, most probably because it determined that an empty FPGA would do exactly the same thing that what you described. That is usually the case if the core you inserted doesn't drive any output pins, doesn't depend on any input pin and/or is kept in a constant state (kept in reset, for example, or with no clock input).

0 Kudos
Reply