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.

error:HDLCompilers:217 in verilog code synthesis

Status
Not open for further replies.

jameela

Junior Member level 2
Junior Member level 2
Joined
Mar 1, 2010
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
2,467
error:HDLCompilers:217 Integer constant '10101010101010101010101010101010' is too large to represent in 32 bits

help me to remove it



module inter1(out1,ins1,inp,inclk,clr,outclk);
input inclk,clr,ins1,outclk;
output inp,out1;

//wire [31:0]s1;
reg [31:0]s2;
integer s1;

reg ins;

reg [1023:0]out,out1;
reg [1024:1] inp;


parameter a=1 ,b=3*a ,c=b-1;

initial

s1<={10101010101010101010101010101010};

always@(posedge outclk)
begin
if (ins1==0)
s2<=~s1;

else
s2<=s1;
end

always@(posedge inclk )
begin
if(clr) inp<=0;
else
begin
inp[1024:2]<=inp[1023:1];
inp[1]<=s2;
end
#32;

end
 

module inter1(out1,ins1,inp,inclk,clr,outclk);
input inclk,clr,ins1,outclk;
output inp,out1;

//wire [31:0]s1;
reg [31:0]s2;
integer s1;

reg ins;

reg [1023:0]out,out1;
reg [1024:1] inp;


parameter a=1 ,b=3 ,c=2;

initial

s1<={10101010101010101010101010101010}; //remove this line and replace with
s1<=32'b0101010101010101010101010101010;


always@(posedge outclk)
begin
if (ins1==0)
s2<=~s1;

else
s2<=s1;
end

always@(posedge inclk )
begin
if(clr) inp<=0;
else
begin
inp[1024:2]<=inp[1023:1];
inp[1]<=s2;
end
#32;

end
 

    jameela

    Points: 2
    Helpful Answer Positive Rating
it solved my above prob

i have few more questions about the code given below

1) on simulating this code s21 gives 32'b 10101010101010101010101010101010 when ins==0 and gives 32'b 01010101010101010101010101010101 when ins==1

however it should be vice versa as given in code ...why is it so??

2) s21 then goes to inp which is a serial to parallel shiftreg but only a few bits are shifted properly into it at every clock edge and after that the waveform flattens out whereas it should show shifting of all bits properly...how could it be corrected?

3) when i implemented this code it gave following errors:

Total Number of 4 input LUTs: 7 out of 9,312 1%
Number used as logic: 6
Number used as Shift registers: 1
Number of bonded IOBs: 2,084 out of 232 898% (OVERMAPPED) IOB Flip Flops: 987
Number of bonded Out/Bidir IOBs: 2,080 out of 176 1181% (OVERMAPPED) Number of bonded Input IBUFs: 4 out of 56 12%
Number of GCLKs: 2 out of 24 8%




module inter1(s21,out1,ins1,inp,inclk,clr,outclk);
input inclk,clr,ins1,outclk;
output inp,out1,s21;

reg [31:0]s2,s1,s21;


reg ins;

reg [1023:0]out,out1;
reg [1024:1] inp;


parameter a=1 ,b=3*a ,c=b-1;
initial
s1<=32'b 10101010101010101010101010101010;

always@(posedge outclk)
begin
if (ins1==1)

begin
s2<=s1;
s21<=s2;
end

else

begin
s2<=~s1;
s21<=s2;
end
end

always@(posedge inclk )
begin
if(clr) inp<=0;
else
begin
inp[1024:2]<=inp[1023:1];
inp[1]<=s21;
end
#32;

end

always@(posedge outclk or posedge clr)
begin
if(clr)out<=0;
else
begin
out[0]<=inp[576];
out[1]<=inp[96];
out[2]<=inp[640];
out[3]<=inp[160];
out[4]<=inp[704];
out[5]<=inp[224];
out[6]<=inp[768];
out[7]<=inp[288];
out[8]<=inp[832];
out[9]<=inp[352];
out[10]<=inp[896];
out[11]<=inp[416];
out[12]<=inp[960];
out[13]<=inp[480];
out[14]<=inp[1024];
out[15]<=inp[544];
out[16]<=inp[64];
out[17]<=inp[608];
out[18]<=inp[128];
out[19]<=inp[672];
out[20]<=inp[192];
out[21]<=inp[736];
out[22]<=inp[256];
out[23]<=inp[800];
out[24]<=inp[320];
out[25]<=inp[864];
out[26]<=inp[384];
out[27]<=inp[928];
out[28]<=inp[448];
out[29]<=inp[992];
out[30]<=inp[512];
out[31]<=inp[32];
out[32]<=inp[482];
out[33]<=inp[2];
out[34]<=inp[546];
out[35]<=inp[66];
out[36]<=inp[610];
out[37]<=inp[130];
out[38]<=inp[674];
out[39]<=inp[194];
out[40]<=inp[738];
out[41]<=inp[258];
out[42]<=inp[802];
out[43]<=inp[322];
out[44]<=inp[866];
out[45]<=inp[386];
out[46]<=inp[930];
out[47]<=inp[450];
out[48]<=inp[994];
out[49]<=inp[514];
out[50]<=inp[34];
out[51]<=inp[578];
out[52]<=inp[98];
out[53]<=inp[642];
out[54]<=inp[162];
out[55]<=inp[706];
out[56]<=inp[226];
out[57]<=inp[770];
out[58]<=inp[290];
out[59]<=inp[834];
out[60]<=inp[354];
out[61]<=inp[898];
out[62]<=inp[418];
out[63]<=inp[962];
out[64]<=inp[638];
out[65]<=inp[158];
out[66]<=inp[702];
out[67]<=inp[222];
out[68]<=inp[766];
out[69]<=inp[286];
out[70]<=inp[830];
out[71]<=inp[350];
out[72]<=inp[894];
out[73]<=inp[414];
out[74]<=inp[958];
out[75]<=inp[478];
out[76]<=inp[1022];
out[77]<=inp[542];
out[78]<=inp[62];
out[79]<=inp[606];
out[80]<=inp[126];
out[81]<=inp[670];
out[82]<=inp[190];
out[83]<=inp[734];
out[84]<=inp[254];
out[85]<=inp[798];
out[86]<=inp[318];
out[87]<=inp[862];
out[88]<=inp[382];
out[89]<=inp[926];
out[90]<=inp[446];
out[91]<=inp[990];
out[92]<=inp[510];
out[93]<=inp[30];
out[94]<=inp[574];
out[95]<=inp[94];
out[96]<=inp[420];
out[97]<=inp[964];
out[98]<=inp[484];
out[99]<=inp[4];
out[100]<=inp[548];
out[101]<=inp[68];
out[102]<=inp[612];
out[103]<=inp[132];
out[104]<=inp[676];
out[105]<=inp[196];
out[106]<=inp[740];
out[107]<=inp[260];
out[108]<=inp[804];
out[109]<=inp[324];
out[110]<=inp[868];
out[111]<=inp[388];
out[112]<=inp[932];
out[113]<=inp[452];
out[114]<=inp[996];
out[115]<=inp[516];
out[116]<=inp[36];
out[117]<=inp[580];
out[118]<=inp[100];
out[119]<=inp[644];
out[120]<=inp[164];
out[121]<=inp[708];
out[122]<=inp[228];
out[123]<=inp[772];
out[124]<=inp[292];
out[125]<=inp[836];
out[126]<=inp[356];
out[127]<=inp[900];
out[128]<=inp[700];
out[129]<=inp[220];
out[130]<=inp[764];
out[131]<=inp[284];
out[132]<=inp[828];
out[133]<=inp[348];
out[134]<=inp[892];
out[135]<=inp[412];
out[136]<=inp[956];
out[137]<=inp[476];
out[138]<=inp[1020];
out[139]<=inp[540];
out[140]<=inp[60];
out[141]<=inp[604];
out[142]<=inp[124];
out[143]<=inp[668];
out[144]<=inp[188];
out[145]<=inp[732];
out[146]<=inp[252];
out[147]<=inp[796];
out[148]<=inp[316];
out[149]<=inp[860];
out[150]<=inp[380];
out[151]<=inp[924];
out[152]<=inp[444];
out[153]<=inp[988];
out[154]<=inp[508];
out[155]<=inp[28];
out[156]<=inp[572];
out[157]<=inp[92];
out[158]<=inp[636];
out[159]<=inp[156];
out[160]<=inp[358];
out[161]<=inp[902];
out[162]<=inp[422];
out[163]<=inp[966];
out[164]<=inp[486];
out[165]<=inp[6];
out[166]<=inp[550];
out[167]<=inp[70];
out[168]<=inp[614];
out[169]<=inp[134];
out[170]<=inp[678];
out[171]<=inp[198];
out[172]<=inp[742];
out[173]<=inp[262];
out[174]<=inp[806];
out[175]<=inp[326];
out[176]<=inp[870];
out[177]<=inp[390];
out[178]<=inp[934];
out[179]<=inp[454];
out[180]<=inp[998];
out[181]<=inp[518];
out[182]<=inp[38];
out[183]<=inp[582];
out[184]<=inp[102];
out[185]<=inp[646];
out[186]<=inp[166];
out[187]<=inp[710];
out[188]<=inp[230];
out[189]<=inp[774];
out[190]<=inp[294];
out[191]<=inp[838];
out[192]<=inp[762];
out[193]<=inp[282];
out[194]<=inp[826];
out[195]<=inp[346];
out[196]<=inp[890];
out[197]<=inp[410];
out[198]<=inp[954];
out[199]<=inp[474];
out[200]<=inp[1018];
out[201]<=inp[538];
out[202]<=inp[58];
out[203]<=inp[602];
out[204]<=inp[122];
out[205]<=inp[666];
out[206]<=inp[186];
out[207]<=inp[730];
out[208]<=inp[250];
out[209]<=inp[794];
out[210]<=inp[314];
out[211]<=inp[858];
out[212]<=inp[378];
out[213]<=inp[922];
out[214]<=inp[442];
out[215]<=inp[986];
out[216]<=inp[506];
out[217]<=inp[26];
out[218]<=inp[570];
out[219]<=inp[90];
out[220]<=inp[634];
out[221]<=inp[154];
out[222]<=inp[698];
out[223]<=inp[218];
out[224]<=inp[296];
out[225]<=inp[840];
out[226]<=inp[360];
out[227]<=inp[904];
out[228]<=inp[424];
out[229]<=inp[968];
out[230]<=inp[488];
out[231]<=inp[8];
out[232]<=inp[552];
out[233]<=inp[72];
out[234]<=inp[616];
out[235]<=inp[136];
out[236]<=inp[680];
out[237]<=inp[200];
out[238]<=inp[744];
out[239]<=inp[264];
out[240]<=inp[808];
out[241]<=inp[328];
out[242]<=inp[872];
out[243]<=inp[392];
out[244]<=inp[936];
out[245]<=inp[456];
out[246]<=inp[1000];
out[247]<=inp[520];
out[248]<=inp[40];
out[249]<=inp[584];
out[250]<=inp[104];
out[251]<=inp[648];
out[252]<=inp[168];
out[253]<=inp[712];
out[254]<=inp[232];
out[255]<=inp[776];
out[256]<=inp[824];
out[257]<=inp[344];
out[258]<=inp[888];
out[259]<=inp[408];
out[260]<=inp[952];
out[261]<=inp[472];
out[262]<=inp[1016];
out[263]<=inp[536];
out[264]<=inp[56];
out[265]<=inp[600];
out[266]<=inp[120];
out[267]<=inp[664];
out[268]<=inp[184];
out[269]<=inp[728];
out[270]<=inp[248];
out[271]<=inp[792];
out[272]<=inp[312];
out[273]<=inp[856];
out[274]<=inp[376];
out[275]<=inp[920];
out[276]<=inp[440];
out[277]<=inp[984];
out[278]<=inp[504];
out[279]<=inp[24];
out[280]<=inp[568];
out[281]<=inp[88];
out[282]<=inp[632];
out[283]<=inp[152];
out[284]<=inp[696];
out[285]<=inp[216];
out[286]<=inp[760];
out[287]<=inp[280];
out[288]<=inp[233];
out[289]<=inp[778];
out[290]<=inp[298];
out[291]<=inp[842];
out[292]<=inp[362];
out[293]<=inp[906];
out[294]<=inp[426];
out[295]<=inp[970];
out[296]<=inp[490];
out[297]<=inp[10];
out[298]<=inp[554];
out[299]<=inp[74];
out[300]<=inp[618];
out[301]<=inp[138];
out[302]<=inp[682];
out[303]<=inp[202];
out[304]<=inp[746];
out[305]<=inp[266];
out[306]<=inp[810];
out[307]<=inp[330];
out[308]<=inp[874];
out[309]<=inp[394];
out[310]<=inp[938];
out[311]<=inp[458];
out[312]<=inp[1002];
out[313]<=inp[522];
out[314]<=inp[42];
out[315]<=inp[586];
out[316]<=inp[106];
out[317]<=inp[650];
out[318]<=inp[170];
out[319]<=inp[714];
out[320]<=inp[886];
out[321]<=inp[406];
out[322]<=inp[960];
out[323]<=inp[470];
out[324]<=inp[1014];
out[325]<=inp[534];
out[326]<=inp[54];
out[327]<=inp[598];
out[328]<=inp[118];
out[329]<=inp[662];
out[330]<=inp[182];
out[331]<=inp[726];
out[332]<=inp[246];
out[333]<=inp[790];
out[334]<=inp[310];
out[335]<=inp[854];
out[336]<=inp[374];
out[337]<=inp[918];
out[338]<=inp[438];
out[339]<=inp[982];
out[340]<=inp[502];
out[341]<=inp[22];
out[342]<=inp[566];
out[343]<=inp[86];
out[344]<=inp[630];
out[345]<=inp[150];
out[346]<=inp[694];
out[347]<=inp[214];
out[348]<=inp[758];
out[349]<=inp[278];
out[350]<=inp[822];
out[351]<=inp[342];
out[352]<=inp[172];
out[353]<=inp[716];
out[354]<=inp[236];
out[355]<=inp[780];
out[356]<=inp[300];
out[357]<=inp[844];
out[358]<=inp[364];
out[359]<=inp[908];
out[360]<=inp[428];
out[361]<=inp[972];
out[362]<=inp[492];
out[363]<=inp[12];
out[364]<=inp[556];
out[365]<=inp[76];
out[366]<=inp[620];
out[367]<=inp[140];
out[368]<=inp[684];
out[369]<=inp[204];
out[370]<=inp[748];
out[371]<=inp[268];
out[372]<=inp[812];
out[373]<=inp[332];
out[374]<=inp[876];
out[375]<=inp[396];
out[376]<=inp[940];
out[377]<=inp[460];
out[378]<=inp[1004];
out[379]<=inp[524];
out[380]<=inp[44];
out[381]<=inp[588];
out[382]<=inp[108];
out[383]<=inp[652];
out[384]<=inp[948];
out[385]<=inp[468];
out[386]<=inp[1012];
out[387]<=inp[532];
out[388]<=inp[52];
out[389]<=inp[596];
out[390]<=inp[116];
out[391]<=inp[660];
out[392]<=inp[180];
out[393]<=inp[724];
out[394]<=inp[244];
out[395]<=inp[788];
out[396]<=inp[308];
out[397]<=inp[852];
out[398]<=inp[372];
out[399]<=inp[916];
out[400]<=inp[436];
out[401]<=inp[980];
out[402]<=inp[500];
out[403]<=inp[20];
out[404]<=inp[564];
out[405]<=inp[84];
out[406]<=inp[628];
out[407]<=inp[148];
out[408]<=inp[692];
out[409]<=inp[212];
out[410]<=inp[756];
out[411]<=inp[276];
out[412]<=inp[820];
out[413]<=inp[340];
out[414]<=inp[884];
out[415]<=inp[404];
out[416]<=inp[110];
out[417]<=inp[654];
out[418]<=inp[174];
out[419]<=inp[718];
out[420]<=inp[238];
out[421]<=inp[782];
out[422]<=inp[302];
out[423]<=inp[846];
out[424]<=inp[366];
out[425]<=inp[910];
out[426]<=inp[430];
out[427]<=inp[974];
out[428]<=inp[494];
out[429]<=inp[14];
out[430]<=inp[558];
out[431]<=inp[78];
out[432]<=inp[622];
out[433]<=inp[142];
out[434]<=inp[686];
out[435]<=inp[206];
out[436]<=inp[750];
out[437]<=inp[270];
out[438]<=inp[814];
out[439]<=inp[334];
out[440]<=inp[878];
out[441]<=inp[398];
out[442]<=inp[942];
out[443]<=inp[462];
out[444]<=inp[1006];
out[445]<=inp[526];
out[446]<=inp[46];
out[447]<=inp[506];
out[448]<=inp[1010];
out[449]<=inp[530];
out[450]<=inp[50];
out[451]<=inp[594];
out[452]<=inp[114];
out[453]<=inp[658];
out[454]<=inp[178];
out[455]<=inp[722];
out[456]<=inp[242];
out[457]<=inp[786];
out[458]<=inp[306];
out[459]<=inp[850];
out[460]<=inp[370];
out[461]<=inp[914];
out[462]<=inp[434];
out[463]<=inp[978];
out[464]<=inp[498];
out[465]<=inp[18];
out[466]<=inp[562];
out[467]<=inp[82];
out[468]<=inp[626];
out[469]<=inp[146];
out[470]<=inp[690];
out[471]<=inp[210];
out[472]<=inp[754];
out[473]<=inp[274];
out[474]<=inp[818];
out[475]<=inp[338];
out[476]<=inp[882];
out[477]<=inp[402];
out[478]<=inp[946];
out[479]<=inp[466];
out[480]<=inp[48];
out[481]<=inp[592];
out[482]<=inp[112];
out[483]<=inp[656];
out[484]<=inp[176];
out[485]<=inp[720];
out[486]<=inp[240];
out[487]<=inp[784];
out[488]<=inp[304];
out[489]<=inp[848];
out[490]<=inp[368];
out[491]<=inp[912];
out[492]<=inp[432];
out[493]<=inp[976];
out[494]<=inp[496];
out[495]<=inp[16];
out[496]<=inp[560];
out[497]<=inp[80];
out[498]<=inp[624];
out[499]<=inp[144];
out[500]<=inp[688];
out[501]<=inp[208];
out[502]<=inp[752];
out[503]<=inp[272];
out[504]<=inp[816];
out[505]<=inp[336];
out[506]<=inp[880];
out[507]<=inp[400];
out[508]<=inp[944];
out[509]<=inp[464];
out[510]<=inp[1008];
out[511]<=inp[528];
out[512]<=inp[17];
out[513]<=inp[561];
out[514]<=inp[81];
out[515]<=inp[625];
out[516]<=inp[145];
out[517]<=inp[689];
out[518]<=inp[209];
out[519]<=inp[753];
out[520]<=inp[273];
out[521]<=inp[817];
out[522]<=inp[337];
out[523]<=inp[881];
out[524]<=inp[401];
out[525]<=inp[945];
out[526]<=inp[465];
out[527]<=inp[1009];
out[528]<=inp[529];
out[529]<=inp[49];
out[530]<=inp[593];
out[531]<=inp[113];
out[532]<=inp[657];
out[533]<=inp[177];
out[534]<=inp[721];
out[535]<=inp[241];
out[536]<=inp[785];
out[537]<=inp[305];
out[538]<=inp[849];
out[539]<=inp[369];
out[540]<=inp[913];
out[541]<=inp[433];
out[542]<=inp[977];
out[543]<=inp[497];
out[544]<=inp[79];
out[545]<=inp[623];
out[546]<=inp[143];
out[547]<=inp[687];
out[548]<=inp[207];
out[549]<=inp[751];
out[550]<=inp[271];
out[551]<=inp[815];
out[552]<=inp[335];
out[553]<=inp[879];
out[554]<=inp[399];
out[555]<=inp[843];
out[556]<=inp[463];
out[557]<=inp[1007];
out[558]<=inp[527];
out[559]<=inp[47];
out[560]<=inp[591];
out[561]<=inp[111];
out[562]<=inp[655];
out[563]<=inp[175];
out[564]<=inp[719];
out[565]<=inp[239];
out[566]<=inp[783];
out[567]<=inp[303];
out[568]<=inp[847];
out[569]<=inp[367];
out[570]<=inp[911];
out[571]<=inp[431];
out[572]<=inp[975];
out[573]<=inp[495];
out[574]<=inp[15];
out[575]<=inp[559];
out[576]<=inp[979];
out[577]<=inp[499];
out[578]<=inp[119];
out[579]<=inp[563];
out[580]<=inp[83];
out[581]<=inp[627];
out[582]<=inp[147];
out[583]<=inp[691];
out[584]<=inp[211];
out[585]<=inp[755];
out[586]<=inp[275];
out[587]<=inp[275];
out[588]<=inp[817];
out[589]<=inp[339];
out[590]<=inp[833];
out[591]<=inp[403];
out[592]<=inp[947];
out[593]<=inp[467];
out[594]<=inp[1011];
out[595]<=inp[531];
out[596]<=inp[51];
out[597]<=inp[595];
out[598]<=inp[115];
out[599]<=inp[659];
out[600]<=inp[179];
out[601]<=inp[723];
out[602]<=inp[243];
out[603]<=inp[787];
out[604]<=inp[307];
out[605]<=inp[851];
out[606]<=inp[371];
out[607]<=inp[915];
out[608]<=inp[435];
out[609]<=inp[141];
out[610]<=inp[685];
out[611]<=inp[205];
out[612]<=inp[749];
out[613]<=inp[269];
out[614]<=inp[813];
out[615]<=inp[333];
out[616]<=inp[877];
out[617]<=inp[397];
out[618]<=inp[941];
out[619]<=inp[461];
out[620]<=inp[1005];
out[621]<=inp[525];
out[622]<=inp[45];
out[623]<=inp[589];
out[624]<=inp[109];
out[625]<=inp[653];
out[626]<=inp[173];
out[627]<=inp[717];
out[628]<=inp[237];
out[629]<=inp[781];
out[630]<=inp[301];
out[631]<=inp[845];
out[632]<=inp[909];
out[633]<=inp[429];
out[634]<=inp[493];
out[635]<=inp[13];
out[636]<=inp[557];
out[637]<=inp[77];
out[638]<=inp[621];
out[639]<=inp[917];
out[640]<=inp[437];
out[641]<=inp[981];
out[642]<=inp[501];
out[643]<=inp[21];
out[644]<=inp[565];
out[645]<=inp[85];
out[646]<=inp[629];
out[647]<=inp[149];
out[648]<=inp[693];
out[649]<=inp[213];
out[650]<=inp[757];
out[651]<=inp[277];
out[652]<=inp[821];
out[653]<=inp[341];
out[654]<=inp[885];
out[655]<=inp[405];
out[656]<=inp[949];
out[657]<=inp[469];
out[658]<=inp[1013];
out[659]<=inp[533];
out[660]<=inp[53];
out[661]<=inp[597];
out[662]<=inp[117];
out[663]<=inp[661];
out[664]<=inp[181];
out[665]<=inp[725];
out[666]<=inp[245];
out[667]<=inp[789];
out[668]<=inp[309];
out[669]<=inp[853];
out[670]<=inp[373];
out[671]<=inp[203];
out[672]<=inp[747];
out[673]<=inp[267];
out[674]<=inp[811];
out[675]<=inp[331];
out[676]<=inp[875];
out[677]<=inp[395];
out[678]<=inp[939];
out[679]<=inp[459];
out[680]<=inp[1003];
out[681]<=inp[523];
out[682]<=inp[43];
out[683]<=inp[587];
out[684]<=inp[107];
out[685]<=inp[65];
out[686]<=inp[171];
out[687]<=inp[715];
out[688]<=inp[235];
out[689]<=inp[779];
out[690]<=inp[299];
out[691]<=inp[843];
out[692]<=inp[363];
out[693]<=inp[907];
out[694]<=inp[427];
out[695]<=inp[971];
out[696]<=inp[491];
out[697]<=inp[11];
out[698]<=inp[555];
out[699]<=inp[75];
out[700]<=inp[619];
out[701]<=inp[139];
out[702]<=inp[683];
out[703]<=inp[855];
out[704]<=inp[375];
out[705]<=inp[919];
out[706]<=inp[439];
out[707]<=inp[483];
out[708]<=inp[503];
out[709]<=inp[23];
out[710]<=inp[567];
out[711]<=inp[87];
out[712]<=inp[631];
out[713]<=inp[151];
out[714]<=inp[695];
out[715]<=inp[215];
out[716]<=inp[759];
out[717]<=inp[279];
out[718]<=inp[823];
out[719]<=inp[343];
out[720]<=inp[887];
out[721]<=inp[407];
out[722]<=inp[915];
out[723]<=inp[471];
out[724]<=inp[1015];
out[725]<=inp[535];
out[726]<=inp[55];
out[727]<=inp[599];
out[728]<=inp[199];
out[729]<=inp[663];
out[730]<=inp[183];
out[731]<=inp[727];
out[732]<=inp[247];
out[733]<=inp[791];
out[734]<=inp[311];
out[735]<=inp[265];
out[736]<=inp[809];
out[737]<=inp[329];
out[738]<=inp[873];
out[739]<=inp[393];
out[740]<=inp[937];
out[741]<=inp[475];
out[742]<=inp[1001];
out[743]<=inp[521];
out[744]<=inp[41];
out[745]<=inp[585];
out[746]<=inp[105];
out[747]<=inp[644];
out[748]<=inp[169];
out[749]<=inp[713];
out[750]<=inp[233];
out[751]<=inp[777];
out[752]<=inp[297];
out[753]<=inp[841];
out[754]<=inp[361];
out[755]<=inp[905];
out[756]<=inp[425];
out[757]<=inp[969];
out[758]<=inp[489];
out[759]<=inp[9];
out[760]<=inp[553];
out[761]<=inp[73];
out[762]<=inp[617];
out[763]<=inp[137];
out[764]<=inp[681];
out[765]<=inp[201];
out[766]<=inp[745];
out[767]<=inp[793];
out[768]<=inp[313];
out[769]<=inp[857];
out[770]<=inp[377];
out[771]<=inp[921];
out[772]<=inp[441];
out[773]<=inp[985];
out[774]<=inp[505];
out[775]<=inp[25];
out[776]<=inp[569];
out[777]<=inp[89];
out[778]<=inp[633];
out[779]<=inp[153];
out[780]<=inp[697];
out[781]<=inp[217];
out[782]<=inp[761];
out[783]<=inp[281];
out[784]<=inp[825];
out[785]<=inp[345];
out[786]<=inp[889];
out[787]<=inp[409];
out[788]<=inp[953];
out[789]<=inp[473];
out[790]<=inp[1017];
out[791]<=inp[537];
out[792]<=inp[57];
out[793]<=inp[601];
out[794]<=inp[121];
out[795]<=inp[665];
out[796]<=inp[185];
out[797]<=inp[729];
out[798]<=inp[249];
out[799]<=inp[327];
out[800]<=inp[871];
out[801]<=inp[391];
out[802]<=inp[935];
out[803]<=inp[455];
out[804]<=inp[999];
out[805]<=inp[519];
out[806]<=inp[39];
out[807]<=inp[583];
out[808]<=inp[103];
out[809]<=inp[647];
out[810]<=inp[167];
out[811]<=inp[711];
out[812]<=inp[231];
out[813]<=inp[775];
out[814]<=inp[295];
out[815]<=inp[839];
out[816]<=inp[359];
out[817]<=inp[903];
out[818]<=inp[423];
out[819]<=inp[967];
out[820]<=inp[487];
out[821]<=inp[7];
out[822]<=inp[551];
out[823]<=inp[71];
out[824]<=inp[615];
out[825]<=inp[135];
out[826]<=inp[679];
out[827]<=inp[199];
out[828]<=inp[743];
out[829]<=inp[263];
out[830]<=inp[807];
out[831]<=inp[731];
out[832]<=inp[251];
out[833]<=inp[796];
out[834]<=inp[5];
out[835]<=inp[315];
out[836]<=inp[859];
out[837]<=inp[379];
out[838]<=inp[923];
out[839]<=inp[443];
out[840]<=inp[987];
out[841]<=inp[507];
out[842]<=inp[27];
out[843]<=inp[571];
out[844]<=inp[91];
out[845]<=inp[635];
out[846]<=inp[165];
out[847]<=inp[699];
out[848]<=inp[219];
out[849]<=inp[763];
out[850]<=inp[283];
out[851]<=inp[827];
out[852]<=inp[347];
out[853]<=inp[891];
out[854]<=inp[411];
out[855]<=inp[955];
out[856]<=inp[475];
out[857]<=inp[1019];
out[858]<=inp[539];
out[859]<=inp[59];
out[860]<=inp[603];
out[861]<=inp[123];
out[862]<=inp[667];
out[863]<=inp[187];
out[864]<=inp[389];
out[865]<=inp[933];
out[866]<=inp[453];
out[867]<=inp[997];
out[868]<=inp[517];
out[869]<=inp[37];
out[870]<=inp[581];
out[871]<=inp[101];
out[872]<=inp[645];
out[873]<=inp[165];
out[874]<=inp[709];
out[875]<=inp[229];
out[876]<=inp[773];
out[877]<=inp[293];
out[878]<=inp[837];
out[879]<=inp[357];
out[880]<=inp[901];
out[881]<=inp[421];
out[882]<=inp[965];
out[883]<=inp[485];
out[884]<=inp[5];
out[885]<=inp[549];
out[886]<=inp[69];
out[887]<=inp[613];
out[888]<=inp[133];
out[889]<=inp[677];
out[890]<=inp[197];
out[891]<=inp[741];
out[892]<=inp[261];
out[893]<=inp[805];
out[894]<=inp[325];
out[895]<=inp[869];
out[896]<=inp[669];
out[897]<=inp[189];
out[898]<=inp[733];
out[899]<=inp[253];
out[900]<=inp[797];
out[901]<=inp[317];
out[902]<=inp[861];
out[903]<=inp[381];
out[904]<=inp[925];
out[905]<=inp[445];
out[906]<=inp[989];
out[907]<=inp[509];
out[908]<=inp[29];
out[909]<=inp[573];
out[910]<=inp[93];
out[911]<=inp[637];
out[912]<=inp[157];
out[913]<=inp[701];
out[914]<=inp[221];
out[915]<=inp[765];
out[916]<=inp[285];
out[917]<=inp[829];
out[918]<=inp[349];
out[919]<=inp[893];
out[920]<=inp[413];
out[921]<=inp[957];
out[922]<=inp[477];
out[923]<=inp[1021];
out[924]<=inp[541];
out[925]<=inp[61];
out[926]<=inp[605];
out[927]<=inp[125];
out[928]<=inp[451];
out[929]<=inp[995];
out[930]<=inp[515];
out[931]<=inp[35];
out[932]<=inp[579];
out[933]<=inp[99];
out[934]<=inp[643];
out[935]<=inp[163];
out[936]<=inp[707];
out[937]<=inp[227];
out[938]<=inp[771];
out[939]<=inp[191];
out[940]<=inp[835];
out[941]<=inp[355];
out[942]<=inp[899];
out[943]<=inp[419];
out[944]<=inp[963];
out[945]<=inp[483];
out[946]<=inp[3];
out[947]<=inp[547];
out[948]<=inp[67];
out[949]<=inp[611];
out[950]<=inp[131];
out[951]<=inp[675];
out[952]<=inp[195];
out[953]<=inp[739];
out[954]<=inp[259];
out[955]<=inp[803];
out[956]<=inp[323];
out[957]<=inp[867];
out[958]<=inp[387];
out[959]<=inp[931];
out[960]<=inp[607];
out[961]<=inp[127];
out[962]<=inp[671];
out[963]<=inp[191];
out[964]<=inp[735];
out[965]<=inp[255];
out[966]<=inp[799];
out[967]<=inp[319];
out[968]<=inp[863];
out[969]<=inp[383];
out[970]<=inp[927];
out[971]<=inp[447];
out[972]<=inp[991];
out[973]<=inp[511];
out[974]<=inp[31];
out[975]<=inp[575];
out[976]<=inp[95];
out[977]<=inp[639];
out[978]<=inp[159];
out[979]<=inp[703];
out[980]<=inp[223];
out[981]<=inp[767];
out[982]<=inp[287];
out[983]<=inp[831];
out[984]<=inp[351];
out[985]<=inp[895];
out[986]<=inp[415];
out[987]<=inp[959];
out[988]<=inp[479];
out[989]<=inp[1023];
out[990]<=inp[543];
out[991]<=inp[63];
out[992]<=inp[513];
out[993]<=inp[33];
out[994]<=inp[577];
out[995]<=inp[97];
out[996]<=inp[641];
out[997]<=inp[161];
out[998]<=inp[705];
out[999]<=inp[225];
out[1000]<=inp[769];
out[1001]<=inp[289];
out[1002]<=inp[833];
out[1003]<=inp[353];
out[1004]<=inp[397];
out[1005]<=inp[417];
out[1006]<=inp[961];
out[1007]<=inp[481];
out[1008]<=inp[1];
out[1009]<=inp[545];
out[1010]<=inp[65];
out[1011]<=inp[609];
out[1012]<=inp[129];
out[1013]<=inp[673];
out[1014]<=inp[193];
out[1015]<=inp[737];
out[1016]<=inp[257];
out[1017]<=inp[801];
out[1018]<=inp[321];
out[1019]<=inp[865];
out[1020]<=inp[385];
out[1021]<=inp[929];
out[1022]<=inp[449];
out[1023]<=inp[90];
end
end

always@ ( posedge outclk or posedge clr)
begin
#0.1;
if (clr)
out1<=0;
else
begin
{out1[1023:b]}<={out[1023-b:0]};
{out1[c:0]}<={out[1023:1023-c]};
end
end


endmodule
 

1) on simulating this code s21 gives 32'b 10101010101010101010101010101010 when ins==0 and gives 32'b 01010101010101010101010101010101 when ins==1

however it should be vice versa as given in code ...why is it so??

For this i could not go thru all your code, as am out of station, once i get back i ll try to help u

2) s21 then goes to inp which is a serial to parallel shiftreg but only a few bits are shifted properly into it at every clock edge and after that the waveform flattens out whereas it should show shifting of all bits properly...how could it be corrected?


For this i could not go thru all your code, as am out of station, once i get back i ll try to help u

3) when i implemented this code it gave following errors:

Total Number of 4 input LUTs: 7 out of 9,312 1%
Number used as logic: 6
Number used as Shift registers: 1
Number of bonded IOBs: 2,084 out of 232 898% (OVERMAPPED) IOB Flip Flops: 987
Number of bonded Out/Bidir IOBs: 2,080 out of 176 1181% (OVERMAPPED) Number of bonded Input IBUFs: 4 out of 56 12%
Number of GCLKs: 2 out of 24 8%

Here u trying to use 2048 input and output lines for tht FPGA, whre as the FPGA is having only 232 only... one main constraint in FPGA is u cannot have this big input or output ports for this u need to take the input in time multiplexing mode andsame with the output
 

    jameela

    Points: 2
    Helpful Answer Positive Rating
ok...waiting.............................................................
 

on simulating this code s21 gives 32'b 10101010101010101010101010101010 when ins==0 and gives 32'b 01010101010101010101010101010101 when ins==1

however it should be vice versa as given in code ...why is it so??


Here the size delaration on s21 is contradacting.., as below

output inp,out1,s21;

reg [31:0]s2,s1,s21;

please make this change..

when ins==1, wait for 2 clock cycles on out_clk for seeing the getting
32'b 10101010101010101010101010101010 and when ins == 0, also u need to wait for 2 clock cycles to get s21= 32'b 01010101010101010101010101010101


2) s21 then goes to inp which is a serial to parallel shiftreg but only a few bits are shifted properly into it at every clock edge and after that the waveform flattens out whereas it should show shifting of all bits properly...how could it be corrected?

Ur q is not clear
 

    jameela

    Points: 2
    Helpful Answer Positive Rating
1) delays are not synthesizable...then how to wait for 2 clock cycles in each case?

2) inp is actually a buffer having a size of [1023:0]

inp is to be filled by whatever bits come on s21 ,one by one on every clock edge

meaning thereby that 1 bit comes from s21 and fills inp[0] on 1st posedge of clock then 2nd bit appears on s21 which fills inp[0] and the previous bit which was on inp[0] now goes to inp[1] on 2nd posedge of clock and hence so on....

now when i simulate this code it shows proper shifting in the way described but only upto 1600ns after 1600ns there is no shifting shown and all inp[0].......inp[1023] lines in the waveform show 1....how to correct it?

i hope i have clarified myself...
 

1) delays are not synthesizable...then how to wait for 2 clock cycles in each case?

i am not asking to insert delays in the RTL, you need to wait for 2 clock edges to get correct data..
coz
s2<=s1; will take 1 clk pulse
and
s21<=s2; will take 1 clock pulse..

so u can see correct data on s21 after 2 clock pulses of s1.,

2 inp is actually a buffer having a size of [1023:0]

inp is to be filled by whatever bits come on s21 ,one by one on every clock edge

meaning thereby that 1 bit comes from s21 and fills inp[0] on 1st posedge of clock then 2nd bit appears on s21 which fills inp[0] and the previous bit which was on inp[0] now goes to inp[1] on 2nd posedge of clock and hence so on....

now when i simulate this code it shows proper shifting in the way described but only upto 1600ns after 1600ns there is no shifting shown and all inp[0].......inp[1023] lines in the waveform show 1....how to correct it?


you are always assigning LSB bit of s21 to inp, if you can assign LSB 1 st bit in 1 clock edge and 2nd bit in 2nd clock edge then u logic will work according to u
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top