- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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, SimLink Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess it's a confusion of instance and component name. I suggest to use the MegaWizard generated instantiation template for a syntactical correct module instantiation example. Also the Verilog templates in Quartus editor should help to learn the correct syntax.
Generally, I think it's better to consult a Verilog text book for first HDL programming steps instead of using a trial and error method.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for your reply. I will try it and go through some book and let you guys know. Thanks again.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page