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

Error: Top-level design entity "bai3" is undefined

Altera_Forum
Honored Contributor II
3,032 Views

Can You help me correct this problem in this code below: 

 

module PWM( Ton,T,clk,Output_PWM); 

input clk; 

output Output_PWM; 

input [7:0] Ton; 

input [7:0] T; 

reg Output_PWM; 

integer a,i; 

initial  

begin  

a = 0; 

i = 0; 

end 

always@( posedge clk) 

begin 

if(i == 99999) 

begin 

i = 0; 

a= a +1; 

if(a <= T) 

begin 

if(a<= Ton) 

Output_PWM = 1; 

else 

Output_PWM = 0; 

end 

else 

a = 0;  

 

end 

end 

endmodule
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,399 Views

Probably your project name is "bai3" but your top level module is "PWM". Go to Assigments->Settings and go to Top level entity and select PWM. Click OK and compile again.

0 Kudos
Altera_Forum
Honored Contributor II
1,399 Views

add "bai3.v" to project and check if module name is bai3.v

0 Kudos
Altera_Forum
Honored Contributor II
1,399 Views

add "bai3.v" to project and check if module name is "bai3" and set top module "bai3"

0 Kudos
Reply