cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
479 Views
Registered: ‎07-10-2019

Change in data Path Options (rounding mode) of FIR compiler on conversion of simulink model to its equivalent vivado HDL netlist

Hi,

I am using Matlab R2015b (system generator 2015.4) for making xilinx simulink model using xilinx blockset and Vivado 2015.4 to run the converted netlist from simulink model on Artix-7 Evaluation board.

I am using FIR compilers in stages for digital upconvertion purpose. In simulink model I am keeping the "output Rounding mode" as "symmetic_Rounding_to_Infinity" for all 3 FIR's filters I am using in concatenation. But while converting this model to vivado netlist code all FIRs (except 1st) is changing its "output Rounding mode" as "Full Precision" and in drop button "symmetic_Rounding_to_Infinity" is not available and thus I am getting much higher output bits from each stage than desired.

Attached Snapshot of simulink model (with 25 bit, round to infinity) and its vivado generated code (with 38 bit, full precision).simulink_model.PNGfir_generated_in_vivado.PNG

Thanks 

Vikas

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
389 Views
Registered: ‎08-16-2018

Can you please share the complete design with us.

/ 7\7     Meher Krishna Patel, PhD
\ \        Senior Product Application Engineer, Xilinx
/ /        
\_\/\7   It is not so much that you are within the cosmos as that the cosmos is within you...
0 Kudos
Highlighted
328 Views
Registered: ‎07-10-2019

Hi,

Thanks for the reply.

I tried to upload the project but site is not allowing to do it, so I have attached the snapshots of all the settings of sample project where 3 FIRs are concatenated.

I am following following steps to make Xilinx simulink model which is converted to HDL netlist:

Simulink Xilinx Block sets settings

fig_1.png

  • Fig_1

Token Settings

fig_2.png

  • Fig_2

Clocking:

FPGA clock period (ns):  5

Simulink system period (sec) : 1/204800000

Perform Timing analysis : None

 

General: Defaul

  • Sine Wave5
  • fig_3.png
  • Fig_3

Data types: single

  • Gateway In4
  • fig_4.png
  • Fig_4
  • fig_5.png
  • Fig_5

 

  • FIR Compiler 7.2.6
  • fig_6.png
  • Fig_6

 

Coefficient vector:

[0.00080308525930395389 -0.00031127018122752262 -0.00028292512394925917 -0.00027375685208273353 -0.00027924439373581983 -0.00029643339113612688 -0.00032303385876288933 -0.00035769780518738999 -0.00039927566826488287 -0.0004472305793404645 -0.00050099099803765207 -0.00056044027075737154 -0.00062529029164427516 -0.00069563345070756358 -0.00077131651483628013 -0.00085253778083000764 -0.00093920298373930853 -0.0010315606537211282 -0.0011295240241248074 -0.0012333665184594035 -0.0013429911566416417 -0.0014586847082578437 -0.0015803176989733303 -0.0017081854072195067 -0.0018421075495531581 -0.001982386592423118 -0.0021287814936135807 -0.0022816198774523273 -0.0024405687970171343 -0.002606000210913036 -0.0027774417095402996 -0.002955370572886259 -0.0031390731374660846 -0.0033292991622129371 -0.0035249845731017411 -0.0037264140229732404 -0.0039350807404837417 -0.004146198267983325 -0.0043650297384227538 -0.0045887874226991678 -0.0048169148896727984 -0.0050489153951903979 -0.0052857049034557299 -0.005526679058290713 -0.0057716183847187283 -0.0060195264777984404 -0.0062702339964800071 -0.0065231441565841985 -0.006778258461359577 -0.0070350030961197092 -0.0072931772171348852 -0.00755203239260923 -0.0078112026243269336 -0.0080698911951967919 -0.0083277136387870359 -0.0085838991696283555 -0.0088380676119937645 -0.0090894519322096568 -0.0093376535296717175 -0.0095818670756727346 -0.009821656490829939 -0.010056170524289077 -0.01028495068691479 -0.010507101937155662 -0.010722183322870164 -0.010929249805750999 -0.011127912034359642 -0.011317130117283261 -0.011496657433902224 -0.011665271815929825 -0.011822878463479798 -0.011968470156655101 -0.012101088119875241 -0.012221127522072633 -0.012326745392289956 -0.012417865241355094 -0.012494027813912975 -0.012554622413489079 -0.012598708469621432 -0.012625974458596379 -0.012635984641451922 -0.012628359438209795 -0.012602440211331643 -0.012557812767630881 -0.012494057548751557 -0.012410983309787245 -0.012308263598911679 -0.012185666825782503 -0.012042852483167846 -0.011879664122158524 -0.011695922351096651 -0.011491637776643835 -0.011266755503975776 -0.011021357199400929 -0.010755433822799832 -0.010469143965654201 -0.010162580123177592 -0.00983603669942445 -0.0094897402211704032 -0.0091241374284497141 -0.0087395495797471176 -0.0083365606091485803 -0.0079155417922435866 -0.0074772498898488336 -0.0070220388995004719 -0.0065509252080511397 -0.0060642917015569604 -0.0055631631597667479 -0.0050484934398038056 -0.0045207881687949663 -0.0039814671974416158 -0.0034313728244127497 -0.0028714865317015317 -0.0023029389812656131 -0.0017270708175365303 -0.0011449330149276044 -0.00055774025810256952 3.3235671470660144e-05 0.00062655170084481083 0.0012209188807603035 0.0018149689909520343 0.0024073607623964618 0.0029965838780752307 0.0035811877093297547 0.0041596630099198818 0.0047306047383715447 0.0052925099565523277 0.0058439163541446877 0.0063832618658587375 0.0069090742015272899 0.0074198310507628887 0.0079141255609234389 0.0083904763538827417 0.0088474877263289026 0.0092836878347629642 0.0096977323255551893 0.010088205672404116 0.010453882077326499 0.010793409271673434 0.011105718802327294 0.011389443470388675 0.011643726272937147 0.011867236460826307 0.01205916596185581 0.012218593137148733 0.012344514115047455 0.012436336508245152 0.012493359371750454 0.012514879612026113 0.012500418655159188 0.012449610267772072 0.012362052954415446 0.012237457448007612 0.012075726417758554 0.011876858840553863 0.011640887663591741 0.01136794150148638 0.011058304656262504 0.010712382800138576 0.010330664823509302 0.0099137115907471478 0.0094622012937248239 0.0089769435799464427 0.0084588783831334655 0.0079090284980858003 0.0073285095718139386 0.0067185363387127304 0.0060804460487078821 0.005415686352328853 0.0047258154604104836 0.0040124578511619817 0.0032773240725450961 0.0025222223332343604 0.0017490385989584805 0.00095979917128158874 0.00015650457209003186 -0.00065858891674401576 -0.0014834549058342405 -0.0023156594043873113 -0.0031530006853107656 -0.0039930947967499845 -0.0048334256297953813 -0.0056716070431320868 -0.0065051585789491894 -0.0073314893373945715 -0.0081480909139615143 -0.0089524605138125938 -0.0097420050643367822 -0.010514133469224314 -0.011266328045823545 -0.011996074881256273 -0.012700837613221938 -0.013378127311771952 -0.01402553672051246 -0.014640701173705936 -0.015221279145922331 -0.015764981146377928 -0.016269607635595682 -0.016733054224217211 -0.017153303570919102 -0.017528407440449489 -0.017856519810580111 -0.018135915137567765 -0.018364997604240242 -0.018542275509107264 -0.018666392243426828 -0.018736092141646093 -0.018750288981823914 -0.018708040119981516 -0.01860856509129773 -0.01845124134654785 -0.018235542317051316 -0.017961235933689788 -0.017628056339445846 -0.017236171201426537 -0.01678570176970675 -0.016277043138849444 -0.015710783399386728 -0.015087629366138174 -0.014408456487677721 -0.013674440186102803 -0.012886833029780937 -0.012047081143024168 -0.01115682724379337 -0.010217928175423791 -0.0092323290538909447 -0.008202197138708265 -0.0071298740168735837 -0.0060178874150976572 -0.0048688597921725026 -0.0036856146369329515 -0.0024711106083991226 -0.0012284766629341998 3.9072435375956459e-05 0.0013281547740605735 0.0026352908969232897 0.0039568348084841097 0.0052890827445560614 0.0066282149230199794 0.0079703670771332832 0.009311533542700685 0.010647698326788805 0.011974722148393161 0.013288498035701528 0.014584820392848964 0.015859519995120835 0.017108354143653592 0.018327106156178063 0.019511621763217329 0.020657671347479048 0.021761196030823167 0.022818066484807848 0.023824249929464001 0.024775839296843488 0.025668967323416954 0.026499863862748857 0.027264937358496923 0.027960664198751539 0.028583645934888314 0.029130675564398304 0.029598728480560971 0.029984904099352269 0.030286500579316328 0.030501033835721048 0.030626221064616176 0.030659966949787315 0.030600430460396736 0.030446018631912441 0.030195379921684879 0.029847396433687806 0.029401228128490005 0.028856297537600408 0.028212317771694605 0.027469264564066596 0.026627404447483842 0.025687287496659446 0.024649797407009063 0.023516066826727598 0.022287567731744021 0.02096602025473282 0.019553504586620862 0.018052356435456083 0.016465267423552976 0.014795191146625109 0.01304535148598493 0.011219337572811478 0.0093209405172149252 0.0073543091872962357 0.0053238464414366903 0.0032341932713318387 0.0010902844980916573 -0.0011026615493551757 -0.0033392446293918805 -0.0056137847217314187 -0.0079203789437783043 -0.010252926939758896 -0.012605151370772847 -0.014970524830499014 -0.017342369157633222 -0.019713858870204024 -0.022078035655653284 -0.024427767972214486 -0.026755842449330183 -0.029054938585876613 -0.031317659250630105 -0.033536517851711765 -0.035704017431664514 -0.037812610584952451 -0.039854759804849114 -0.041822910686132968 -0.043709552515991901 -0.045507201403183498 -0.04720848697328537 -0.048806062213146879 -0.050292742226951168 -0.051661409575833921 -0.052905157763994536 -0.054017169023294044 -0.054990876622723027 -0.055819846510997424 -0.056497889624442986 -0.05701907360991014 -0.057377696235187584 -0.057568327840837645 -0.057585847879468306 -0.057425380977811837 -0.057082427366672392 -0.056552816574859367 -0.055832702984303782 -0.054918601195072227 -0.053807436084254145 -0.052496481043078559 -0.050983412175076209 -0.049266330885429407 -0.047343763220328822 -0.045214620547340316 -0.042878273550665813 -0.040334548958371894 -0.037583716863154218 -0.034626467236339969 -0.031463969548068182 -0.028097843323338922 -0.024530166611488026 -0.020763472353563163 -0.016800768193842529 -0.012645496629724766 -0.0083015701115350185 -0.0037733376598622051 0.00093441591497127091 0.0058164410014435175 0.010867078066311868 0.016080233888670126 0.021449426704104112 0.026967739144955861 0.032627903161042852 0.038422239333244394 0.044342716354738826 0.05038097419123503 0.056528294695387421 0.062775642558700578 0.069113706125043237 0.075532860302666385 0.082023250807107401 0.088574780499978925 0.095177096851341791 0.10181965183300357 0.10849174670953782 0.11518250750349074 0.12188091383709079 0.1285758556286338 0.13525613190131155 0.1419104516690162 0.14852749422319772 0.15509594695543366 0.16160448717722262 0.16804180521823284 0.17439666923189256 0.1806579366518162 0.18681455356537141 0.19285559755330731 0.1987703082173487 0.20454808620934231 0.21017855201310909 0.21565155246520912 0.22095716262924792 0.22608575162389224 0.23102795570239515 0.2357747313738571 0.24031735780313934 0.24464749527660062 0.24875713749613573 0.25263870051439163 0.25628498435148389 0.25968921457933503 0.26284505129899483 0.26574663398013054 0.2683885215796375 0.27076579984451427 0.27287400058715455 0.2747091780017813 0.27626789285257264 0.27754723632283107 0.27854477167608366 0.27925863441828214 0.27968748860855841 0.2798305368800259 0.27968748860855841 0.27925863441828214 0.27854477167608366 0.27754723632283107 0.27626789285257264 0.2747091780017813 0.27287400058715455 0.27076579984451427 0.2683885215796375 0.26574663398013054 0.26284505129899483 0.25968921457933503 0.25628498435148389 0.25263870051439163 0.24875713749613573 0.24464749527660062 0.24031735780313934 0.2357747313738571 0.23102795570239515 0.22608575162389224 0.22095716262924792 0.21565155246520912 0.21017855201310909 0.20454808620934231 0.1987703082173487 0.19285559755330731 0.18681455356537141 0.1806579366518162 0.17439666923189256 0.16804180521823284 0.16160448717722262 0.15509594695543366 0.14852749422319772 0.1419104516690162 0.13525613190131155 0.1285758556286338 0.12188091383709079 0.11518250750349074 0.10849174670953782 0.10181965183300357 0.095177096851341791 0.088574780499978925 0.082023250807107401 0.075532860302666385 0.069113706125043237 0.062775642558700578 0.056528294695387421 0.05038097419123503 0.044342716354738826 0.038422239333244394 0.032627903161042852 0.026967739144955861 0.021449426704104112 0.016080233888670126 0.010867078066311868 0.0058164410014435175 0.00093441591497127091 -0.0037733376598622051 -0.0083015701115350185 -0.012645496629724766 -0.016800768193842529 -0.020763472353563163 -0.024530166611488026 -0.028097843323338922 -0.031463969548068182 -0.034626467236339969 -0.037583716863154218 -0.040334548958371894 -0.042878273550665813 -0.045214620547340316 -0.047343763220328822 -0.049266330885429407 -0.050983412175076209 -0.052496481043078559 -0.053807436084254145 -0.054918601195072227 -0.055832702984303782 -0.056552816574859367 -0.057082427366672392 -0.057425380977811837 -0.057585847879468306 -0.057568327840837645 -0.057377696235187584 -0.05701907360991014 -0.056497889624442986 -0.055819846510997424 -0.054990876622723027 -0.054017169023294044 -0.052905157763994536 -0.051661409575833921 -0.050292742226951168 -0.048806062213146879 -0.04720848697328537 -0.045507201403183498 -0.043709552515991901 -0.041822910686132968 -0.039854759804849114 -0.037812610584952451 -0.035704017431664514 -0.033536517851711765 -0.031317659250630105 -0.029054938585876613 -0.026755842449330183 -0.024427767972214486 -0.022078035655653284 -0.019713858870204024 -0.017342369157633222 -0.014970524830499014 -0.012605151370772847 -0.010252926939758896 -0.0079203789437783043 -0.0056137847217314187 -0.0033392446293918805 -0.0011026615493551757 0.0010902844980916573 0.0032341932713318387 0.0053238464414366903 0.0073543091872962357 0.0093209405172149252 0.011219337572811478 0.01304535148598493 0.014795191146625109 0.016465267423552976 0.018052356435456083 0.019553504586620862 0.02096602025473282 0.022287567731744021 0.023516066826727598 0.024649797407009063 0.025687287496659446 0.026627404447483842 0.027469264564066596 0.028212317771694605 0.028856297537600408 0.029401228128490005 0.029847396433687806 0.030195379921684879 0.030446018631912441 0.030600430460396736 0.030659966949787315 0.030626221064616176 0.030501033835721048 0.030286500579316328 0.029984904099352269 0.029598728480560971 0.029130675564398304 0.028583645934888314 0.027960664198751539 0.027264937358496923 0.026499863862748857 0.025668967323416954 0.024775839296843488 0.023824249929464001 0.022818066484807848 0.021761196030823167 0.020657671347479048 0.019511621763217329 0.018327106156178063 0.017108354143653592 0.015859519995120835 0.014584820392848964 0.013288498035701528 0.011974722148393161 0.010647698326788805 0.009311533542700685 0.0079703670771332832 0.0066282149230199794 0.0052890827445560614 0.0039568348084841097 0.0026352908969232897 0.0013281547740605735 3.9072435375956459e-05 -0.0012284766629341998 -0.0024711106083991226 -0.0036856146369329515 -0.0048688597921725026 -0.0060178874150976572 -0.0071298740168735837 -0.008202197138708265 -0.0092323290538909447 -0.010217928175423791 -0.01115682724379337 -0.012047081143024168 -0.012886833029780937 -0.013674440186102803 -0.014408456487677721 -0.015087629366138174 -0.015710783399386728 -0.016277043138849444 -0.01678570176970675 -0.017236171201426537 -0.017628056339445846 -0.017961235933689788 -0.018235542317051316 -0.01845124134654785 -0.01860856509129773 -0.018708040119981516 -0.018750288981823914 -0.018736092141646093 -0.018666392243426828 -0.018542275509107264 -0.018364997604240242 -0.018135915137567765 -0.017856519810580111 -0.017528407440449489 -0.017153303570919102 -0.016733054224217211 -0.016269607635595682 -0.015764981146377928 -0.015221279145922331 -0.014640701173705936 -0.01402553672051246 -0.013378127311771952 -0.012700837613221938 -0.011996074881256273 -0.011266328045823545 -0.010514133469224314 -0.0097420050643367822 -0.0089524605138125938 -0.0081480909139615143 -0.0073314893373945715 -0.0065051585789491894 -0.0056716070431320868 -0.0048334256297953813 -0.0039930947967499845 -0.0031530006853107656 -0.0023156594043873113 -0.0014834549058342405 -0.00065858891674401576 0.00015650457209003186 0.00095979917128158874 0.0017490385989584805 0.0025222223332343604 0.0032773240725450961 0.0040124578511619817 0.0047258154604104836 0.005415686352328853 0.0060804460487078821 0.0067185363387127304 0.0073285095718139386 0.0079090284980858003 0.0084588783831334655 0.0089769435799464427 0.0094622012937248239 0.0099137115907471478 0.010330664823509302 0.010712382800138576 0.011058304656262504 0.01136794150148638 0.011640887663591741 0.011876858840553863 0.012075726417758554 0.012237457448007612 0.012362052954415446 0.012449610267772072 0.012500418655159188 0.012514879612026113 0.012493359371750454 0.012436336508245152 0.012344514115047455 0.012218593137148733 0.01205916596185581 0.011867236460826307 0.011643726272937147 0.011389443470388675 0.011105718802327294 0.010793409271673434 0.010453882077326499 0.010088205672404116 0.0096977323255551893 0.0092836878347629642 0.0088474877263289026 0.0083904763538827417 0.0079141255609234389 0.0074198310507628887 0.0069090742015272899 0.0063832618658587375 0.0058439163541446877 0.0052925099565523277 0.0047306047383715447 0.0041596630099198818 0.0035811877093297547 0.0029965838780752307 0.0024073607623964618 0.0018149689909520343 0.0012209188807603035 0.00062655170084481083 3.3235671470660144e-05 -0.00055774025810256952 -0.0011449330149276044 -0.0017270708175365303 -0.0023029389812656131 -0.0028714865317015317 -0.0034313728244127497 -0.0039814671974416158 -0.0045207881687949663 -0.0050484934398038056 -0.0055631631597667479 -0.0060642917015569604 -0.0065509252080511397 -0.0070220388995004719 -0.0074772498898488336 -0.0079155417922435866 -0.0083365606091485803 -0.0087395495797471176 -0.0091241374284497141 -0.0094897402211704032 -0.00983603669942445 -0.010162580123177592 -0.010469143965654201 -0.010755433822799832 -0.011021357199400929 -0.011266755503975776 -0.011491637776643835 -0.011695922351096651 -0.011879664122158524 -0.012042852483167846 -0.012185666825782503 -0.012308263598911679 -0.012410983309787245 -0.012494057548751557 -0.012557812767630881 -0.012602440211331643 -0.012628359438209795 -0.012635984641451922 -0.012625974458596379 -0.012598708469621432 -0.012554622413489079 -0.012494027813912975 -0.012417865241355094 -0.012326745392289956 -0.012221127522072633 -0.012101088119875241 -0.011968470156655101 -0.011822878463479798 -0.011665271815929825 -0.011496657433902224 -0.011317130117283261 -0.011127912034359642 -0.010929249805750999 -0.010722183322870164 -0.010507101937155662 -0.01028495068691479 -0.010056170524289077 -0.009821656490829939 -0.0095818670756727346 -0.0093376535296717175 -0.0090894519322096568 -0.0088380676119937645 -0.0085838991696283555 -0.0083277136387870359 -0.0080698911951967919 -0.0078112026243269336 -0.00755203239260923 -0.0072931772171348852 -0.0070350030961197092 -0.006778258461359577 -0.0065231441565841985 -0.0062702339964800071 -0.0060195264777984404 -0.0057716183847187283 -0.005526679058290713 -0.0052857049034557299 -0.0050489153951903979 -0.0048169148896727984 -0.0045887874226991678 -0.0043650297384227538 -0.004146198267983325 -0.0039350807404837417 -0.0037264140229732404 -0.0035249845731017411 -0.0033292991622129371 -0.0031390731374660846 -0.002955370572886259 -0.0027774417095402996 -0.002606000210913036 -0.0024405687970171343 -0.0022816198774523273 -0.0021287814936135807 -0.001982386592423118 -0.0018421075495531581 -0.0017081854072195067 -0.0015803176989733303 -0.0014586847082578437 -0.0013429911566416417 -0.0012333665184594035 -0.0011295240241248074 -0.0010315606537211282 -0.00093920298373930853 -0.00085253778083000764 -0.00077131651483628013 -0.00069563345070756358 -0.00062529029164427516 -0.00056044027075737154 -0.00050099099803765207 -0.0004472305793404645 -0.00039927566826488287 -0.00035769780518738999 -0.00032303385876288933 -0.00029643339113612688 -0.00027924439373581983 -0.00027375685208273353 -0.00028292512394925917 -0.00031127018122752262 0.00080308525930395389]

fig_7.png

  • Fig_7
  • fig_8.png
  • Fig_8
  • fig_9.png
  • Fig_9
  • fig_10.png
  • Fig_10

 

  • FIR Compiler 7.2.7

 fig_11.png

  • Fig_11

Coefficient Vector:

[0.0013048955783505156 0.0015877547306928912 0.0025189211668869785 0.0037736613623847544 0.0054227648724232821 0.0075365663766492168 0.010193203005368979 0.013472562235095471 0.017455754058847743 0.022226297421752028 0.027862646255964612 0.034441516682663702 0.042030495817242469 0.050691154549291226 0.060471758285415997 0.071408704590259803 0.083520927538964104 0.096810773810427214 0.1112605516160087 0.126832323628255 0.14346593028061089 0.16107845043259525 0.17956439241488861 0.19879582494816067 0.21862409005521949 0.23888036724989206 0.25937834322191916 0.27991595242748735 0.30027917082474742 0.32024503919478675 0.33958572368366435 0.35807225221923311 0.37547855699957289 0.39158597841787329 0.40618720873441982 0.41909087708393078 0.43012476047656006 0.43913976655446463 0.44601241377754203 0.45064794682098408 0.45298194282813886 0.45298194282813886 0.45064794682098408 0.44601241377754203 0.43913976655446463 0.43012476047656006 0.41909087708393078 0.40618720873441982 0.39158597841787329 0.37547855699957289 0.35807225221923311 0.33958572368366435 0.32024503919478675 0.30027917082474742 0.27991595242748735 0.25937834322191916 0.23888036724989206 0.21862409005521949 0.19879582494816067 0.17956439241488861 0.16107845043259525 0.14346593028061089 0.126832323628255 0.1112605516160087 0.096810773810427214 0.083520927538964104 0.071408704590259803 0.060471758285415997 0.050691154549291226 0.042030495817242469 0.034441516682663702 0.027862646255964612 0.022226297421752028 0.017455754058847743 0.013472562235095471 0.010193203005368979 0.0075365663766492168 0.0054227648724232821 0.0037736613623847544 0.0025189211668869785 0.0015877547306928912 0.0013048955783505156]

fig_12.png

  • Fig_12
  • fig_13.png
  • Fig_13

Rest settings same as previous block.

  • FIR Compiler 7.2.8
  • fig_14.png
  • Fig_14

 

Coefficient Vector: [0.0068710599211463212 0.039768377091703222 0.12606088513805835 0.27945853811205307 0.47423619395217681 0.6427653544436539 0.70991182313200563 0.6427653544436539 0.47423619395217681 0.27945853811205307 0.12606088513805835 0.039768377091703222 0.0068710599211463212]

 fig_15.png

  • Fig_15
  • fig_16.png
  • Fig_16

Rest settings same as previous block.

Note: After model is completed, it is converted into Vivado Synthesizable HDL netlist where the “Output Rounding mode” and “Output width” is changing from the 2nd stage of FIR (1st stage is OK).

Regards

Vikas

0 Kudos