Altera_Forum
Honored Contributor
16 years agoUse of megafunctions
Hello everyone,
I am a beginner in Quartus. I am trying to use the square root megafunction in Quartus. What I am doing is I have instantiated it : mysqrt_alt_restoring_sqrt_cta mysqrt(.aclr(clear),.clken(clkenable),.clock(CLOCK_50),.rad(vz),.root_result(sqroot)); However, it gives me an error : "mysqrt"; expecting "<=", or "=" So, I assumed that may be I need to assign the value returned by this function to some other so i assigned the return value to x x= mysqrt_alt_restoring_sqrt_cta mysqrt(.aclr(clear),.clken(clkenable),.clock(CLOCK_50),.rad(vz),.root_result(sqroot)); But then it still shows the error as: near text "mysqrt"; expecting ";" I am confused. One more thing is that I need to use the square root function for integers . Could you guys please help me out. Could you please tell me the way the megafunction needs to be defined?:( Thanks a lot in advance. regards, Sim