Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HOW TO CORRECT THIS ERROR

Status
Not open for further replies.

simu

Junior Member level 3
Junior Member level 3
Joined
Aug 27, 2007
Messages
25
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,469
hi,
i have written codes for a modular division algorithm and am getting the following error. Since am a beginner in verilog, am unable to correct my error. Also i have to correct the code as soon as possible.
can any one help me?

Error
Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more.

Also i have attached my algorithm and its code with this...
 

Hello,

from error report I see, that this is basically the same problem that we discussed a week ago: Using an iterative loop without an unconditional termination. For this reason, the code can't be either simulated or synthesized.

Before looking into the code, may I first repeat my recent question: Can we have a brief description of the algorithm or a literature reference?

Regards,
Frank

P.S.: Can you abandon one of the redundant threads?
 

    simu

    Points: 2
    Helpful Answer Positive Rating
Wow, all that code in an 'initial' statement?

Try putting $display() statements into the 'while' loop so you can watch what's happening and identify bugs. Something like this:
$display(" r=", r, " a=", a, " b=", b, " s=", s, " l=", l, " p=", p);

I see various language translation problems such as:
"if (l >= 0)" will always be true because 'l' is unsigned.
"p = -p" will probably do bad things because p is unsigned.
 

    simu

    Points: 2
    Helpful Answer Positive Rating
The signed arithmetics problem was already mentioned, basically Verilog assumes unsigned type for reg and nets unless keyword signed is explicitely given. Furthermore I can't see the equivalence of shown algorithm and Verilog code.
E.g.: boolean expresion a ≡ 0 (mod 2) is different from (a << 2 == 0 << 2).

I also can't see easily, that the iteration used in the algorithm is finite, although I assume this is the case, cause the problem is known to be solvable. A different question is, if it's also suitable for a full parallel implementation, but could be possible at least for a small wordlength.

Similar implementations of modular division, I found described in literature (I didn't see HDL code yet, otherwise I would show it here) are generally operating serial.
as an example: **broken link removed**

Regards,
Frank
 

    simu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top