Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

Adding Squareroot megafunction

Hello friends,

I am a beginner in Quartus. I am using a Square root megafunction. The code is:

sqroot<= mysqrt_alt_restoring_sqrt_cta sqr(.aclr(clear),.clken(clkenable),.clock(CLOCK_50),.rad(vz),.root_result(sqroot));

Its showing me the error that its expecting ";"

I am not able to figure out why I am getting this error and if my format of writing is wrong.

I am sorry taht this error may be really silly, but I am really not able to figure out why is it is arising.As teh line itself and the line after and before it end with ";"

Please help.

Thanks in advance.

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The text portion

    --- Quote Start ---

    sqroot<=

    --- Quote End ---

    is wrong. A module instantiation doesn't return nothing unlike a function or operator.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for the reply guys,

    Well I added <= to the code because, without that it was giving me an error that its expecting "<=" or ';"

    I am using Verilog.

    thanks