b = 2295 print("always@(posedge clk) begin") for a in range(0, 585226, b): result = a // b if a + b > 585225: upper_bound = 585225 else: upper_bound = a + b - 1 print(f" if (a >= {a} && a <= {upper_bound}) begin") print(f" out <= {result};") print(" end") print("end")
8
always@(posedge clk) begin if (a >= 0 && a <= 2294) begin out <= 0; end if (a >= 2295 && a <= 4589) begin out <= 1; end if (a >= 4590 && a <= 6884) begin out <= 2; end if (a >= 6885 && a <= 9179) begin out <= 3; end if (a >= 9180 && a <= 11474) begin out <= 4; end if (a >= 11475 && a <= 13769) begin out <= 5; end if (a >= 13770 && a <= 16064) begin out <= 6; end if (a >= 16065 && a <= 18359) begin out <= 7; end if (a >= 18360 && a <= 20654) begin out <= 8; end if (a >= 20655 && a <= 22949) begin out <= 9; end if (a >= 22950 && a <= 25244) begin out <= 10; end if (a >= 25245 && a <= 27539) begin out <= 11; end if (a >= 27540 && a <= 29834) begin out <= 12; end if (a >= 29835 && a <= 32129) begin out <= 13; end if (a >= 32130 && a <= 34424) begin out <= 14; end if (a >= 34425 && a <= 36719) begin out <= 15; end if (a >= 36720 && a <= 39014) begin out <= 16; end if (a >= 39015 && a <= 41309) begin out <= 17; end if (a >= 41310 && a <= 43604) begin out <= 18; end if (a >= 43605 && a <= 45899) begin out <= 19; end if (a >= 45900 && a <= 48194) begin out <= 20; end if (a >= 48195 && a <= 50489) begin out <= 21; end if (a >= 50490 && a <= 52784) begin out <= 22; end if (a >= 52785 && a <= 55079) begin out <= 23; end if (a >= 55080 && a <= 57374) begin out <= 24; end if (a >= 57375 && a <= 59669) begin out <= 25; end if (a >= 59670 && a <= 61964) begin out <= 26; end if (a >= 61965 && a <= 64259) begin out <= 27; end if (a >= 64260 && a <= 66554) begin out <= 28; end if (a >= 66555 && a <= 68849) begin out <= 29; end if (a >= 68850 && a <= 71144) begin out <= 30; end if (a >= 71145 && a <= 73439) begin out <= 31; end if (a >= 73440 && a <= 75734) begin out <= 32; end if (a >= 75735 && a <= 78029) begin out <= 33; end if (a >= 78030 && a <= 80324) begin out <= 34; end if (a >= 80325 && a <= 82619) begin out <= 35; end if (a >= 82620 && a <= 84914) begin out <= 36; end if (a >= 84915 && a <= 87209) begin out <= 37; end if (a >= 87210 && a <= 89504) begin out <= 38; end if (a >= 89505 && a <= 91799) begin out <= 39; end if (a >= 91800 && a <= 94094) begin out <= 40; end if (a >= 94095 && a <= 96389) begin out <= 41; end if (a >= 96390 && a <= 98684) begin out <= 42; end if (a >= 98685 && a <= 100979) begin out <= 43; end if (a >= 100980 && a <= 103274) begin out <= 44; end if (a >= 103275 && a <= 105569) begin out <= 45; end if (a >= 105570 && a <= 107864) begin out <= 46; end if (a >= 107865 && a <= 110159) begin out <= 47; end if (a >= 110160 && a <= 112454) begin out <= 48; end if (a >= 112455 && a <= 114749) begin out <= 49; end if (a >= 114750 && a <= 117044) begin out <= 50; end if (a >= 117045 && a <= 119339) begin out <= 51; end if (a >= 119340 && a <= 121634) begin out <= 52; end if (a >= 121635 && a <= 123929) begin out <= 53; end if (a >= 123930 && a <= 126224) begin out <= 54; end if (a >= 126225 && a <= 128519) begin out <= 55; end if (a >= 128520 && a <= 130814) begin out <= 56; end if (a >= 130815 && a <= 133109) begin out <= 57; end if (a >= 133110 && a <= 135404) begin out <= 58; end if (a >= 135405 && a <= 137699) begin out <= 59; end if (a >= 137700 && a <= 139994) begin out <= 60; end if (a >= 139995 && a <= 142289) begin out <= 61; end if (a >= 142290 && a <= 144584) begin out <= 62; end if (a >= 144585 && a <= 146879) begin out <= 63; end if (a >= 146880 && a <= 149174) begin out <= 64; end if (a >= 149175 && a <= 151469) begin out <= 65; end if (a >= 151470 && a <= 153764) begin out <= 66; end if (a >= 153765 && a <= 156059) begin out <= 67; end if (a >= 156060 && a <= 158354) begin out <= 68; end if (a >= 158355 && a <= 160649) begin out <= 69; end if (a >= 160650 && a <= 162944) begin out <= 70; end if (a >= 162945 && a <= 165239) begin out <= 71; end if (a >= 165240 && a <= 167534) begin out <= 72; end if (a >= 167535 && a <= 169829) begin out <= 73; end if (a >= 169830 && a <= 172124) begin out <= 74; end if (a >= 172125 && a <= 174419) begin out <= 75; end if (a >= 174420 && a <= 176714) begin out <= 76; end if (a >= 176715 && a <= 179009) begin out <= 77; end if (a >= 179010 && a <= 181304) begin out <= 78; end if (a >= 181305 && a <= 183599) begin out <= 79; end if (a >= 183600 && a <= 185894) begin out <= 80; end if (a >= 185895 && a <= 188189) begin out <= 81; end if (a >= 188190 && a <= 190484) begin out <= 82; end if (a >= 190485 && a <= 192779) begin out <= 83; end if (a >= 192780 && a <= 195074) begin out <= 84; end if (a >= 195075 && a <= 197369) begin out <= 85; end if (a >= 197370 && a <= 199664) begin out <= 86; end if (a >= 199665 && a <= 201959) begin out <= 87; end if (a >= 201960 && a <= 204254) begin out <= 88; end if (a >= 204255 && a <= 206549) begin out <= 89; end if (a >= 206550 && a <= 208844) begin out <= 90; end if (a >= 208845 && a <= 211139) begin out <= 91; end if (a >= 211140 && a <= 213434) begin out <= 92; end if (a >= 213435 && a <= 215729) begin out <= 93; end if (a >= 215730 && a <= 218024) begin out <= 94; end if (a >= 218025 && a <= 220319) begin out <= 95; end if (a >= 220320 && a <= 222614) begin out <= 96; end if (a >= 222615 && a <= 224909) begin out <= 97; end if (a >= 224910 && a <= 227204) begin out <= 98; end if (a >= 227205 && a <= 229499) begin out <= 99; end if (a >= 229500 && a <= 231794) begin out <= 100; end if (a >= 231795 && a <= 234089) begin out <= 101; end if (a >= 234090 && a <= 236384) begin out <= 102; end if (a >= 236385 && a <= 238679) begin out <= 103; end if (a >= 238680 && a <= 240974) begin out <= 104; end if (a >= 240975 && a <= 243269) begin out <= 105; end if (a >= 243270 && a <= 245564) begin out <= 106; end if (a >= 245565 && a <= 247859) begin out <= 107; end if (a >= 247860 && a <= 250154) begin out <= 108; end if (a >= 250155 && a <= 252449) begin out <= 109; end if (a >= 252450 && a <= 254744) begin out <= 110; end if (a >= 254745 && a <= 257039) begin out <= 111; end if (a >= 257040 && a <= 259334) begin out <= 112; end if (a >= 259335 && a <= 261629) begin out <= 113; end if (a >= 261630 && a <= 263924) begin out <= 114; end if (a >= 263925 && a <= 266219) begin out <= 115; end if (a >= 266220 && a <= 268514) begin out <= 116; end if (a >= 268515 && a <= 270809) begin out <= 117; end if (a >= 270810 && a <= 273104) begin out <= 118; end if (a >= 273105 && a <= 275399) begin out <= 119; end if (a >= 275400 && a <= 277694) begin out <= 120; end if (a >= 277695 && a <= 279989) begin out <= 121; end if (a >= 279990 && a <= 282284) begin out <= 122; end if (a >= 282285 && a <= 284579) begin out <= 123; end if (a >= 284580 && a <= 286874) begin out <= 124; end if (a >= 286875 && a <= 289169) begin out <= 125; end if (a >= 289170 && a <= 291464) begin out <= 126; end if (a >= 291465 && a <= 293759) begin out <= 127; end if (a >= 293760 && a <= 296054) begin out <= 128; end if (a >= 296055 && a <= 298349) begin out <= 129; end if (a >= 298350 && a <= 300644) begin out <= 130; end if (a >= 300645 && a <= 302939) begin out <= 131; end if (a >= 302940 && a <= 305234) begin out <= 132; end if (a >= 305235 && a <= 307529) begin out <= 133; end if (a >= 307530 && a <= 309824) begin out <= 134; end if (a >= 309825 && a <= 312119) begin out <= 135; end if (a >= 312120 && a <= 314414) begin out <= 136; end if (a >= 314415 && a <= 316709) begin out <= 137; end if (a >= 316710 && a <= 319004) begin out <= 138; end if (a >= 319005 && a <= 321299) begin out <= 139; end if (a >= 321300 && a <= 323594) begin out <= 140; end if (a >= 323595 && a <= 325889) begin out <= 141; end if (a >= 325890 && a <= 328184) begin out <= 142; end if (a >= 328185 && a <= 330479) begin out <= 143; end if (a >= 330480 && a <= 332774) begin out <= 144; end if (a >= 332775 && a <= 335069) begin out <= 145; end if (a >= 335070 && a <= 337364) begin out <= 146; end if (a >= 337365 && a <= 339659) begin out <= 147; end if (a >= 339660 && a <= 341954) begin out <= 148; end if (a >= 341955 && a <= 344249) begin out <= 149; end if (a >= 344250 && a <= 346544) begin out <= 150; end if (a >= 346545 && a <= 348839) begin out <= 151; end if (a >= 348840 && a <= 351134) begin out <= 152; end if (a >= 351135 && a <= 353429) begin out <= 153; end if (a >= 353430 && a <= 355724) begin out <= 154; end if (a >= 355725 && a <= 358019) begin out <= 155; end if (a >= 358020 && a <= 360314) begin out <= 156; end if (a >= 360315 && a <= 362609) begin out <= 157; end if (a >= 362610 && a <= 364904) begin out <= 158; end if (a >= 364905 && a <= 367199) begin out <= 159; end if (a >= 367200 && a <= 369494) begin out <= 160; end if (a >= 369495 && a <= 371789) begin out <= 161; end if (a >= 371790 && a <= 374084) begin out <= 162; end if (a >= 374085 && a <= 376379) begin out <= 163; end if (a >= 376380 && a <= 378674) begin out <= 164; end if (a >= 378675 && a <= 380969) begin out <= 165; end if (a >= 380970 && a <= 383264) begin out <= 166; end if (a >= 383265 && a <= 385559) begin out <= 167; end if (a >= 385560 && a <= 387854) begin out <= 168; end if (a >= 387855 && a <= 390149) begin out <= 169; end if (a >= 390150 && a <= 392444) begin out <= 170; end if (a >= 392445 && a <= 394739) begin out <= 171; end if (a >= 394740 && a <= 397034) begin out <= 172; end if (a >= 397035 && a <= 399329) begin out <= 173; end if (a >= 399330 && a <= 401624) begin out <= 174; end if (a >= 401625 && a <= 403919) begin out <= 175; end if (a >= 403920 && a <= 406214) begin out <= 176; end if (a >= 406215 && a <= 408509) begin out <= 177; end if (a >= 408510 && a <= 410804) begin out <= 178; end if (a >= 410805 && a <= 413099) begin out <= 179; end if (a >= 413100 && a <= 415394) begin out <= 180; end if (a >= 415395 && a <= 417689) begin out <= 181; end if (a >= 417690 && a <= 419984) begin out <= 182; end if (a >= 419985 && a <= 422279) begin out <= 183; end if (a >= 422280 && a <= 424574) begin out <= 184; end if (a >= 424575 && a <= 426869) begin out <= 185; end if (a >= 426870 && a <= 429164) begin out <= 186; end if (a >= 429165 && a <= 431459) begin out <= 187; end if (a >= 431460 && a <= 433754) begin out <= 188; end if (a >= 433755 && a <= 436049) begin out <= 189; end if (a >= 436050 && a <= 438344) begin out <= 190; end if (a >= 438345 && a <= 440639) begin out <= 191; end if (a >= 440640 && a <= 442934) begin out <= 192; end if (a >= 442935 && a <= 445229) begin out <= 193; end if (a >= 445230 && a <= 447524) begin out <= 194; end if (a >= 447525 && a <= 449819) begin out <= 195; end if (a >= 449820 && a <= 452114) begin out <= 196; end if (a >= 452115 && a <= 454409) begin out <= 197; end if (a >= 454410 && a <= 456704) begin out <= 198; end if (a >= 456705 && a <= 458999) begin out <= 199; end if (a >= 459000 && a <= 461294) begin out <= 200; end if (a >= 461295 && a <= 463589) begin out <= 201; end if (a >= 463590 && a <= 465884) begin out <= 202; end if (a >= 465885 && a <= 468179) begin out <= 203; end if (a >= 468180 && a <= 470474) begin out <= 204; end if (a >= 470475 && a <= 472769) begin out <= 205; end if (a >= 472770 && a <= 475064) begin out <= 206; end if (a >= 475065 && a <= 477359) begin out <= 207; end if (a >= 477360 && a <= 479654) begin out <= 208; end if (a >= 479655 && a <= 481949) begin out <= 209; end if (a >= 481950 && a <= 484244) begin out <= 210; end if (a >= 484245 && a <= 486539) begin out <= 211; end if (a >= 486540 && a <= 488834) begin out <= 212; end if (a >= 488835 && a <= 491129) begin out <= 213; end if (a >= 491130 && a <= 493424) begin out <= 214; end if (a >= 493425 && a <= 495719) begin out <= 215; end if (a >= 495720 && a <= 498014) begin out <= 216; end if (a >= 498015 && a <= 500309) begin out <= 217; end if (a >= 500310 && a <= 502604) begin out <= 218; end if (a >= 502605 && a <= 504899) begin out <= 219; end if (a >= 504900 && a <= 507194) begin out <= 220; end if (a >= 507195 && a <= 509489) begin out <= 221; end if (a >= 509490 && a <= 511784) begin out <= 222; end if (a >= 511785 && a <= 514079) begin out <= 223; end if (a >= 514080 && a <= 516374) begin out <= 224; end if (a >= 516375 && a <= 518669) begin out <= 225; end if (a >= 518670 && a <= 520964) begin out <= 226; end if (a >= 520965 && a <= 523259) begin out <= 227; end if (a >= 523260 && a <= 525554) begin out <= 228; end if (a >= 525555 && a <= 527849) begin out <= 229; end if (a >= 527850 && a <= 530144) begin out <= 230; end if (a >= 530145 && a <= 532439) begin out <= 231; end if (a >= 532440 && a <= 534734) begin out <= 232; end if (a >= 534735 && a <= 537029) begin out <= 233; end if (a >= 537030 && a <= 539324) begin out <= 234; end if (a >= 539325 && a <= 541619) begin out <= 235; end if (a >= 541620 && a <= 543914) begin out <= 236; end if (a >= 543915 && a <= 546209) begin out <= 237; end if (a >= 546210 && a <= 548504) begin out <= 238; end if (a >= 548505 && a <= 550799) begin out <= 239; end if (a >= 550800 && a <= 553094) begin out <= 240; end if (a >= 553095 && a <= 555389) begin out <= 241; end if (a >= 555390 && a <= 557684) begin out <= 242; end if (a >= 557685 && a <= 559979) begin out <= 243; end if (a >= 559980 && a <= 562274) begin out <= 244; end if (a >= 562275 && a <= 564569) begin out <= 245; end if (a >= 564570 && a <= 566864) begin out <= 246; end if (a >= 566865 && a <= 569159) begin out <= 247; end if (a >= 569160 && a <= 571454) begin out <= 248; end if (a >= 571455 && a <= 573749) begin out <= 249; end if (a >= 573750 && a <= 576044) begin out <= 250; end if (a >= 576045 && a <= 578339) begin out <= 251; end if (a >= 578340 && a <= 580634) begin out <= 252; end if (a >= 580635 && a <= 582929) begin out <= 253; end if (a >= 582930 && a <= 585224) begin out <= 254; end if (a >= 585225 && a <= 585225) begin out <= 255; end end