electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

need some explanations for "僕oop_iteration_limit"


Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> need some explanations for "僕oop_iteration_limit"
Author Message
Matrix_YL



Joined: 19 Aug 2005
Posts: 107
Helped: 2


Post27 Sep 2005 14:00   

loop_iteration_limit


Hi all


I learn XST manual and meet some questions about While LOOPS
I found this in that manual

1.To prevent endless loops, use the "僕oop_iteration_limit" switch.
2.While loops can have Disable statements. The Disable statement must be use inside a labeled block, since the syntax is "disable<blockname>."

who can give me some example for 2 and told how to set the "僕oop_iteration_limit" switch:|

thank you very much !
Back to top
Google
AdSense
Google Adsense




Post27 Sep 2005 14:00   

Ads




Back to top
nand_gates



Joined: 19 Jul 2004
Posts: 907
Helped: 120


Post28 Sep 2005 5:48   

set loop iteration limit


http://www.lavalogic.com/xlnx/xil_ans_printfriendly.jsp?getPagePath=18429&BV_SessionID=@@@@0542910990.1127879856@@@@&BV_EngineID=ccccaddfkjkfkhdcefeceihdffhdfjf.0
For 1 see the link above!

here goes example for 2..........
Code:
module test();
   integer i;
   initial i=0;
   // Print 0 to 100
   initial begin
      begin : my_block   // <-- this is the my_block we will disable
         while(1) begin // infinite while loop
            if (i>100)
              disable my_block;
            else
              $display("%d",i);
            i=i+1;
         end
      end
   end
endmodule // test


Hope this helps!
Back to top
Matrix_YL



Joined: 19 Aug 2005
Posts: 107
Helped: 2


Post28 Sep 2005 6:27   

limit iterations in loop vba


Thanks
Quote:

2.While loops can have Disable statements. The Disable statement must be use inside a labeled block, since the syntax is "disable<blockname>."


By the way ,The 2 always be used to testbench module ?
Back to top
nand_gates



Joined: 19 Jul 2004
Posts: 907
Helped: 120


Post29 Sep 2005 5:29   

loop_iteration_limit en vhdl


This is the code for count leading zero's in input byte!!

Code:
module test(din, cnt);
   input [7:0] din;
   output [3:0] cnt;
   reg  [3:0] cnt;
   always @(/-*AS*-/din) begin
      cnt = 0;
      begin : my_block   // <-- this is the my_block we will disable
         integer i;
         i=7;
         while(i >= 0) begin // infinite while loop
            if (din[i] == 1'b1)
              disable my_block;
            else
              cnt = cnt + 1;
            i=i-1;
         end
      end
   end
endmodule // test

You can use it in synthesizable code but not recomended!!!
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> PLD, SPLD, GAL, CPLD, FPGA Design -> need some explanations for "僕oop_iteration_limit"
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Ask for some more bbs of "RF Power Amplifier" (3)
how can measure "power"and "SWR" for ant (4)
What is different for "UGBW" and "GBW" ? (1)
can "if" statement replace "for loop" in (16)
What do "ECL", "CML", "LVDS", (6)
Need help "stk500.ebn" how can I convert to " (3)
Need design info for "S" shaped load cell (5)
Need rep.help for TV: "East-West-problem" (1)
Need C program for 8052 "AT keyboard controller" (4)
need help I looking for "USB to Parallel" IC (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS