VexRiscv.v 204 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904
  1. // Generator : SpinalHDL v1.4.0 git head : ecb5a80b713566f417ea3ea061f9969e73770a7f
  2. // Date : 10/01/2021, 22:00:03
  3. // Component : VexRiscv
  4. `define Src2CtrlEnum_defaultEncoding_type [1:0]
  5. `define Src2CtrlEnum_defaultEncoding_RS 2'b00
  6. `define Src2CtrlEnum_defaultEncoding_IMI 2'b01
  7. `define Src2CtrlEnum_defaultEncoding_IMS 2'b10
  8. `define Src2CtrlEnum_defaultEncoding_PC 2'b11
  9. `define Src1CtrlEnum_defaultEncoding_type [1:0]
  10. `define Src1CtrlEnum_defaultEncoding_RS 2'b00
  11. `define Src1CtrlEnum_defaultEncoding_IMU 2'b01
  12. `define Src1CtrlEnum_defaultEncoding_PC_INCREMENT 2'b10
  13. `define Src1CtrlEnum_defaultEncoding_URS1 2'b11
  14. `define EnvCtrlEnum_defaultEncoding_type [1:0]
  15. `define EnvCtrlEnum_defaultEncoding_NONE 2'b00
  16. `define EnvCtrlEnum_defaultEncoding_XRET 2'b01
  17. `define EnvCtrlEnum_defaultEncoding_ECALL 2'b10
  18. `define AluCtrlEnum_defaultEncoding_type [1:0]
  19. `define AluCtrlEnum_defaultEncoding_ADD_SUB 2'b00
  20. `define AluCtrlEnum_defaultEncoding_SLT_SLTU 2'b01
  21. `define AluCtrlEnum_defaultEncoding_BITWISE 2'b10
  22. `define AluBitwiseCtrlEnum_defaultEncoding_type [1:0]
  23. `define AluBitwiseCtrlEnum_defaultEncoding_XOR_1 2'b00
  24. `define AluBitwiseCtrlEnum_defaultEncoding_OR_1 2'b01
  25. `define AluBitwiseCtrlEnum_defaultEncoding_AND_1 2'b10
  26. `define ShiftCtrlEnum_defaultEncoding_type [1:0]
  27. `define ShiftCtrlEnum_defaultEncoding_DISABLE_1 2'b00
  28. `define ShiftCtrlEnum_defaultEncoding_SLL_1 2'b01
  29. `define ShiftCtrlEnum_defaultEncoding_SRL_1 2'b10
  30. `define ShiftCtrlEnum_defaultEncoding_SRA_1 2'b11
  31. `define BranchCtrlEnum_defaultEncoding_type [1:0]
  32. `define BranchCtrlEnum_defaultEncoding_INC 2'b00
  33. `define BranchCtrlEnum_defaultEncoding_B 2'b01
  34. `define BranchCtrlEnum_defaultEncoding_JAL 2'b10
  35. `define BranchCtrlEnum_defaultEncoding_JALR 2'b11
  36. module InstructionCache (
  37. input io_flush,
  38. input io_cpu_prefetch_isValid,
  39. output reg io_cpu_prefetch_haltIt,
  40. input [31:0] io_cpu_prefetch_pc,
  41. input io_cpu_fetch_isValid,
  42. input io_cpu_fetch_isStuck,
  43. input io_cpu_fetch_isRemoved,
  44. input [31:0] io_cpu_fetch_pc,
  45. output [31:0] io_cpu_fetch_data,
  46. output io_cpu_fetch_mmuBus_cmd_isValid,
  47. output [31:0] io_cpu_fetch_mmuBus_cmd_virtualAddress,
  48. output io_cpu_fetch_mmuBus_cmd_bypassTranslation,
  49. input [31:0] io_cpu_fetch_mmuBus_rsp_physicalAddress,
  50. input io_cpu_fetch_mmuBus_rsp_isIoAccess,
  51. input io_cpu_fetch_mmuBus_rsp_allowRead,
  52. input io_cpu_fetch_mmuBus_rsp_allowWrite,
  53. input io_cpu_fetch_mmuBus_rsp_allowExecute,
  54. input io_cpu_fetch_mmuBus_rsp_exception,
  55. input io_cpu_fetch_mmuBus_rsp_refilling,
  56. output io_cpu_fetch_mmuBus_end,
  57. input io_cpu_fetch_mmuBus_busy,
  58. output [31:0] io_cpu_fetch_physicalAddress,
  59. output io_cpu_fetch_haltIt,
  60. input io_cpu_decode_isValid,
  61. input io_cpu_decode_isStuck,
  62. input [31:0] io_cpu_decode_pc,
  63. output [31:0] io_cpu_decode_physicalAddress,
  64. output [31:0] io_cpu_decode_data,
  65. output io_cpu_decode_cacheMiss,
  66. output io_cpu_decode_error,
  67. output io_cpu_decode_mmuRefilling,
  68. output io_cpu_decode_mmuException,
  69. input io_cpu_decode_isUser,
  70. input io_cpu_fill_valid,
  71. input [31:0] io_cpu_fill_payload,
  72. output io_mem_cmd_valid,
  73. input io_mem_cmd_ready,
  74. output [31:0] io_mem_cmd_payload_address,
  75. output [2:0] io_mem_cmd_payload_size,
  76. input io_mem_rsp_valid,
  77. input [31:0] io_mem_rsp_payload_data,
  78. input io_mem_rsp_payload_error,
  79. input clk,
  80. input reset
  81. );
  82. reg [22:0] _zz_10_;
  83. reg [31:0] _zz_11_;
  84. wire _zz_12_;
  85. wire _zz_13_;
  86. wire [0:0] _zz_14_;
  87. wire [0:0] _zz_15_;
  88. wire [22:0] _zz_16_;
  89. reg _zz_1_;
  90. reg _zz_2_;
  91. reg lineLoader_fire;
  92. reg lineLoader_valid;
  93. (* syn_keep , keep *) reg [31:0] lineLoader_address /* synthesis syn_keep = 1 */ ;
  94. reg lineLoader_hadError;
  95. reg lineLoader_flushPending;
  96. reg [6:0] lineLoader_flushCounter;
  97. reg _zz_3_;
  98. reg lineLoader_cmdSent;
  99. reg lineLoader_wayToAllocate_willIncrement;
  100. wire lineLoader_wayToAllocate_willClear;
  101. wire lineLoader_wayToAllocate_willOverflowIfInc;
  102. wire lineLoader_wayToAllocate_willOverflow;
  103. (* syn_keep , keep *) reg [2:0] lineLoader_wordIndex /* synthesis syn_keep = 1 */ ;
  104. wire lineLoader_write_tag_0_valid;
  105. wire [5:0] lineLoader_write_tag_0_payload_address;
  106. wire lineLoader_write_tag_0_payload_data_valid;
  107. wire lineLoader_write_tag_0_payload_data_error;
  108. wire [20:0] lineLoader_write_tag_0_payload_data_address;
  109. wire lineLoader_write_data_0_valid;
  110. wire [8:0] lineLoader_write_data_0_payload_address;
  111. wire [31:0] lineLoader_write_data_0_payload_data;
  112. wire _zz_4_;
  113. wire [5:0] _zz_5_;
  114. wire _zz_6_;
  115. wire fetchStage_read_waysValues_0_tag_valid;
  116. wire fetchStage_read_waysValues_0_tag_error;
  117. wire [20:0] fetchStage_read_waysValues_0_tag_address;
  118. wire [22:0] _zz_7_;
  119. wire [8:0] _zz_8_;
  120. wire _zz_9_;
  121. wire [31:0] fetchStage_read_waysValues_0_data;
  122. wire fetchStage_hit_hits_0;
  123. wire fetchStage_hit_valid;
  124. wire fetchStage_hit_error;
  125. wire [31:0] fetchStage_hit_data;
  126. wire [31:0] fetchStage_hit_word;
  127. reg [31:0] io_cpu_fetch_data_regNextWhen;
  128. reg [31:0] decodeStage_mmuRsp_physicalAddress;
  129. reg decodeStage_mmuRsp_isIoAccess;
  130. reg decodeStage_mmuRsp_allowRead;
  131. reg decodeStage_mmuRsp_allowWrite;
  132. reg decodeStage_mmuRsp_allowExecute;
  133. reg decodeStage_mmuRsp_exception;
  134. reg decodeStage_mmuRsp_refilling;
  135. reg decodeStage_hit_valid;
  136. reg decodeStage_hit_error;
  137. reg [22:0] ways_0_tags [0:63];
  138. reg [31:0] ways_0_datas [0:511];
  139. assign _zz_12_ = (! lineLoader_flushCounter[6]);
  140. assign _zz_13_ = (lineLoader_flushPending && (! (lineLoader_valid || io_cpu_fetch_isValid)));
  141. assign _zz_14_ = _zz_7_[0 : 0];
  142. assign _zz_15_ = _zz_7_[1 : 1];
  143. assign _zz_16_ = {lineLoader_write_tag_0_payload_data_address,{lineLoader_write_tag_0_payload_data_error,lineLoader_write_tag_0_payload_data_valid}};
  144. always @ (posedge clk) begin
  145. if(_zz_2_) begin
  146. ways_0_tags[lineLoader_write_tag_0_payload_address] <= _zz_16_;
  147. end
  148. end
  149. always @ (posedge clk) begin
  150. if(_zz_6_) begin
  151. _zz_10_ <= ways_0_tags[_zz_5_];
  152. end
  153. end
  154. always @ (posedge clk) begin
  155. if(_zz_1_) begin
  156. ways_0_datas[lineLoader_write_data_0_payload_address] <= lineLoader_write_data_0_payload_data;
  157. end
  158. end
  159. always @ (posedge clk) begin
  160. if(_zz_9_) begin
  161. _zz_11_ <= ways_0_datas[_zz_8_];
  162. end
  163. end
  164. always @ (*) begin
  165. _zz_1_ = 1'b0;
  166. if(lineLoader_write_data_0_valid)begin
  167. _zz_1_ = 1'b1;
  168. end
  169. end
  170. always @ (*) begin
  171. _zz_2_ = 1'b0;
  172. if(lineLoader_write_tag_0_valid)begin
  173. _zz_2_ = 1'b1;
  174. end
  175. end
  176. assign io_cpu_fetch_haltIt = io_cpu_fetch_mmuBus_busy;
  177. always @ (*) begin
  178. lineLoader_fire = 1'b0;
  179. if(io_mem_rsp_valid)begin
  180. if((lineLoader_wordIndex == (3'b111)))begin
  181. lineLoader_fire = 1'b1;
  182. end
  183. end
  184. end
  185. always @ (*) begin
  186. io_cpu_prefetch_haltIt = (lineLoader_valid || lineLoader_flushPending);
  187. if(_zz_12_)begin
  188. io_cpu_prefetch_haltIt = 1'b1;
  189. end
  190. if((! _zz_3_))begin
  191. io_cpu_prefetch_haltIt = 1'b1;
  192. end
  193. if(io_flush)begin
  194. io_cpu_prefetch_haltIt = 1'b1;
  195. end
  196. end
  197. assign io_mem_cmd_valid = (lineLoader_valid && (! lineLoader_cmdSent));
  198. assign io_mem_cmd_payload_address = {lineLoader_address[31 : 5],5'h0};
  199. assign io_mem_cmd_payload_size = (3'b101);
  200. always @ (*) begin
  201. lineLoader_wayToAllocate_willIncrement = 1'b0;
  202. if((! lineLoader_valid))begin
  203. lineLoader_wayToAllocate_willIncrement = 1'b1;
  204. end
  205. end
  206. assign lineLoader_wayToAllocate_willClear = 1'b0;
  207. assign lineLoader_wayToAllocate_willOverflowIfInc = 1'b1;
  208. assign lineLoader_wayToAllocate_willOverflow = (lineLoader_wayToAllocate_willOverflowIfInc && lineLoader_wayToAllocate_willIncrement);
  209. assign _zz_4_ = 1'b1;
  210. assign lineLoader_write_tag_0_valid = ((_zz_4_ && lineLoader_fire) || (! lineLoader_flushCounter[6]));
  211. assign lineLoader_write_tag_0_payload_address = (lineLoader_flushCounter[6] ? lineLoader_address[10 : 5] : lineLoader_flushCounter[5 : 0]);
  212. assign lineLoader_write_tag_0_payload_data_valid = lineLoader_flushCounter[6];
  213. assign lineLoader_write_tag_0_payload_data_error = (lineLoader_hadError || io_mem_rsp_payload_error);
  214. assign lineLoader_write_tag_0_payload_data_address = lineLoader_address[31 : 11];
  215. assign lineLoader_write_data_0_valid = (io_mem_rsp_valid && _zz_4_);
  216. assign lineLoader_write_data_0_payload_address = {lineLoader_address[10 : 5],lineLoader_wordIndex};
  217. assign lineLoader_write_data_0_payload_data = io_mem_rsp_payload_data;
  218. assign _zz_5_ = io_cpu_prefetch_pc[10 : 5];
  219. assign _zz_6_ = (! io_cpu_fetch_isStuck);
  220. assign _zz_7_ = _zz_10_;
  221. assign fetchStage_read_waysValues_0_tag_valid = _zz_14_[0];
  222. assign fetchStage_read_waysValues_0_tag_error = _zz_15_[0];
  223. assign fetchStage_read_waysValues_0_tag_address = _zz_7_[22 : 2];
  224. assign _zz_8_ = io_cpu_prefetch_pc[10 : 2];
  225. assign _zz_9_ = (! io_cpu_fetch_isStuck);
  226. assign fetchStage_read_waysValues_0_data = _zz_11_;
  227. assign fetchStage_hit_hits_0 = (fetchStage_read_waysValues_0_tag_valid && (fetchStage_read_waysValues_0_tag_address == io_cpu_fetch_mmuBus_rsp_physicalAddress[31 : 11]));
  228. assign fetchStage_hit_valid = (fetchStage_hit_hits_0 != (1'b0));
  229. assign fetchStage_hit_error = fetchStage_read_waysValues_0_tag_error;
  230. assign fetchStage_hit_data = fetchStage_read_waysValues_0_data;
  231. assign fetchStage_hit_word = fetchStage_hit_data;
  232. assign io_cpu_fetch_data = fetchStage_hit_word;
  233. assign io_cpu_decode_data = io_cpu_fetch_data_regNextWhen;
  234. assign io_cpu_fetch_mmuBus_cmd_isValid = io_cpu_fetch_isValid;
  235. assign io_cpu_fetch_mmuBus_cmd_virtualAddress = io_cpu_fetch_pc;
  236. assign io_cpu_fetch_mmuBus_cmd_bypassTranslation = 1'b0;
  237. assign io_cpu_fetch_mmuBus_end = ((! io_cpu_fetch_isStuck) || io_cpu_fetch_isRemoved);
  238. assign io_cpu_fetch_physicalAddress = io_cpu_fetch_mmuBus_rsp_physicalAddress;
  239. assign io_cpu_decode_cacheMiss = (! decodeStage_hit_valid);
  240. assign io_cpu_decode_error = decodeStage_hit_error;
  241. assign io_cpu_decode_mmuRefilling = decodeStage_mmuRsp_refilling;
  242. assign io_cpu_decode_mmuException = ((! decodeStage_mmuRsp_refilling) && (decodeStage_mmuRsp_exception || (! decodeStage_mmuRsp_allowExecute)));
  243. assign io_cpu_decode_physicalAddress = decodeStage_mmuRsp_physicalAddress;
  244. always @ (posedge clk or posedge reset) begin
  245. if (reset) begin
  246. lineLoader_valid <= 1'b0;
  247. lineLoader_hadError <= 1'b0;
  248. lineLoader_flushPending <= 1'b1;
  249. lineLoader_cmdSent <= 1'b0;
  250. lineLoader_wordIndex <= (3'b000);
  251. end else begin
  252. if(lineLoader_fire)begin
  253. lineLoader_valid <= 1'b0;
  254. end
  255. if(lineLoader_fire)begin
  256. lineLoader_hadError <= 1'b0;
  257. end
  258. if(io_cpu_fill_valid)begin
  259. lineLoader_valid <= 1'b1;
  260. end
  261. if(io_flush)begin
  262. lineLoader_flushPending <= 1'b1;
  263. end
  264. if(_zz_13_)begin
  265. lineLoader_flushPending <= 1'b0;
  266. end
  267. if((io_mem_cmd_valid && io_mem_cmd_ready))begin
  268. lineLoader_cmdSent <= 1'b1;
  269. end
  270. if(lineLoader_fire)begin
  271. lineLoader_cmdSent <= 1'b0;
  272. end
  273. if(io_mem_rsp_valid)begin
  274. lineLoader_wordIndex <= (lineLoader_wordIndex + (3'b001));
  275. if(io_mem_rsp_payload_error)begin
  276. lineLoader_hadError <= 1'b1;
  277. end
  278. end
  279. end
  280. end
  281. always @ (posedge clk) begin
  282. if(io_cpu_fill_valid)begin
  283. lineLoader_address <= io_cpu_fill_payload;
  284. end
  285. if(_zz_12_)begin
  286. lineLoader_flushCounter <= (lineLoader_flushCounter + 7'h01);
  287. end
  288. _zz_3_ <= lineLoader_flushCounter[6];
  289. if(_zz_13_)begin
  290. lineLoader_flushCounter <= 7'h0;
  291. end
  292. if((! io_cpu_decode_isStuck))begin
  293. io_cpu_fetch_data_regNextWhen <= io_cpu_fetch_data;
  294. end
  295. if((! io_cpu_decode_isStuck))begin
  296. decodeStage_mmuRsp_physicalAddress <= io_cpu_fetch_mmuBus_rsp_physicalAddress;
  297. decodeStage_mmuRsp_isIoAccess <= io_cpu_fetch_mmuBus_rsp_isIoAccess;
  298. decodeStage_mmuRsp_allowRead <= io_cpu_fetch_mmuBus_rsp_allowRead;
  299. decodeStage_mmuRsp_allowWrite <= io_cpu_fetch_mmuBus_rsp_allowWrite;
  300. decodeStage_mmuRsp_allowExecute <= io_cpu_fetch_mmuBus_rsp_allowExecute;
  301. decodeStage_mmuRsp_exception <= io_cpu_fetch_mmuBus_rsp_exception;
  302. decodeStage_mmuRsp_refilling <= io_cpu_fetch_mmuBus_rsp_refilling;
  303. end
  304. if((! io_cpu_decode_isStuck))begin
  305. decodeStage_hit_valid <= fetchStage_hit_valid;
  306. end
  307. if((! io_cpu_decode_isStuck))begin
  308. decodeStage_hit_error <= fetchStage_hit_error;
  309. end
  310. end
  311. endmodule
  312. module VexRiscv (
  313. input [31:0] externalResetVector,
  314. input timerInterrupt,
  315. input softwareInterrupt,
  316. input [31:0] externalInterruptArray,
  317. output iBusAXI_ar_valid,
  318. input iBusAXI_ar_ready,
  319. output [31:0] iBusAXI_ar_payload_addr,
  320. output [7:0] iBusAXI_ar_payload_len,
  321. output [1:0] iBusAXI_ar_payload_burst,
  322. output [3:0] iBusAXI_ar_payload_cache,
  323. output [2:0] iBusAXI_ar_payload_prot,
  324. input iBusAXI_r_valid,
  325. output iBusAXI_r_ready,
  326. input [31:0] iBusAXI_r_payload_data,
  327. input [1:0] iBusAXI_r_payload_resp,
  328. input iBusAXI_r_payload_last,
  329. output dBusWishbone_CYC,
  330. output dBusWishbone_STB,
  331. input dBusWishbone_ACK,
  332. output dBusWishbone_WE,
  333. output [29:0] dBusWishbone_ADR,
  334. input [31:0] dBusWishbone_DAT_MISO,
  335. output [31:0] dBusWishbone_DAT_MOSI,
  336. output reg [3:0] dBusWishbone_SEL,
  337. input dBusWishbone_ERR,
  338. output [1:0] dBusWishbone_BTE,
  339. output [2:0] dBusWishbone_CTI,
  340. input clk,
  341. input reset
  342. );
  343. wire _zz_157_;
  344. wire _zz_158_;
  345. wire _zz_159_;
  346. wire _zz_160_;
  347. wire _zz_161_;
  348. wire _zz_162_;
  349. wire _zz_163_;
  350. reg _zz_164_;
  351. reg [31:0] _zz_165_;
  352. reg [31:0] _zz_166_;
  353. reg [31:0] _zz_167_;
  354. wire IBusCachedPlugin_cache_io_cpu_prefetch_haltIt;
  355. wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_data;
  356. wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress;
  357. wire IBusCachedPlugin_cache_io_cpu_fetch_haltIt;
  358. wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid;
  359. wire [31:0] IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress;
  360. wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation;
  361. wire IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end;
  362. wire IBusCachedPlugin_cache_io_cpu_decode_error;
  363. wire IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling;
  364. wire IBusCachedPlugin_cache_io_cpu_decode_mmuException;
  365. wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_data;
  366. wire IBusCachedPlugin_cache_io_cpu_decode_cacheMiss;
  367. wire [31:0] IBusCachedPlugin_cache_io_cpu_decode_physicalAddress;
  368. wire IBusCachedPlugin_cache_io_mem_cmd_valid;
  369. wire [31:0] IBusCachedPlugin_cache_io_mem_cmd_payload_address;
  370. wire [2:0] IBusCachedPlugin_cache_io_mem_cmd_payload_size;
  371. wire _zz_168_;
  372. wire _zz_169_;
  373. wire _zz_170_;
  374. wire _zz_171_;
  375. wire _zz_172_;
  376. wire _zz_173_;
  377. wire _zz_174_;
  378. wire _zz_175_;
  379. wire _zz_176_;
  380. wire _zz_177_;
  381. wire [1:0] _zz_178_;
  382. wire _zz_179_;
  383. wire _zz_180_;
  384. wire _zz_181_;
  385. wire _zz_182_;
  386. wire _zz_183_;
  387. wire _zz_184_;
  388. wire _zz_185_;
  389. wire _zz_186_;
  390. wire [1:0] _zz_187_;
  391. wire _zz_188_;
  392. wire _zz_189_;
  393. wire _zz_190_;
  394. wire _zz_191_;
  395. wire _zz_192_;
  396. wire _zz_193_;
  397. wire _zz_194_;
  398. wire [1:0] _zz_195_;
  399. wire _zz_196_;
  400. wire [1:0] _zz_197_;
  401. wire [0:0] _zz_198_;
  402. wire [0:0] _zz_199_;
  403. wire [51:0] _zz_200_;
  404. wire [51:0] _zz_201_;
  405. wire [51:0] _zz_202_;
  406. wire [32:0] _zz_203_;
  407. wire [51:0] _zz_204_;
  408. wire [49:0] _zz_205_;
  409. wire [51:0] _zz_206_;
  410. wire [49:0] _zz_207_;
  411. wire [51:0] _zz_208_;
  412. wire [0:0] _zz_209_;
  413. wire [0:0] _zz_210_;
  414. wire [0:0] _zz_211_;
  415. wire [0:0] _zz_212_;
  416. wire [0:0] _zz_213_;
  417. wire [32:0] _zz_214_;
  418. wire [31:0] _zz_215_;
  419. wire [32:0] _zz_216_;
  420. wire [0:0] _zz_217_;
  421. wire [0:0] _zz_218_;
  422. wire [0:0] _zz_219_;
  423. wire [0:0] _zz_220_;
  424. wire [0:0] _zz_221_;
  425. wire [0:0] _zz_222_;
  426. wire [0:0] _zz_223_;
  427. wire [0:0] _zz_224_;
  428. wire [0:0] _zz_225_;
  429. wire [3:0] _zz_226_;
  430. wire [2:0] _zz_227_;
  431. wire [31:0] _zz_228_;
  432. wire [11:0] _zz_229_;
  433. wire [31:0] _zz_230_;
  434. wire [19:0] _zz_231_;
  435. wire [11:0] _zz_232_;
  436. wire [31:0] _zz_233_;
  437. wire [31:0] _zz_234_;
  438. wire [19:0] _zz_235_;
  439. wire [11:0] _zz_236_;
  440. wire [0:0] _zz_237_;
  441. wire [2:0] _zz_238_;
  442. wire [4:0] _zz_239_;
  443. wire [11:0] _zz_240_;
  444. wire [11:0] _zz_241_;
  445. wire [31:0] _zz_242_;
  446. wire [31:0] _zz_243_;
  447. wire [31:0] _zz_244_;
  448. wire [31:0] _zz_245_;
  449. wire [31:0] _zz_246_;
  450. wire [31:0] _zz_247_;
  451. wire [31:0] _zz_248_;
  452. wire [11:0] _zz_249_;
  453. wire [19:0] _zz_250_;
  454. wire [11:0] _zz_251_;
  455. wire [31:0] _zz_252_;
  456. wire [31:0] _zz_253_;
  457. wire [31:0] _zz_254_;
  458. wire [11:0] _zz_255_;
  459. wire [19:0] _zz_256_;
  460. wire [11:0] _zz_257_;
  461. wire [2:0] _zz_258_;
  462. wire [65:0] _zz_259_;
  463. wire [65:0] _zz_260_;
  464. wire [31:0] _zz_261_;
  465. wire [31:0] _zz_262_;
  466. wire [0:0] _zz_263_;
  467. wire [5:0] _zz_264_;
  468. wire [32:0] _zz_265_;
  469. wire [31:0] _zz_266_;
  470. wire [31:0] _zz_267_;
  471. wire [32:0] _zz_268_;
  472. wire [32:0] _zz_269_;
  473. wire [32:0] _zz_270_;
  474. wire [32:0] _zz_271_;
  475. wire [0:0] _zz_272_;
  476. wire [32:0] _zz_273_;
  477. wire [0:0] _zz_274_;
  478. wire [32:0] _zz_275_;
  479. wire [0:0] _zz_276_;
  480. wire [31:0] _zz_277_;
  481. wire [0:0] _zz_278_;
  482. wire [0:0] _zz_279_;
  483. wire [0:0] _zz_280_;
  484. wire [0:0] _zz_281_;
  485. wire [0:0] _zz_282_;
  486. wire [0:0] _zz_283_;
  487. wire [0:0] _zz_284_;
  488. wire [0:0] _zz_285_;
  489. wire [0:0] _zz_286_;
  490. wire [6:0] _zz_287_;
  491. wire _zz_288_;
  492. wire _zz_289_;
  493. wire [1:0] _zz_290_;
  494. wire _zz_291_;
  495. wire _zz_292_;
  496. wire _zz_293_;
  497. wire [31:0] _zz_294_;
  498. wire [31:0] _zz_295_;
  499. wire [0:0] _zz_296_;
  500. wire [0:0] _zz_297_;
  501. wire [1:0] _zz_298_;
  502. wire [1:0] _zz_299_;
  503. wire _zz_300_;
  504. wire [0:0] _zz_301_;
  505. wire [24:0] _zz_302_;
  506. wire [31:0] _zz_303_;
  507. wire [31:0] _zz_304_;
  508. wire [31:0] _zz_305_;
  509. wire [31:0] _zz_306_;
  510. wire [31:0] _zz_307_;
  511. wire [31:0] _zz_308_;
  512. wire [0:0] _zz_309_;
  513. wire [4:0] _zz_310_;
  514. wire [1:0] _zz_311_;
  515. wire [1:0] _zz_312_;
  516. wire _zz_313_;
  517. wire [0:0] _zz_314_;
  518. wire [21:0] _zz_315_;
  519. wire [31:0] _zz_316_;
  520. wire [31:0] _zz_317_;
  521. wire _zz_318_;
  522. wire [0:0] _zz_319_;
  523. wire [1:0] _zz_320_;
  524. wire [31:0] _zz_321_;
  525. wire [31:0] _zz_322_;
  526. wire _zz_323_;
  527. wire _zz_324_;
  528. wire [2:0] _zz_325_;
  529. wire [2:0] _zz_326_;
  530. wire _zz_327_;
  531. wire [0:0] _zz_328_;
  532. wire [18:0] _zz_329_;
  533. wire [31:0] _zz_330_;
  534. wire [31:0] _zz_331_;
  535. wire [31:0] _zz_332_;
  536. wire _zz_333_;
  537. wire _zz_334_;
  538. wire [31:0] _zz_335_;
  539. wire [31:0] _zz_336_;
  540. wire _zz_337_;
  541. wire [0:0] _zz_338_;
  542. wire [0:0] _zz_339_;
  543. wire [0:0] _zz_340_;
  544. wire [0:0] _zz_341_;
  545. wire [1:0] _zz_342_;
  546. wire [1:0] _zz_343_;
  547. wire _zz_344_;
  548. wire [0:0] _zz_345_;
  549. wire [16:0] _zz_346_;
  550. wire [31:0] _zz_347_;
  551. wire [31:0] _zz_348_;
  552. wire [31:0] _zz_349_;
  553. wire [31:0] _zz_350_;
  554. wire [31:0] _zz_351_;
  555. wire [31:0] _zz_352_;
  556. wire [31:0] _zz_353_;
  557. wire [31:0] _zz_354_;
  558. wire [31:0] _zz_355_;
  559. wire [31:0] _zz_356_;
  560. wire [31:0] _zz_357_;
  561. wire _zz_358_;
  562. wire _zz_359_;
  563. wire [0:0] _zz_360_;
  564. wire [2:0] _zz_361_;
  565. wire [0:0] _zz_362_;
  566. wire [0:0] _zz_363_;
  567. wire _zz_364_;
  568. wire [0:0] _zz_365_;
  569. wire [14:0] _zz_366_;
  570. wire [31:0] _zz_367_;
  571. wire [31:0] _zz_368_;
  572. wire [31:0] _zz_369_;
  573. wire [31:0] _zz_370_;
  574. wire _zz_371_;
  575. wire [0:0] _zz_372_;
  576. wire [0:0] _zz_373_;
  577. wire [31:0] _zz_374_;
  578. wire [31:0] _zz_375_;
  579. wire [4:0] _zz_376_;
  580. wire [4:0] _zz_377_;
  581. wire _zz_378_;
  582. wire [0:0] _zz_379_;
  583. wire [12:0] _zz_380_;
  584. wire [31:0] _zz_381_;
  585. wire _zz_382_;
  586. wire [0:0] _zz_383_;
  587. wire [1:0] _zz_384_;
  588. wire [31:0] _zz_385_;
  589. wire [31:0] _zz_386_;
  590. wire [0:0] _zz_387_;
  591. wire [0:0] _zz_388_;
  592. wire [0:0] _zz_389_;
  593. wire [0:0] _zz_390_;
  594. wire _zz_391_;
  595. wire [0:0] _zz_392_;
  596. wire [9:0] _zz_393_;
  597. wire [31:0] _zz_394_;
  598. wire [31:0] _zz_395_;
  599. wire [31:0] _zz_396_;
  600. wire [31:0] _zz_397_;
  601. wire [31:0] _zz_398_;
  602. wire [31:0] _zz_399_;
  603. wire [31:0] _zz_400_;
  604. wire [31:0] _zz_401_;
  605. wire [31:0] _zz_402_;
  606. wire [31:0] _zz_403_;
  607. wire _zz_404_;
  608. wire [0:0] _zz_405_;
  609. wire [0:0] _zz_406_;
  610. wire _zz_407_;
  611. wire [0:0] _zz_408_;
  612. wire [6:0] _zz_409_;
  613. wire [31:0] _zz_410_;
  614. wire [31:0] _zz_411_;
  615. wire [31:0] _zz_412_;
  616. wire [4:0] _zz_413_;
  617. wire [4:0] _zz_414_;
  618. wire _zz_415_;
  619. wire [0:0] _zz_416_;
  620. wire [2:0] _zz_417_;
  621. wire [31:0] _zz_418_;
  622. wire _zz_419_;
  623. wire [0:0] _zz_420_;
  624. wire [0:0] _zz_421_;
  625. wire [31:0] _zz_422_;
  626. wire [31:0] _zz_423_;
  627. wire [31:0] _zz_424_;
  628. wire [31:0] _zz_425_;
  629. wire _zz_426_;
  630. wire [0:0] _zz_427_;
  631. wire [0:0] _zz_428_;
  632. wire _zz_429_;
  633. wire [1:0] _zz_430_;
  634. wire [1:0] _zz_431_;
  635. wire [1:0] _zz_432_;
  636. wire [1:0] _zz_433_;
  637. wire [31:0] _zz_434_;
  638. wire [31:0] _zz_435_;
  639. wire [31:0] _zz_436_;
  640. wire [31:0] _zz_437_;
  641. wire [31:0] _zz_438_;
  642. wire [31:0] _zz_439_;
  643. wire [31:0] _zz_440_;
  644. wire [31:0] _zz_441_;
  645. wire _zz_442_;
  646. wire _zz_443_;
  647. wire _zz_444_;
  648. wire [31:0] memory_MEMORY_READ_DATA;
  649. wire [33:0] execute_MUL_LH;
  650. wire `Src2CtrlEnum_defaultEncoding_type decode_SRC2_CTRL;
  651. wire `Src2CtrlEnum_defaultEncoding_type _zz_1_;
  652. wire `Src2CtrlEnum_defaultEncoding_type _zz_2_;
  653. wire `Src2CtrlEnum_defaultEncoding_type _zz_3_;
  654. wire decode_IS_RS2_SIGNED;
  655. wire decode_IS_RS1_SIGNED;
  656. wire [1:0] memory_MEMORY_ADDRESS_LOW;
  657. wire [1:0] execute_MEMORY_ADDRESS_LOW;
  658. wire `Src1CtrlEnum_defaultEncoding_type decode_SRC1_CTRL;
  659. wire `Src1CtrlEnum_defaultEncoding_type _zz_4_;
  660. wire `Src1CtrlEnum_defaultEncoding_type _zz_5_;
  661. wire `Src1CtrlEnum_defaultEncoding_type _zz_6_;
  662. wire execute_BRANCH_DO;
  663. wire [51:0] memory_MUL_LOW;
  664. wire decode_BYPASSABLE_EXECUTE_STAGE;
  665. wire `EnvCtrlEnum_defaultEncoding_type _zz_7_;
  666. wire `EnvCtrlEnum_defaultEncoding_type _zz_8_;
  667. wire `EnvCtrlEnum_defaultEncoding_type _zz_9_;
  668. wire `EnvCtrlEnum_defaultEncoding_type _zz_10_;
  669. wire `EnvCtrlEnum_defaultEncoding_type decode_ENV_CTRL;
  670. wire `EnvCtrlEnum_defaultEncoding_type _zz_11_;
  671. wire `EnvCtrlEnum_defaultEncoding_type _zz_12_;
  672. wire `EnvCtrlEnum_defaultEncoding_type _zz_13_;
  673. wire [31:0] execute_BRANCH_CALC;
  674. wire decode_IS_CSR;
  675. wire [31:0] writeBack_REGFILE_WRITE_DATA;
  676. wire [31:0] execute_REGFILE_WRITE_DATA;
  677. wire execute_BYPASSABLE_MEMORY_STAGE;
  678. wire decode_BYPASSABLE_MEMORY_STAGE;
  679. wire `AluCtrlEnum_defaultEncoding_type decode_ALU_CTRL;
  680. wire `AluCtrlEnum_defaultEncoding_type _zz_14_;
  681. wire `AluCtrlEnum_defaultEncoding_type _zz_15_;
  682. wire `AluCtrlEnum_defaultEncoding_type _zz_16_;
  683. wire decode_SRC_LESS_UNSIGNED;
  684. wire decode_CSR_WRITE_OPCODE;
  685. wire [33:0] execute_MUL_HL;
  686. wire decode_IS_DIV;
  687. wire `AluBitwiseCtrlEnum_defaultEncoding_type decode_ALU_BITWISE_CTRL;
  688. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_17_;
  689. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_18_;
  690. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_19_;
  691. wire `ShiftCtrlEnum_defaultEncoding_type _zz_20_;
  692. wire `ShiftCtrlEnum_defaultEncoding_type _zz_21_;
  693. wire `ShiftCtrlEnum_defaultEncoding_type decode_SHIFT_CTRL;
  694. wire `ShiftCtrlEnum_defaultEncoding_type _zz_22_;
  695. wire `ShiftCtrlEnum_defaultEncoding_type _zz_23_;
  696. wire `ShiftCtrlEnum_defaultEncoding_type _zz_24_;
  697. wire [31:0] writeBack_FORMAL_PC_NEXT;
  698. wire [31:0] memory_FORMAL_PC_NEXT;
  699. wire [31:0] execute_FORMAL_PC_NEXT;
  700. wire [31:0] decode_FORMAL_PC_NEXT;
  701. wire [31:0] execute_SHIFT_RIGHT;
  702. wire `BranchCtrlEnum_defaultEncoding_type _zz_25_;
  703. wire `BranchCtrlEnum_defaultEncoding_type _zz_26_;
  704. wire [31:0] execute_MUL_LL;
  705. wire decode_SRC2_FORCE_ZERO;
  706. wire decode_CSR_READ_OPCODE;
  707. wire memory_IS_MUL;
  708. wire execute_IS_MUL;
  709. wire decode_IS_MUL;
  710. wire decode_MEMORY_STORE;
  711. wire decode_PREDICTION_HAD_BRANCHED2;
  712. wire [33:0] memory_MUL_HH;
  713. wire [33:0] execute_MUL_HH;
  714. wire execute_IS_RS1_SIGNED;
  715. wire execute_IS_DIV;
  716. wire execute_IS_RS2_SIGNED;
  717. wire memory_IS_DIV;
  718. wire writeBack_IS_MUL;
  719. wire [33:0] writeBack_MUL_HH;
  720. wire [51:0] writeBack_MUL_LOW;
  721. wire [33:0] memory_MUL_HL;
  722. wire [33:0] memory_MUL_LH;
  723. wire [31:0] memory_MUL_LL;
  724. wire execute_CSR_READ_OPCODE;
  725. wire execute_CSR_WRITE_OPCODE;
  726. wire execute_IS_CSR;
  727. wire `EnvCtrlEnum_defaultEncoding_type memory_ENV_CTRL;
  728. wire `EnvCtrlEnum_defaultEncoding_type _zz_27_;
  729. wire `EnvCtrlEnum_defaultEncoding_type execute_ENV_CTRL;
  730. wire `EnvCtrlEnum_defaultEncoding_type _zz_28_;
  731. wire `EnvCtrlEnum_defaultEncoding_type writeBack_ENV_CTRL;
  732. wire `EnvCtrlEnum_defaultEncoding_type _zz_29_;
  733. wire [31:0] memory_BRANCH_CALC;
  734. wire memory_BRANCH_DO;
  735. wire [31:0] execute_PC;
  736. wire execute_PREDICTION_HAD_BRANCHED2;
  737. (* syn_keep , keep *) wire [31:0] execute_RS1 /* synthesis syn_keep = 1 */ ;
  738. wire execute_BRANCH_COND_RESULT;
  739. wire `BranchCtrlEnum_defaultEncoding_type execute_BRANCH_CTRL;
  740. wire `BranchCtrlEnum_defaultEncoding_type _zz_30_;
  741. wire decode_RS2_USE;
  742. wire decode_RS1_USE;
  743. reg [31:0] _zz_31_;
  744. wire execute_REGFILE_WRITE_VALID;
  745. wire execute_BYPASSABLE_EXECUTE_STAGE;
  746. wire memory_REGFILE_WRITE_VALID;
  747. wire [31:0] memory_INSTRUCTION;
  748. wire memory_BYPASSABLE_MEMORY_STAGE;
  749. wire writeBack_REGFILE_WRITE_VALID;
  750. reg [31:0] decode_RS2;
  751. reg [31:0] decode_RS1;
  752. wire [31:0] memory_SHIFT_RIGHT;
  753. reg [31:0] _zz_32_;
  754. wire `ShiftCtrlEnum_defaultEncoding_type memory_SHIFT_CTRL;
  755. wire `ShiftCtrlEnum_defaultEncoding_type _zz_33_;
  756. wire `ShiftCtrlEnum_defaultEncoding_type execute_SHIFT_CTRL;
  757. wire `ShiftCtrlEnum_defaultEncoding_type _zz_34_;
  758. wire execute_SRC_LESS_UNSIGNED;
  759. wire execute_SRC2_FORCE_ZERO;
  760. wire execute_SRC_USE_SUB_LESS;
  761. wire [31:0] _zz_35_;
  762. wire `Src2CtrlEnum_defaultEncoding_type execute_SRC2_CTRL;
  763. wire `Src2CtrlEnum_defaultEncoding_type _zz_36_;
  764. wire `Src1CtrlEnum_defaultEncoding_type execute_SRC1_CTRL;
  765. wire `Src1CtrlEnum_defaultEncoding_type _zz_37_;
  766. wire decode_SRC_USE_SUB_LESS;
  767. wire decode_SRC_ADD_ZERO;
  768. wire [31:0] execute_SRC_ADD_SUB;
  769. wire execute_SRC_LESS;
  770. wire `AluCtrlEnum_defaultEncoding_type execute_ALU_CTRL;
  771. wire `AluCtrlEnum_defaultEncoding_type _zz_38_;
  772. wire [31:0] execute_SRC2;
  773. wire [31:0] execute_SRC1;
  774. wire `AluBitwiseCtrlEnum_defaultEncoding_type execute_ALU_BITWISE_CTRL;
  775. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_39_;
  776. wire [31:0] _zz_40_;
  777. wire _zz_41_;
  778. reg _zz_42_;
  779. wire [31:0] decode_INSTRUCTION_ANTICIPATED;
  780. reg decode_REGFILE_WRITE_VALID;
  781. wire `BranchCtrlEnum_defaultEncoding_type _zz_43_;
  782. wire `Src1CtrlEnum_defaultEncoding_type _zz_44_;
  783. wire `EnvCtrlEnum_defaultEncoding_type _zz_45_;
  784. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_46_;
  785. wire `AluCtrlEnum_defaultEncoding_type _zz_47_;
  786. wire `ShiftCtrlEnum_defaultEncoding_type _zz_48_;
  787. wire `Src2CtrlEnum_defaultEncoding_type _zz_49_;
  788. wire writeBack_MEMORY_STORE;
  789. reg [31:0] _zz_50_;
  790. wire writeBack_MEMORY_ENABLE;
  791. wire [1:0] writeBack_MEMORY_ADDRESS_LOW;
  792. wire [31:0] writeBack_MEMORY_READ_DATA;
  793. wire memory_MMU_FAULT;
  794. wire [31:0] memory_MMU_RSP_physicalAddress;
  795. wire memory_MMU_RSP_isIoAccess;
  796. wire memory_MMU_RSP_allowRead;
  797. wire memory_MMU_RSP_allowWrite;
  798. wire memory_MMU_RSP_allowExecute;
  799. wire memory_MMU_RSP_exception;
  800. wire memory_MMU_RSP_refilling;
  801. wire [31:0] memory_PC;
  802. wire [31:0] memory_REGFILE_WRITE_DATA;
  803. wire memory_MEMORY_STORE;
  804. wire memory_MEMORY_ENABLE;
  805. wire execute_MMU_FAULT;
  806. wire [31:0] execute_MMU_RSP_physicalAddress;
  807. wire execute_MMU_RSP_isIoAccess;
  808. wire execute_MMU_RSP_allowRead;
  809. wire execute_MMU_RSP_allowWrite;
  810. wire execute_MMU_RSP_allowExecute;
  811. wire execute_MMU_RSP_exception;
  812. wire execute_MMU_RSP_refilling;
  813. wire [31:0] execute_SRC_ADD;
  814. (* syn_keep , keep *) wire [31:0] execute_RS2 /* synthesis syn_keep = 1 */ ;
  815. wire [31:0] execute_INSTRUCTION;
  816. wire execute_MEMORY_STORE;
  817. wire execute_MEMORY_ENABLE;
  818. wire execute_ALIGNEMENT_FAULT;
  819. wire decode_MEMORY_ENABLE;
  820. wire decode_FLUSH_ALL;
  821. reg _zz_51_;
  822. reg _zz_51__0;
  823. wire `BranchCtrlEnum_defaultEncoding_type decode_BRANCH_CTRL;
  824. wire `BranchCtrlEnum_defaultEncoding_type _zz_52_;
  825. wire [31:0] decode_INSTRUCTION;
  826. reg [31:0] _zz_53_;
  827. reg [31:0] _zz_54_;
  828. wire [31:0] decode_PC;
  829. wire [31:0] writeBack_PC;
  830. wire [31:0] writeBack_INSTRUCTION;
  831. reg decode_arbitration_haltItself;
  832. reg decode_arbitration_haltByOther;
  833. reg decode_arbitration_removeIt;
  834. wire decode_arbitration_flushIt;
  835. reg decode_arbitration_flushNext;
  836. wire decode_arbitration_isValid;
  837. wire decode_arbitration_isStuck;
  838. wire decode_arbitration_isStuckByOthers;
  839. wire decode_arbitration_isFlushed;
  840. wire decode_arbitration_isMoving;
  841. wire decode_arbitration_isFiring;
  842. reg execute_arbitration_haltItself;
  843. wire execute_arbitration_haltByOther;
  844. reg execute_arbitration_removeIt;
  845. wire execute_arbitration_flushIt;
  846. reg execute_arbitration_flushNext;
  847. reg execute_arbitration_isValid;
  848. wire execute_arbitration_isStuck;
  849. wire execute_arbitration_isStuckByOthers;
  850. wire execute_arbitration_isFlushed;
  851. wire execute_arbitration_isMoving;
  852. wire execute_arbitration_isFiring;
  853. reg memory_arbitration_haltItself;
  854. wire memory_arbitration_haltByOther;
  855. reg memory_arbitration_removeIt;
  856. reg memory_arbitration_flushIt;
  857. reg memory_arbitration_flushNext;
  858. reg memory_arbitration_isValid;
  859. wire memory_arbitration_isStuck;
  860. wire memory_arbitration_isStuckByOthers;
  861. wire memory_arbitration_isFlushed;
  862. wire memory_arbitration_isMoving;
  863. wire memory_arbitration_isFiring;
  864. wire writeBack_arbitration_haltItself;
  865. wire writeBack_arbitration_haltByOther;
  866. reg writeBack_arbitration_removeIt;
  867. wire writeBack_arbitration_flushIt;
  868. reg writeBack_arbitration_flushNext;
  869. reg writeBack_arbitration_isValid;
  870. wire writeBack_arbitration_isStuck;
  871. wire writeBack_arbitration_isStuckByOthers;
  872. wire writeBack_arbitration_isFlushed;
  873. wire writeBack_arbitration_isMoving;
  874. wire writeBack_arbitration_isFiring;
  875. wire [31:0] lastStageInstruction /* verilator public */ ;
  876. wire [31:0] lastStagePc /* verilator public */ ;
  877. wire lastStageIsValid /* verilator public */ ;
  878. wire lastStageIsFiring /* verilator public */ ;
  879. reg IBusCachedPlugin_fetcherHalt;
  880. reg IBusCachedPlugin_incomingInstruction;
  881. wire IBusCachedPlugin_predictionJumpInterface_valid;
  882. (* syn_keep , keep *) wire [31:0] IBusCachedPlugin_predictionJumpInterface_payload /* synthesis syn_keep = 1 */ ;
  883. reg IBusCachedPlugin_decodePrediction_cmd_hadBranch;
  884. wire IBusCachedPlugin_decodePrediction_rsp_wasWrong;
  885. wire IBusCachedPlugin_pcValids_0;
  886. wire IBusCachedPlugin_pcValids_1;
  887. wire IBusCachedPlugin_pcValids_2;
  888. wire IBusCachedPlugin_pcValids_3;
  889. wire IBusCachedPlugin_mmuBus_cmd_isValid;
  890. wire [31:0] IBusCachedPlugin_mmuBus_cmd_virtualAddress;
  891. wire IBusCachedPlugin_mmuBus_cmd_bypassTranslation;
  892. wire [31:0] IBusCachedPlugin_mmuBus_rsp_physicalAddress;
  893. wire IBusCachedPlugin_mmuBus_rsp_isIoAccess;
  894. wire IBusCachedPlugin_mmuBus_rsp_allowRead;
  895. wire IBusCachedPlugin_mmuBus_rsp_allowWrite;
  896. wire IBusCachedPlugin_mmuBus_rsp_allowExecute;
  897. wire IBusCachedPlugin_mmuBus_rsp_exception;
  898. wire IBusCachedPlugin_mmuBus_rsp_refilling;
  899. wire IBusCachedPlugin_mmuBus_end;
  900. wire IBusCachedPlugin_mmuBus_busy;
  901. reg DBusSimplePlugin_memoryExceptionPort_valid;
  902. reg [3:0] DBusSimplePlugin_memoryExceptionPort_payload_code;
  903. wire [31:0] DBusSimplePlugin_memoryExceptionPort_payload_badAddr;
  904. wire DBusSimplePlugin_mmuBus_cmd_isValid;
  905. wire [31:0] DBusSimplePlugin_mmuBus_cmd_virtualAddress;
  906. wire DBusSimplePlugin_mmuBus_cmd_bypassTranslation;
  907. wire [31:0] DBusSimplePlugin_mmuBus_rsp_physicalAddress;
  908. wire DBusSimplePlugin_mmuBus_rsp_isIoAccess;
  909. wire DBusSimplePlugin_mmuBus_rsp_allowRead;
  910. wire DBusSimplePlugin_mmuBus_rsp_allowWrite;
  911. wire DBusSimplePlugin_mmuBus_rsp_allowExecute;
  912. wire DBusSimplePlugin_mmuBus_rsp_exception;
  913. wire DBusSimplePlugin_mmuBus_rsp_refilling;
  914. wire DBusSimplePlugin_mmuBus_end;
  915. wire DBusSimplePlugin_mmuBus_busy;
  916. reg DBusSimplePlugin_redoBranch_valid;
  917. wire [31:0] DBusSimplePlugin_redoBranch_payload;
  918. wire BranchPlugin_jumpInterface_valid;
  919. wire [31:0] BranchPlugin_jumpInterface_payload;
  920. wire CsrPlugin_inWfi /* verilator public */ ;
  921. wire CsrPlugin_thirdPartyWake;
  922. reg CsrPlugin_jumpInterface_valid;
  923. reg [31:0] CsrPlugin_jumpInterface_payload;
  924. wire CsrPlugin_exceptionPendings_0;
  925. wire CsrPlugin_exceptionPendings_1;
  926. wire CsrPlugin_exceptionPendings_2;
  927. wire CsrPlugin_exceptionPendings_3;
  928. wire externalInterrupt;
  929. wire contextSwitching;
  930. reg [1:0] CsrPlugin_privilege;
  931. wire CsrPlugin_forceMachineWire;
  932. reg CsrPlugin_selfException_valid;
  933. reg [3:0] CsrPlugin_selfException_payload_code;
  934. wire [31:0] CsrPlugin_selfException_payload_badAddr;
  935. wire CsrPlugin_allowInterrupts;
  936. wire CsrPlugin_allowException;
  937. wire IBusCachedPlugin_externalFlush;
  938. wire IBusCachedPlugin_jump_pcLoad_valid;
  939. wire [31:0] IBusCachedPlugin_jump_pcLoad_payload;
  940. wire [3:0] _zz_55_;
  941. wire [3:0] _zz_56_;
  942. wire _zz_57_;
  943. wire _zz_58_;
  944. wire _zz_59_;
  945. wire IBusCachedPlugin_fetchPc_output_valid;
  946. wire IBusCachedPlugin_fetchPc_output_ready;
  947. wire [31:0] IBusCachedPlugin_fetchPc_output_payload;
  948. reg [31:0] IBusCachedPlugin_fetchPc_pcReg /* verilator public */ ;
  949. reg IBusCachedPlugin_fetchPc_correction;
  950. reg IBusCachedPlugin_fetchPc_correctionReg;
  951. wire IBusCachedPlugin_fetchPc_corrected;
  952. reg IBusCachedPlugin_fetchPc_pcRegPropagate;
  953. reg IBusCachedPlugin_fetchPc_booted;
  954. reg IBusCachedPlugin_fetchPc_inc;
  955. reg [31:0] IBusCachedPlugin_fetchPc_pc;
  956. wire IBusCachedPlugin_fetchPc_redo_valid;
  957. wire [31:0] IBusCachedPlugin_fetchPc_redo_payload;
  958. reg IBusCachedPlugin_fetchPc_flushed;
  959. reg IBusCachedPlugin_iBusRsp_redoFetch;
  960. wire IBusCachedPlugin_iBusRsp_stages_0_input_valid;
  961. wire IBusCachedPlugin_iBusRsp_stages_0_input_ready;
  962. wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_input_payload;
  963. wire IBusCachedPlugin_iBusRsp_stages_0_output_valid;
  964. wire IBusCachedPlugin_iBusRsp_stages_0_output_ready;
  965. wire [31:0] IBusCachedPlugin_iBusRsp_stages_0_output_payload;
  966. reg IBusCachedPlugin_iBusRsp_stages_0_halt;
  967. wire IBusCachedPlugin_iBusRsp_stages_1_input_valid;
  968. wire IBusCachedPlugin_iBusRsp_stages_1_input_ready;
  969. wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_input_payload;
  970. wire IBusCachedPlugin_iBusRsp_stages_1_output_valid;
  971. wire IBusCachedPlugin_iBusRsp_stages_1_output_ready;
  972. wire [31:0] IBusCachedPlugin_iBusRsp_stages_1_output_payload;
  973. reg IBusCachedPlugin_iBusRsp_stages_1_halt;
  974. wire IBusCachedPlugin_iBusRsp_stages_2_input_valid;
  975. wire IBusCachedPlugin_iBusRsp_stages_2_input_ready;
  976. wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_input_payload;
  977. wire IBusCachedPlugin_iBusRsp_stages_2_output_valid;
  978. wire IBusCachedPlugin_iBusRsp_stages_2_output_ready;
  979. wire [31:0] IBusCachedPlugin_iBusRsp_stages_2_output_payload;
  980. reg IBusCachedPlugin_iBusRsp_stages_2_halt;
  981. wire _zz_60_;
  982. wire _zz_61_;
  983. wire _zz_62_;
  984. wire IBusCachedPlugin_iBusRsp_flush;
  985. wire _zz_63_;
  986. wire _zz_64_;
  987. reg _zz_65_;
  988. wire _zz_66_;
  989. reg _zz_67_;
  990. reg [31:0] _zz_68_;
  991. reg IBusCachedPlugin_iBusRsp_readyForError;
  992. wire IBusCachedPlugin_iBusRsp_output_valid;
  993. wire IBusCachedPlugin_iBusRsp_output_ready;
  994. wire [31:0] IBusCachedPlugin_iBusRsp_output_payload_pc;
  995. wire IBusCachedPlugin_iBusRsp_output_payload_rsp_error;
  996. wire [31:0] IBusCachedPlugin_iBusRsp_output_payload_rsp_inst;
  997. wire IBusCachedPlugin_iBusRsp_output_payload_isRvc;
  998. reg IBusCachedPlugin_injector_nextPcCalc_valids_0;
  999. reg IBusCachedPlugin_injector_nextPcCalc_valids_1;
  1000. reg IBusCachedPlugin_injector_nextPcCalc_valids_2;
  1001. reg IBusCachedPlugin_injector_nextPcCalc_valids_3;
  1002. reg IBusCachedPlugin_injector_nextPcCalc_valids_4;
  1003. wire _zz_69_;
  1004. reg [18:0] _zz_70_;
  1005. wire _zz_71_;
  1006. reg [10:0] _zz_72_;
  1007. wire _zz_73_;
  1008. reg [18:0] _zz_74_;
  1009. reg _zz_75_;
  1010. wire _zz_76_;
  1011. reg [10:0] _zz_77_;
  1012. wire _zz_78_;
  1013. reg [18:0] _zz_79_;
  1014. wire iBus_cmd_valid;
  1015. wire iBus_cmd_ready;
  1016. reg [31:0] iBus_cmd_payload_address;
  1017. wire [2:0] iBus_cmd_payload_size;
  1018. wire iBus_rsp_valid;
  1019. wire [31:0] iBus_rsp_payload_data;
  1020. wire iBus_rsp_payload_error;
  1021. wire [31:0] _zz_80_;
  1022. reg [31:0] IBusCachedPlugin_rspCounter;
  1023. wire IBusCachedPlugin_s0_tightlyCoupledHit;
  1024. reg IBusCachedPlugin_s1_tightlyCoupledHit;
  1025. reg IBusCachedPlugin_s2_tightlyCoupledHit;
  1026. wire IBusCachedPlugin_rsp_iBusRspOutputHalt;
  1027. wire IBusCachedPlugin_rsp_issueDetected;
  1028. reg IBusCachedPlugin_rsp_redoFetch;
  1029. wire dBus_cmd_valid;
  1030. wire dBus_cmd_ready;
  1031. wire dBus_cmd_payload_wr;
  1032. wire [31:0] dBus_cmd_payload_address;
  1033. wire [31:0] dBus_cmd_payload_data;
  1034. wire [1:0] dBus_cmd_payload_size;
  1035. wire dBus_rsp_ready;
  1036. wire dBus_rsp_error;
  1037. wire [31:0] dBus_rsp_data;
  1038. wire _zz_81_;
  1039. reg execute_DBusSimplePlugin_skipCmd;
  1040. reg [31:0] _zz_82_;
  1041. reg [3:0] _zz_83_;
  1042. wire [3:0] execute_DBusSimplePlugin_formalMask;
  1043. reg [31:0] writeBack_DBusSimplePlugin_rspShifted;
  1044. wire _zz_84_;
  1045. reg [31:0] _zz_85_;
  1046. wire _zz_86_;
  1047. reg [31:0] _zz_87_;
  1048. reg [31:0] writeBack_DBusSimplePlugin_rspFormated;
  1049. wire [30:0] _zz_88_;
  1050. wire _zz_89_;
  1051. wire _zz_90_;
  1052. wire _zz_91_;
  1053. wire _zz_92_;
  1054. wire _zz_93_;
  1055. wire `Src2CtrlEnum_defaultEncoding_type _zz_94_;
  1056. wire `ShiftCtrlEnum_defaultEncoding_type _zz_95_;
  1057. wire `AluCtrlEnum_defaultEncoding_type _zz_96_;
  1058. wire `AluBitwiseCtrlEnum_defaultEncoding_type _zz_97_;
  1059. wire `EnvCtrlEnum_defaultEncoding_type _zz_98_;
  1060. wire `Src1CtrlEnum_defaultEncoding_type _zz_99_;
  1061. wire `BranchCtrlEnum_defaultEncoding_type _zz_100_;
  1062. reg RegFilePlugin_shadow_write;
  1063. reg RegFilePlugin_shadow_read;
  1064. reg RegFilePlugin_shadow_clear;
  1065. wire [5:0] decode_RegFilePlugin_regFileReadAddress1;
  1066. wire [5:0] decode_RegFilePlugin_regFileReadAddress2;
  1067. wire [31:0] decode_RegFilePlugin_rs1Data;
  1068. wire [31:0] decode_RegFilePlugin_rs2Data;
  1069. reg lastStageRegFileWrite_valid /* verilator public */ ;
  1070. wire [5:0] lastStageRegFileWrite_payload_address /* verilator public */ ;
  1071. wire [31:0] lastStageRegFileWrite_payload_data /* verilator public */ ;
  1072. reg _zz_101_;
  1073. reg [31:0] execute_IntAluPlugin_bitwise;
  1074. reg [31:0] _zz_102_;
  1075. reg [31:0] _zz_103_;
  1076. wire _zz_104_;
  1077. reg [19:0] _zz_105_;
  1078. wire _zz_106_;
  1079. reg [19:0] _zz_107_;
  1080. reg [31:0] _zz_108_;
  1081. reg [31:0] execute_SrcPlugin_addSub;
  1082. wire execute_SrcPlugin_less;
  1083. wire [4:0] execute_FullBarrelShifterPlugin_amplitude;
  1084. reg [31:0] _zz_109_;
  1085. wire [31:0] execute_FullBarrelShifterPlugin_reversed;
  1086. reg [31:0] _zz_110_;
  1087. reg _zz_111_;
  1088. reg _zz_112_;
  1089. reg _zz_113_;
  1090. reg [4:0] _zz_114_;
  1091. reg [31:0] _zz_115_;
  1092. wire _zz_116_;
  1093. wire _zz_117_;
  1094. wire _zz_118_;
  1095. wire _zz_119_;
  1096. wire _zz_120_;
  1097. wire _zz_121_;
  1098. wire execute_BranchPlugin_eq;
  1099. wire [2:0] _zz_122_;
  1100. reg _zz_123_;
  1101. reg _zz_124_;
  1102. wire _zz_125_;
  1103. reg [19:0] _zz_126_;
  1104. wire _zz_127_;
  1105. reg [10:0] _zz_128_;
  1106. wire _zz_129_;
  1107. reg [18:0] _zz_130_;
  1108. reg _zz_131_;
  1109. wire execute_BranchPlugin_missAlignedTarget;
  1110. reg [31:0] execute_BranchPlugin_branch_src1;
  1111. reg [31:0] execute_BranchPlugin_branch_src2;
  1112. wire _zz_132_;
  1113. reg [19:0] _zz_133_;
  1114. wire _zz_134_;
  1115. reg [10:0] _zz_135_;
  1116. wire _zz_136_;
  1117. reg [18:0] _zz_137_;
  1118. wire [31:0] execute_BranchPlugin_branchAdder;
  1119. wire [1:0] CsrPlugin_misa_base;
  1120. wire [25:0] CsrPlugin_misa_extensions;
  1121. reg [1:0] CsrPlugin_mtvec_mode;
  1122. reg [29:0] CsrPlugin_mtvec_base;
  1123. reg [31:0] CsrPlugin_mepc;
  1124. reg CsrPlugin_mstatus_MIE;
  1125. reg CsrPlugin_mstatus_MPIE;
  1126. reg [1:0] CsrPlugin_mstatus_MPP;
  1127. reg CsrPlugin_mip_MEIP;
  1128. reg CsrPlugin_mip_MTIP;
  1129. reg CsrPlugin_mip_MSIP;
  1130. reg CsrPlugin_mie_MEIE;
  1131. reg CsrPlugin_mie_MTIE;
  1132. reg CsrPlugin_mie_MSIE;
  1133. reg CsrPlugin_mcause_interrupt;
  1134. reg [3:0] CsrPlugin_mcause_exceptionCode;
  1135. reg [31:0] CsrPlugin_mtval;
  1136. reg [63:0] CsrPlugin_mcycle = 64'b0000000000000000000000000000000000000000000000000000000000000000;
  1137. reg [63:0] CsrPlugin_minstret = 64'b0000000000000000000000000000000000000000000000000000000000000000;
  1138. wire _zz_138_;
  1139. wire _zz_139_;
  1140. wire _zz_140_;
  1141. wire CsrPlugin_exceptionPortCtrl_exceptionValids_decode;
  1142. reg CsrPlugin_exceptionPortCtrl_exceptionValids_execute;
  1143. reg CsrPlugin_exceptionPortCtrl_exceptionValids_memory;
  1144. reg CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack;
  1145. wire CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode;
  1146. reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute;
  1147. reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory;
  1148. reg CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack;
  1149. reg [3:0] CsrPlugin_exceptionPortCtrl_exceptionContext_code;
  1150. reg [31:0] CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr;
  1151. wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped;
  1152. wire [1:0] CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege;
  1153. reg CsrPlugin_interrupt_valid;
  1154. reg [3:0] CsrPlugin_interrupt_code /* verilator public */ ;
  1155. reg [1:0] CsrPlugin_interrupt_targetPrivilege;
  1156. wire CsrPlugin_exception;
  1157. wire CsrPlugin_lastStageWasWfi;
  1158. reg CsrPlugin_pipelineLiberator_pcValids_0;
  1159. reg CsrPlugin_pipelineLiberator_pcValids_1;
  1160. reg CsrPlugin_pipelineLiberator_pcValids_2;
  1161. wire CsrPlugin_pipelineLiberator_active;
  1162. reg CsrPlugin_pipelineLiberator_done;
  1163. wire CsrPlugin_interruptJump /* verilator public */ ;
  1164. reg CsrPlugin_hadException;
  1165. reg [1:0] CsrPlugin_targetPrivilege;
  1166. reg [3:0] CsrPlugin_trapCause;
  1167. reg [1:0] CsrPlugin_xtvec_mode;
  1168. reg [29:0] CsrPlugin_xtvec_base;
  1169. reg execute_CsrPlugin_wfiWake;
  1170. wire execute_CsrPlugin_blockedBySideEffects;
  1171. reg execute_CsrPlugin_illegalAccess;
  1172. reg execute_CsrPlugin_illegalInstruction;
  1173. wire [31:0] execute_CsrPlugin_readData;
  1174. wire execute_CsrPlugin_writeInstruction;
  1175. wire execute_CsrPlugin_readInstruction;
  1176. wire execute_CsrPlugin_writeEnable;
  1177. wire execute_CsrPlugin_readEnable;
  1178. wire [31:0] execute_CsrPlugin_readToWriteData;
  1179. reg [31:0] execute_CsrPlugin_writeData;
  1180. wire [11:0] execute_CsrPlugin_csrAddress;
  1181. reg execute_MulPlugin_aSigned;
  1182. reg execute_MulPlugin_bSigned;
  1183. wire [31:0] execute_MulPlugin_a;
  1184. wire [31:0] execute_MulPlugin_b;
  1185. wire [15:0] execute_MulPlugin_aULow;
  1186. wire [15:0] execute_MulPlugin_bULow;
  1187. wire [16:0] execute_MulPlugin_aSLow;
  1188. wire [16:0] execute_MulPlugin_bSLow;
  1189. wire [16:0] execute_MulPlugin_aHigh;
  1190. wire [16:0] execute_MulPlugin_bHigh;
  1191. wire [65:0] writeBack_MulPlugin_result;
  1192. reg [32:0] memory_DivPlugin_rs1;
  1193. reg [31:0] memory_DivPlugin_rs2;
  1194. reg [64:0] memory_DivPlugin_accumulator;
  1195. wire memory_DivPlugin_frontendOk;
  1196. reg memory_DivPlugin_div_needRevert;
  1197. reg memory_DivPlugin_div_counter_willIncrement;
  1198. reg memory_DivPlugin_div_counter_willClear;
  1199. reg [5:0] memory_DivPlugin_div_counter_valueNext;
  1200. reg [5:0] memory_DivPlugin_div_counter_value;
  1201. wire memory_DivPlugin_div_counter_willOverflowIfInc;
  1202. wire memory_DivPlugin_div_counter_willOverflow;
  1203. reg memory_DivPlugin_div_done;
  1204. reg [31:0] memory_DivPlugin_div_result;
  1205. wire [31:0] _zz_141_;
  1206. wire [32:0] memory_DivPlugin_div_stage_0_remainderShifted;
  1207. wire [32:0] memory_DivPlugin_div_stage_0_remainderMinusDenominator;
  1208. wire [31:0] memory_DivPlugin_div_stage_0_outRemainder;
  1209. wire [31:0] memory_DivPlugin_div_stage_0_outNumerator;
  1210. wire [31:0] _zz_142_;
  1211. wire _zz_143_;
  1212. wire _zz_144_;
  1213. reg [32:0] _zz_145_;
  1214. reg [31:0] externalInterruptArray_regNext;
  1215. reg [31:0] _zz_146_;
  1216. wire [31:0] _zz_147_;
  1217. reg [33:0] execute_to_memory_MUL_HH;
  1218. reg [33:0] memory_to_writeBack_MUL_HH;
  1219. reg [31:0] decode_to_execute_RS1;
  1220. reg decode_to_execute_PREDICTION_HAD_BRANCHED2;
  1221. reg decode_to_execute_MEMORY_STORE;
  1222. reg execute_to_memory_MEMORY_STORE;
  1223. reg memory_to_writeBack_MEMORY_STORE;
  1224. reg decode_to_execute_MEMORY_ENABLE;
  1225. reg execute_to_memory_MEMORY_ENABLE;
  1226. reg memory_to_writeBack_MEMORY_ENABLE;
  1227. reg decode_to_execute_IS_MUL;
  1228. reg execute_to_memory_IS_MUL;
  1229. reg memory_to_writeBack_IS_MUL;
  1230. reg decode_to_execute_CSR_READ_OPCODE;
  1231. reg decode_to_execute_SRC2_FORCE_ZERO;
  1232. reg [31:0] execute_to_memory_MUL_LL;
  1233. reg [31:0] execute_to_memory_MMU_RSP_physicalAddress;
  1234. reg execute_to_memory_MMU_RSP_isIoAccess;
  1235. reg execute_to_memory_MMU_RSP_allowRead;
  1236. reg execute_to_memory_MMU_RSP_allowWrite;
  1237. reg execute_to_memory_MMU_RSP_allowExecute;
  1238. reg execute_to_memory_MMU_RSP_exception;
  1239. reg execute_to_memory_MMU_RSP_refilling;
  1240. reg decode_to_execute_SRC_USE_SUB_LESS;
  1241. reg `BranchCtrlEnum_defaultEncoding_type decode_to_execute_BRANCH_CTRL;
  1242. reg [31:0] decode_to_execute_INSTRUCTION;
  1243. reg [31:0] execute_to_memory_INSTRUCTION;
  1244. reg [31:0] memory_to_writeBack_INSTRUCTION;
  1245. reg [31:0] execute_to_memory_SHIFT_RIGHT;
  1246. reg [31:0] decode_to_execute_FORMAL_PC_NEXT;
  1247. reg [31:0] execute_to_memory_FORMAL_PC_NEXT;
  1248. reg [31:0] memory_to_writeBack_FORMAL_PC_NEXT;
  1249. reg `ShiftCtrlEnum_defaultEncoding_type decode_to_execute_SHIFT_CTRL;
  1250. reg `ShiftCtrlEnum_defaultEncoding_type execute_to_memory_SHIFT_CTRL;
  1251. reg `AluBitwiseCtrlEnum_defaultEncoding_type decode_to_execute_ALU_BITWISE_CTRL;
  1252. reg decode_to_execute_IS_DIV;
  1253. reg execute_to_memory_IS_DIV;
  1254. reg [33:0] execute_to_memory_MUL_HL;
  1255. reg decode_to_execute_REGFILE_WRITE_VALID;
  1256. reg execute_to_memory_REGFILE_WRITE_VALID;
  1257. reg memory_to_writeBack_REGFILE_WRITE_VALID;
  1258. reg [31:0] decode_to_execute_PC;
  1259. reg [31:0] execute_to_memory_PC;
  1260. reg [31:0] memory_to_writeBack_PC;
  1261. reg decode_to_execute_CSR_WRITE_OPCODE;
  1262. reg decode_to_execute_SRC_LESS_UNSIGNED;
  1263. reg `AluCtrlEnum_defaultEncoding_type decode_to_execute_ALU_CTRL;
  1264. reg decode_to_execute_BYPASSABLE_MEMORY_STAGE;
  1265. reg execute_to_memory_BYPASSABLE_MEMORY_STAGE;
  1266. reg [31:0] execute_to_memory_REGFILE_WRITE_DATA;
  1267. reg [31:0] memory_to_writeBack_REGFILE_WRITE_DATA;
  1268. reg decode_to_execute_IS_CSR;
  1269. reg [31:0] execute_to_memory_BRANCH_CALC;
  1270. reg `EnvCtrlEnum_defaultEncoding_type decode_to_execute_ENV_CTRL;
  1271. reg `EnvCtrlEnum_defaultEncoding_type execute_to_memory_ENV_CTRL;
  1272. reg `EnvCtrlEnum_defaultEncoding_type memory_to_writeBack_ENV_CTRL;
  1273. reg decode_to_execute_BYPASSABLE_EXECUTE_STAGE;
  1274. reg [51:0] memory_to_writeBack_MUL_LOW;
  1275. reg execute_to_memory_BRANCH_DO;
  1276. reg execute_to_memory_MMU_FAULT;
  1277. reg [31:0] decode_to_execute_RS2;
  1278. reg `Src1CtrlEnum_defaultEncoding_type decode_to_execute_SRC1_CTRL;
  1279. reg [1:0] execute_to_memory_MEMORY_ADDRESS_LOW;
  1280. reg [1:0] memory_to_writeBack_MEMORY_ADDRESS_LOW;
  1281. reg decode_to_execute_IS_RS1_SIGNED;
  1282. reg decode_to_execute_IS_RS2_SIGNED;
  1283. reg `Src2CtrlEnum_defaultEncoding_type decode_to_execute_SRC2_CTRL;
  1284. reg [33:0] execute_to_memory_MUL_LH;
  1285. reg [31:0] memory_to_writeBack_MEMORY_READ_DATA;
  1286. reg execute_CsrPlugin_csr_1984;
  1287. reg execute_CsrPlugin_csr_768;
  1288. reg execute_CsrPlugin_csr_836;
  1289. reg execute_CsrPlugin_csr_772;
  1290. reg execute_CsrPlugin_csr_773;
  1291. reg execute_CsrPlugin_csr_833;
  1292. reg execute_CsrPlugin_csr_834;
  1293. reg execute_CsrPlugin_csr_835;
  1294. reg execute_CsrPlugin_csr_3008;
  1295. reg execute_CsrPlugin_csr_4032;
  1296. reg [31:0] _zz_148_;
  1297. reg [31:0] _zz_149_;
  1298. reg [31:0] _zz_150_;
  1299. reg [31:0] _zz_151_;
  1300. reg [31:0] _zz_152_;
  1301. reg [31:0] _zz_153_;
  1302. reg [31:0] _zz_154_;
  1303. reg [31:0] _zz_155_;
  1304. wire dBus_cmd_halfPipe_valid;
  1305. wire dBus_cmd_halfPipe_ready;
  1306. wire dBus_cmd_halfPipe_payload_wr;
  1307. wire [31:0] dBus_cmd_halfPipe_payload_address;
  1308. wire [31:0] dBus_cmd_halfPipe_payload_data;
  1309. wire [1:0] dBus_cmd_halfPipe_payload_size;
  1310. reg dBus_cmd_halfPipe_regs_valid;
  1311. reg dBus_cmd_halfPipe_regs_ready;
  1312. reg dBus_cmd_halfPipe_regs_payload_wr;
  1313. reg [31:0] dBus_cmd_halfPipe_regs_payload_address;
  1314. reg [31:0] dBus_cmd_halfPipe_regs_payload_data;
  1315. reg [1:0] dBus_cmd_halfPipe_regs_payload_size;
  1316. reg [3:0] _zz_156_;
  1317. `ifndef SYNTHESIS
  1318. reg [23:0] decode_SRC2_CTRL_string;
  1319. reg [23:0] _zz_1__string;
  1320. reg [23:0] _zz_2__string;
  1321. reg [23:0] _zz_3__string;
  1322. reg [95:0] decode_SRC1_CTRL_string;
  1323. reg [95:0] _zz_4__string;
  1324. reg [95:0] _zz_5__string;
  1325. reg [95:0] _zz_6__string;
  1326. reg [39:0] _zz_7__string;
  1327. reg [39:0] _zz_8__string;
  1328. reg [39:0] _zz_9__string;
  1329. reg [39:0] _zz_10__string;
  1330. reg [39:0] decode_ENV_CTRL_string;
  1331. reg [39:0] _zz_11__string;
  1332. reg [39:0] _zz_12__string;
  1333. reg [39:0] _zz_13__string;
  1334. reg [63:0] decode_ALU_CTRL_string;
  1335. reg [63:0] _zz_14__string;
  1336. reg [63:0] _zz_15__string;
  1337. reg [63:0] _zz_16__string;
  1338. reg [39:0] decode_ALU_BITWISE_CTRL_string;
  1339. reg [39:0] _zz_17__string;
  1340. reg [39:0] _zz_18__string;
  1341. reg [39:0] _zz_19__string;
  1342. reg [71:0] _zz_20__string;
  1343. reg [71:0] _zz_21__string;
  1344. reg [71:0] decode_SHIFT_CTRL_string;
  1345. reg [71:0] _zz_22__string;
  1346. reg [71:0] _zz_23__string;
  1347. reg [71:0] _zz_24__string;
  1348. reg [31:0] _zz_25__string;
  1349. reg [31:0] _zz_26__string;
  1350. reg [39:0] memory_ENV_CTRL_string;
  1351. reg [39:0] _zz_27__string;
  1352. reg [39:0] execute_ENV_CTRL_string;
  1353. reg [39:0] _zz_28__string;
  1354. reg [39:0] writeBack_ENV_CTRL_string;
  1355. reg [39:0] _zz_29__string;
  1356. reg [31:0] execute_BRANCH_CTRL_string;
  1357. reg [31:0] _zz_30__string;
  1358. reg [71:0] memory_SHIFT_CTRL_string;
  1359. reg [71:0] _zz_33__string;
  1360. reg [71:0] execute_SHIFT_CTRL_string;
  1361. reg [71:0] _zz_34__string;
  1362. reg [23:0] execute_SRC2_CTRL_string;
  1363. reg [23:0] _zz_36__string;
  1364. reg [95:0] execute_SRC1_CTRL_string;
  1365. reg [95:0] _zz_37__string;
  1366. reg [63:0] execute_ALU_CTRL_string;
  1367. reg [63:0] _zz_38__string;
  1368. reg [39:0] execute_ALU_BITWISE_CTRL_string;
  1369. reg [39:0] _zz_39__string;
  1370. reg [31:0] _zz_43__string;
  1371. reg [95:0] _zz_44__string;
  1372. reg [39:0] _zz_45__string;
  1373. reg [39:0] _zz_46__string;
  1374. reg [63:0] _zz_47__string;
  1375. reg [71:0] _zz_48__string;
  1376. reg [23:0] _zz_49__string;
  1377. reg [31:0] decode_BRANCH_CTRL_string;
  1378. reg [31:0] _zz_52__string;
  1379. reg [23:0] _zz_94__string;
  1380. reg [71:0] _zz_95__string;
  1381. reg [63:0] _zz_96__string;
  1382. reg [39:0] _zz_97__string;
  1383. reg [39:0] _zz_98__string;
  1384. reg [95:0] _zz_99__string;
  1385. reg [31:0] _zz_100__string;
  1386. reg [31:0] decode_to_execute_BRANCH_CTRL_string;
  1387. reg [71:0] decode_to_execute_SHIFT_CTRL_string;
  1388. reg [71:0] execute_to_memory_SHIFT_CTRL_string;
  1389. reg [39:0] decode_to_execute_ALU_BITWISE_CTRL_string;
  1390. reg [63:0] decode_to_execute_ALU_CTRL_string;
  1391. reg [39:0] decode_to_execute_ENV_CTRL_string;
  1392. reg [39:0] execute_to_memory_ENV_CTRL_string;
  1393. reg [39:0] memory_to_writeBack_ENV_CTRL_string;
  1394. reg [95:0] decode_to_execute_SRC1_CTRL_string;
  1395. reg [23:0] decode_to_execute_SRC2_CTRL_string;
  1396. `endif
  1397. reg [31:0] RegFilePlugin_regFile [0:63] /* verilator public */ ;
  1398. assign _zz_168_ = (execute_arbitration_isValid && execute_IS_CSR);
  1399. assign _zz_169_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID);
  1400. assign _zz_170_ = 1'b1;
  1401. assign _zz_171_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID);
  1402. assign _zz_172_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID);
  1403. assign _zz_173_ = (memory_arbitration_isValid && memory_IS_DIV);
  1404. assign _zz_174_ = ((_zz_161_ && IBusCachedPlugin_cache_io_cpu_decode_cacheMiss) && (! _zz_51__0));
  1405. assign _zz_175_ = ((_zz_161_ && IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling) && (! IBusCachedPlugin_rsp_issueDetected));
  1406. assign _zz_176_ = (CsrPlugin_hadException || CsrPlugin_interruptJump);
  1407. assign _zz_177_ = (writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET));
  1408. assign _zz_178_ = writeBack_INSTRUCTION[29 : 28];
  1409. assign _zz_179_ = (! ((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (1'b1 || (! memory_arbitration_isStuckByOthers))));
  1410. assign _zz_180_ = (writeBack_arbitration_isValid && writeBack_REGFILE_WRITE_VALID);
  1411. assign _zz_181_ = (1'b0 || (! 1'b1));
  1412. assign _zz_182_ = (memory_arbitration_isValid && memory_REGFILE_WRITE_VALID);
  1413. assign _zz_183_ = (1'b0 || (! memory_BYPASSABLE_MEMORY_STAGE));
  1414. assign _zz_184_ = (execute_arbitration_isValid && execute_REGFILE_WRITE_VALID);
  1415. assign _zz_185_ = (1'b0 || (! execute_BYPASSABLE_EXECUTE_STAGE));
  1416. assign _zz_186_ = (execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_ECALL));
  1417. assign _zz_187_ = execute_INSTRUCTION[13 : 12];
  1418. assign _zz_188_ = (memory_DivPlugin_frontendOk && (! memory_DivPlugin_div_done));
  1419. assign _zz_189_ = (! memory_arbitration_isStuck);
  1420. assign _zz_190_ = (CsrPlugin_mstatus_MIE || (CsrPlugin_privilege < (2'b11)));
  1421. assign _zz_191_ = ((_zz_138_ && 1'b1) && (! 1'b0));
  1422. assign _zz_192_ = ((_zz_139_ && 1'b1) && (! 1'b0));
  1423. assign _zz_193_ = ((_zz_140_ && 1'b1) && (! 1'b0));
  1424. assign _zz_194_ = (! dBus_cmd_halfPipe_regs_valid);
  1425. assign _zz_195_ = writeBack_INSTRUCTION[13 : 12];
  1426. assign _zz_196_ = execute_INSTRUCTION[13];
  1427. assign _zz_197_ = writeBack_INSTRUCTION[13 : 12];
  1428. assign _zz_198_ = _zz_88_[16 : 16];
  1429. assign _zz_199_ = _zz_88_[30 : 30];
  1430. assign _zz_200_ = ($signed(_zz_201_) + $signed(_zz_206_));
  1431. assign _zz_201_ = ($signed(_zz_202_) + $signed(_zz_204_));
  1432. assign _zz_202_ = 52'h0;
  1433. assign _zz_203_ = {1'b0,memory_MUL_LL};
  1434. assign _zz_204_ = {{19{_zz_203_[32]}}, _zz_203_};
  1435. assign _zz_205_ = ({16'd0,memory_MUL_LH} <<< 16);
  1436. assign _zz_206_ = {{2{_zz_205_[49]}}, _zz_205_};
  1437. assign _zz_207_ = ({16'd0,memory_MUL_HL} <<< 16);
  1438. assign _zz_208_ = {{2{_zz_207_[49]}}, _zz_207_};
  1439. assign _zz_209_ = _zz_88_[15 : 15];
  1440. assign _zz_210_ = _zz_88_[13 : 13];
  1441. assign _zz_211_ = _zz_88_[5 : 5];
  1442. assign _zz_212_ = _zz_88_[20 : 20];
  1443. assign _zz_213_ = _zz_88_[17 : 17];
  1444. assign _zz_214_ = ($signed(_zz_216_) >>> execute_FullBarrelShifterPlugin_amplitude);
  1445. assign _zz_215_ = _zz_214_[31 : 0];
  1446. assign _zz_216_ = {((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SRA_1) && execute_FullBarrelShifterPlugin_reversed[31]),execute_FullBarrelShifterPlugin_reversed};
  1447. assign _zz_217_ = _zz_88_[22 : 22];
  1448. assign _zz_218_ = _zz_88_[29 : 29];
  1449. assign _zz_219_ = _zz_88_[19 : 19];
  1450. assign _zz_220_ = _zz_88_[18 : 18];
  1451. assign _zz_221_ = _zz_88_[21 : 21];
  1452. assign _zz_222_ = _zz_88_[10 : 10];
  1453. assign _zz_223_ = _zz_88_[25 : 25];
  1454. assign _zz_224_ = _zz_88_[2 : 2];
  1455. assign _zz_225_ = _zz_88_[14 : 14];
  1456. assign _zz_226_ = (_zz_55_ - (4'b0001));
  1457. assign _zz_227_ = {IBusCachedPlugin_fetchPc_inc,(2'b00)};
  1458. assign _zz_228_ = {29'd0, _zz_227_};
  1459. assign _zz_229_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]};
  1460. assign _zz_230_ = {{_zz_70_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0};
  1461. assign _zz_231_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]};
  1462. assign _zz_232_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]};
  1463. assign _zz_233_ = {{_zz_72_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0};
  1464. assign _zz_234_ = {{_zz_74_,{{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0};
  1465. assign _zz_235_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]};
  1466. assign _zz_236_ = {{{decode_INSTRUCTION[31],decode_INSTRUCTION[7]},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]};
  1467. assign _zz_237_ = execute_SRC_LESS;
  1468. assign _zz_238_ = (3'b100);
  1469. assign _zz_239_ = execute_INSTRUCTION[19 : 15];
  1470. assign _zz_240_ = execute_INSTRUCTION[31 : 20];
  1471. assign _zz_241_ = {execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]};
  1472. assign _zz_242_ = ($signed(_zz_243_) + $signed(_zz_246_));
  1473. assign _zz_243_ = ($signed(_zz_244_) + $signed(_zz_245_));
  1474. assign _zz_244_ = execute_SRC1;
  1475. assign _zz_245_ = (execute_SRC_USE_SUB_LESS ? (~ execute_SRC2) : execute_SRC2);
  1476. assign _zz_246_ = (execute_SRC_USE_SUB_LESS ? _zz_247_ : _zz_248_);
  1477. assign _zz_247_ = 32'h00000001;
  1478. assign _zz_248_ = 32'h0;
  1479. assign _zz_249_ = execute_INSTRUCTION[31 : 20];
  1480. assign _zz_250_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]};
  1481. assign _zz_251_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]};
  1482. assign _zz_252_ = {_zz_126_,execute_INSTRUCTION[31 : 20]};
  1483. assign _zz_253_ = {{_zz_128_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0};
  1484. assign _zz_254_ = {{_zz_130_,{{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0};
  1485. assign _zz_255_ = execute_INSTRUCTION[31 : 20];
  1486. assign _zz_256_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]};
  1487. assign _zz_257_ = {{{execute_INSTRUCTION[31],execute_INSTRUCTION[7]},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]};
  1488. assign _zz_258_ = (3'b100);
  1489. assign _zz_259_ = {{14{writeBack_MUL_LOW[51]}}, writeBack_MUL_LOW};
  1490. assign _zz_260_ = ({32'd0,writeBack_MUL_HH} <<< 32);
  1491. assign _zz_261_ = writeBack_MUL_LOW[31 : 0];
  1492. assign _zz_262_ = writeBack_MulPlugin_result[63 : 32];
  1493. assign _zz_263_ = memory_DivPlugin_div_counter_willIncrement;
  1494. assign _zz_264_ = {5'd0, _zz_263_};
  1495. assign _zz_265_ = {1'd0, memory_DivPlugin_rs2};
  1496. assign _zz_266_ = memory_DivPlugin_div_stage_0_remainderMinusDenominator[31:0];
  1497. assign _zz_267_ = memory_DivPlugin_div_stage_0_remainderShifted[31:0];
  1498. assign _zz_268_ = {_zz_141_,(! memory_DivPlugin_div_stage_0_remainderMinusDenominator[32])};
  1499. assign _zz_269_ = _zz_270_;
  1500. assign _zz_270_ = _zz_271_;
  1501. assign _zz_271_ = ({1'b0,(memory_DivPlugin_div_needRevert ? (~ _zz_142_) : _zz_142_)} + _zz_273_);
  1502. assign _zz_272_ = memory_DivPlugin_div_needRevert;
  1503. assign _zz_273_ = {32'd0, _zz_272_};
  1504. assign _zz_274_ = _zz_144_;
  1505. assign _zz_275_ = {32'd0, _zz_274_};
  1506. assign _zz_276_ = _zz_143_;
  1507. assign _zz_277_ = {31'd0, _zz_276_};
  1508. assign _zz_278_ = execute_CsrPlugin_writeData[2 : 2];
  1509. assign _zz_279_ = execute_CsrPlugin_writeData[1 : 1];
  1510. assign _zz_280_ = execute_CsrPlugin_writeData[0 : 0];
  1511. assign _zz_281_ = execute_CsrPlugin_writeData[7 : 7];
  1512. assign _zz_282_ = execute_CsrPlugin_writeData[3 : 3];
  1513. assign _zz_283_ = execute_CsrPlugin_writeData[3 : 3];
  1514. assign _zz_284_ = execute_CsrPlugin_writeData[11 : 11];
  1515. assign _zz_285_ = execute_CsrPlugin_writeData[7 : 7];
  1516. assign _zz_286_ = execute_CsrPlugin_writeData[3 : 3];
  1517. assign _zz_287_ = ({3'd0,_zz_156_} <<< dBus_cmd_halfPipe_payload_address[1 : 0]);
  1518. assign _zz_288_ = 1'b1;
  1519. assign _zz_289_ = 1'b1;
  1520. assign _zz_290_ = {_zz_59_,_zz_58_};
  1521. assign _zz_291_ = decode_INSTRUCTION[31];
  1522. assign _zz_292_ = decode_INSTRUCTION[31];
  1523. assign _zz_293_ = decode_INSTRUCTION[7];
  1524. assign _zz_294_ = (decode_INSTRUCTION & 32'h00000020);
  1525. assign _zz_295_ = 32'h00000020;
  1526. assign _zz_296_ = ((decode_INSTRUCTION & _zz_303_) == 32'h00000040);
  1527. assign _zz_297_ = ((decode_INSTRUCTION & _zz_304_) == 32'h00000040);
  1528. assign _zz_298_ = {_zz_93_,(_zz_305_ == _zz_306_)};
  1529. assign _zz_299_ = (2'b00);
  1530. assign _zz_300_ = ((_zz_307_ == _zz_308_) != (1'b0));
  1531. assign _zz_301_ = ({_zz_309_,_zz_310_} != 6'h0);
  1532. assign _zz_302_ = {(_zz_311_ != _zz_312_),{_zz_313_,{_zz_314_,_zz_315_}}};
  1533. assign _zz_303_ = 32'h00000050;
  1534. assign _zz_304_ = 32'h00403040;
  1535. assign _zz_305_ = (decode_INSTRUCTION & 32'h0000001c);
  1536. assign _zz_306_ = 32'h00000004;
  1537. assign _zz_307_ = (decode_INSTRUCTION & 32'h00000058);
  1538. assign _zz_308_ = 32'h00000040;
  1539. assign _zz_309_ = _zz_93_;
  1540. assign _zz_310_ = {(_zz_316_ == _zz_317_),{_zz_318_,{_zz_319_,_zz_320_}}};
  1541. assign _zz_311_ = {(_zz_321_ == _zz_322_),_zz_92_};
  1542. assign _zz_312_ = (2'b00);
  1543. assign _zz_313_ = ({_zz_323_,_zz_92_} != (2'b00));
  1544. assign _zz_314_ = (_zz_324_ != (1'b0));
  1545. assign _zz_315_ = {(_zz_325_ != _zz_326_),{_zz_327_,{_zz_328_,_zz_329_}}};
  1546. assign _zz_316_ = (decode_INSTRUCTION & 32'h00001010);
  1547. assign _zz_317_ = 32'h00001010;
  1548. assign _zz_318_ = ((decode_INSTRUCTION & _zz_330_) == 32'h00002010);
  1549. assign _zz_319_ = (_zz_331_ == _zz_332_);
  1550. assign _zz_320_ = {_zz_333_,_zz_334_};
  1551. assign _zz_321_ = (decode_INSTRUCTION & 32'h00000014);
  1552. assign _zz_322_ = 32'h00000004;
  1553. assign _zz_323_ = ((decode_INSTRUCTION & _zz_335_) == 32'h00000004);
  1554. assign _zz_324_ = ((decode_INSTRUCTION & _zz_336_) == 32'h02000030);
  1555. assign _zz_325_ = {_zz_337_,{_zz_338_,_zz_339_}};
  1556. assign _zz_326_ = (3'b000);
  1557. assign _zz_327_ = ({_zz_340_,_zz_341_} != (2'b00));
  1558. assign _zz_328_ = (_zz_342_ != _zz_343_);
  1559. assign _zz_329_ = {_zz_344_,{_zz_345_,_zz_346_}};
  1560. assign _zz_330_ = 32'h00002010;
  1561. assign _zz_331_ = (decode_INSTRUCTION & 32'h00000050);
  1562. assign _zz_332_ = 32'h00000010;
  1563. assign _zz_333_ = ((decode_INSTRUCTION & _zz_347_) == 32'h00000004);
  1564. assign _zz_334_ = ((decode_INSTRUCTION & _zz_348_) == 32'h0);
  1565. assign _zz_335_ = 32'h00000044;
  1566. assign _zz_336_ = 32'h02004074;
  1567. assign _zz_337_ = ((decode_INSTRUCTION & _zz_349_) == 32'h00000040);
  1568. assign _zz_338_ = (_zz_350_ == _zz_351_);
  1569. assign _zz_339_ = (_zz_352_ == _zz_353_);
  1570. assign _zz_340_ = (_zz_354_ == _zz_355_);
  1571. assign _zz_341_ = (_zz_356_ == _zz_357_);
  1572. assign _zz_342_ = {_zz_358_,_zz_359_};
  1573. assign _zz_343_ = (2'b00);
  1574. assign _zz_344_ = ({_zz_360_,_zz_361_} != (4'b0000));
  1575. assign _zz_345_ = (_zz_362_ != _zz_363_);
  1576. assign _zz_346_ = {_zz_364_,{_zz_365_,_zz_366_}};
  1577. assign _zz_347_ = 32'h0000000c;
  1578. assign _zz_348_ = 32'h00000028;
  1579. assign _zz_349_ = 32'h00000044;
  1580. assign _zz_350_ = (decode_INSTRUCTION & 32'h00002014);
  1581. assign _zz_351_ = 32'h00002010;
  1582. assign _zz_352_ = (decode_INSTRUCTION & 32'h40000034);
  1583. assign _zz_353_ = 32'h40000030;
  1584. assign _zz_354_ = (decode_INSTRUCTION & 32'h00002010);
  1585. assign _zz_355_ = 32'h00002000;
  1586. assign _zz_356_ = (decode_INSTRUCTION & 32'h00005000);
  1587. assign _zz_357_ = 32'h00001000;
  1588. assign _zz_358_ = ((decode_INSTRUCTION & _zz_367_) == 32'h00000020);
  1589. assign _zz_359_ = ((decode_INSTRUCTION & _zz_368_) == 32'h00000020);
  1590. assign _zz_360_ = (_zz_369_ == _zz_370_);
  1591. assign _zz_361_ = {_zz_371_,{_zz_372_,_zz_373_}};
  1592. assign _zz_362_ = (_zz_374_ == _zz_375_);
  1593. assign _zz_363_ = (1'b0);
  1594. assign _zz_364_ = (_zz_91_ != (1'b0));
  1595. assign _zz_365_ = (_zz_376_ != _zz_377_);
  1596. assign _zz_366_ = {_zz_378_,{_zz_379_,_zz_380_}};
  1597. assign _zz_367_ = 32'h00000034;
  1598. assign _zz_368_ = 32'h00000064;
  1599. assign _zz_369_ = (decode_INSTRUCTION & 32'h00000044);
  1600. assign _zz_370_ = 32'h0;
  1601. assign _zz_371_ = ((decode_INSTRUCTION & 32'h00000018) == 32'h0);
  1602. assign _zz_372_ = _zz_90_;
  1603. assign _zz_373_ = ((decode_INSTRUCTION & _zz_381_) == 32'h00001000);
  1604. assign _zz_374_ = (decode_INSTRUCTION & 32'h02004064);
  1605. assign _zz_375_ = 32'h02004020;
  1606. assign _zz_376_ = {_zz_89_,{_zz_382_,{_zz_383_,_zz_384_}}};
  1607. assign _zz_377_ = 5'h0;
  1608. assign _zz_378_ = ((_zz_385_ == _zz_386_) != (1'b0));
  1609. assign _zz_379_ = ({_zz_387_,_zz_388_} != (2'b00));
  1610. assign _zz_380_ = {(_zz_389_ != _zz_390_),{_zz_391_,{_zz_392_,_zz_393_}}};
  1611. assign _zz_381_ = 32'h00005004;
  1612. assign _zz_382_ = ((decode_INSTRUCTION & 32'h00002030) == 32'h00002010);
  1613. assign _zz_383_ = ((decode_INSTRUCTION & _zz_394_) == 32'h00000010);
  1614. assign _zz_384_ = {(_zz_395_ == _zz_396_),(_zz_397_ == _zz_398_)};
  1615. assign _zz_385_ = (decode_INSTRUCTION & 32'h00001048);
  1616. assign _zz_386_ = 32'h00001008;
  1617. assign _zz_387_ = ((decode_INSTRUCTION & _zz_399_) == 32'h00001050);
  1618. assign _zz_388_ = ((decode_INSTRUCTION & _zz_400_) == 32'h00002050);
  1619. assign _zz_389_ = ((decode_INSTRUCTION & _zz_401_) == 32'h00000050);
  1620. assign _zz_390_ = (1'b0);
  1621. assign _zz_391_ = ((_zz_402_ == _zz_403_) != (1'b0));
  1622. assign _zz_392_ = (_zz_404_ != (1'b0));
  1623. assign _zz_393_ = {(_zz_405_ != _zz_406_),{_zz_407_,{_zz_408_,_zz_409_}}};
  1624. assign _zz_394_ = 32'h00001030;
  1625. assign _zz_395_ = (decode_INSTRUCTION & 32'h02002060);
  1626. assign _zz_396_ = 32'h00002020;
  1627. assign _zz_397_ = (decode_INSTRUCTION & 32'h02003020);
  1628. assign _zz_398_ = 32'h00000020;
  1629. assign _zz_399_ = 32'h00001050;
  1630. assign _zz_400_ = 32'h00002050;
  1631. assign _zz_401_ = 32'h10003050;
  1632. assign _zz_402_ = (decode_INSTRUCTION & 32'h10403050);
  1633. assign _zz_403_ = 32'h10000050;
  1634. assign _zz_404_ = ((decode_INSTRUCTION & 32'h00000064) == 32'h00000024);
  1635. assign _zz_405_ = ((decode_INSTRUCTION & 32'h00001000) == 32'h00001000);
  1636. assign _zz_406_ = (1'b0);
  1637. assign _zz_407_ = (((decode_INSTRUCTION & _zz_410_) == 32'h00002000) != (1'b0));
  1638. assign _zz_408_ = ((_zz_411_ == _zz_412_) != (1'b0));
  1639. assign _zz_409_ = {(_zz_90_ != (1'b0)),{(_zz_413_ != _zz_414_),{_zz_415_,{_zz_416_,_zz_417_}}}};
  1640. assign _zz_410_ = 32'h00003000;
  1641. assign _zz_411_ = (decode_INSTRUCTION & 32'h00004004);
  1642. assign _zz_412_ = 32'h00004000;
  1643. assign _zz_413_ = {((decode_INSTRUCTION & _zz_418_) == 32'h00000040),{_zz_89_,{_zz_419_,{_zz_420_,_zz_421_}}}};
  1644. assign _zz_414_ = 5'h0;
  1645. assign _zz_415_ = ({(_zz_422_ == _zz_423_),(_zz_424_ == _zz_425_)} != (2'b00));
  1646. assign _zz_416_ = ({_zz_426_,{_zz_427_,_zz_428_}} != (3'b000));
  1647. assign _zz_417_ = {(_zz_429_ != (1'b0)),{(_zz_430_ != _zz_431_),(_zz_432_ != _zz_433_)}};
  1648. assign _zz_418_ = 32'h00000040;
  1649. assign _zz_419_ = ((decode_INSTRUCTION & 32'h00004020) == 32'h00004020);
  1650. assign _zz_420_ = ((decode_INSTRUCTION & _zz_434_) == 32'h00000010);
  1651. assign _zz_421_ = ((decode_INSTRUCTION & _zz_435_) == 32'h00000020);
  1652. assign _zz_422_ = (decode_INSTRUCTION & 32'h00007034);
  1653. assign _zz_423_ = 32'h00005010;
  1654. assign _zz_424_ = (decode_INSTRUCTION & 32'h02007064);
  1655. assign _zz_425_ = 32'h00005020;
  1656. assign _zz_426_ = ((decode_INSTRUCTION & 32'h40003054) == 32'h40001010);
  1657. assign _zz_427_ = ((decode_INSTRUCTION & _zz_436_) == 32'h00001010);
  1658. assign _zz_428_ = ((decode_INSTRUCTION & _zz_437_) == 32'h00001010);
  1659. assign _zz_429_ = ((decode_INSTRUCTION & 32'h00000058) == 32'h0);
  1660. assign _zz_430_ = {_zz_89_,(_zz_438_ == _zz_439_)};
  1661. assign _zz_431_ = (2'b00);
  1662. assign _zz_432_ = {_zz_89_,(_zz_440_ == _zz_441_)};
  1663. assign _zz_433_ = (2'b00);
  1664. assign _zz_434_ = 32'h00000030;
  1665. assign _zz_435_ = 32'h02000020;
  1666. assign _zz_436_ = 32'h00007034;
  1667. assign _zz_437_ = 32'h02007054;
  1668. assign _zz_438_ = (decode_INSTRUCTION & 32'h00000070);
  1669. assign _zz_439_ = 32'h00000020;
  1670. assign _zz_440_ = (decode_INSTRUCTION & 32'h00000020);
  1671. assign _zz_441_ = 32'h0;
  1672. assign _zz_442_ = execute_INSTRUCTION[31];
  1673. assign _zz_443_ = execute_INSTRUCTION[31];
  1674. assign _zz_444_ = execute_INSTRUCTION[7];
  1675. always @ (posedge clk) begin
  1676. if(_zz_288_) begin
  1677. _zz_165_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress1];
  1678. end
  1679. end
  1680. always @ (posedge clk) begin
  1681. if(_zz_289_) begin
  1682. _zz_166_ <= RegFilePlugin_regFile[decode_RegFilePlugin_regFileReadAddress2];
  1683. end
  1684. end
  1685. always @ (posedge clk) begin
  1686. if(_zz_42_) begin
  1687. RegFilePlugin_regFile[lastStageRegFileWrite_payload_address] <= lastStageRegFileWrite_payload_data;
  1688. end
  1689. end
  1690. InstructionCache IBusCachedPlugin_cache (
  1691. .io_flush (_zz_157_ ), //i
  1692. .io_cpu_prefetch_isValid (_zz_158_ ), //i
  1693. .io_cpu_prefetch_haltIt (IBusCachedPlugin_cache_io_cpu_prefetch_haltIt ), //o
  1694. .io_cpu_prefetch_pc (IBusCachedPlugin_iBusRsp_stages_0_input_payload[31:0] ), //i
  1695. .io_cpu_fetch_isValid (_zz_159_ ), //i
  1696. .io_cpu_fetch_isStuck (_zz_160_ ), //i
  1697. .io_cpu_fetch_isRemoved (IBusCachedPlugin_externalFlush ), //i
  1698. .io_cpu_fetch_pc (IBusCachedPlugin_iBusRsp_stages_1_input_payload[31:0] ), //i
  1699. .io_cpu_fetch_data (IBusCachedPlugin_cache_io_cpu_fetch_data[31:0] ), //o
  1700. .io_cpu_fetch_mmuBus_cmd_isValid (IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid ), //o
  1701. .io_cpu_fetch_mmuBus_cmd_virtualAddress (IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress[31:0] ), //o
  1702. .io_cpu_fetch_mmuBus_cmd_bypassTranslation (IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation ), //o
  1703. .io_cpu_fetch_mmuBus_rsp_physicalAddress (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31:0] ), //i
  1704. .io_cpu_fetch_mmuBus_rsp_isIoAccess (IBusCachedPlugin_mmuBus_rsp_isIoAccess ), //i
  1705. .io_cpu_fetch_mmuBus_rsp_allowRead (IBusCachedPlugin_mmuBus_rsp_allowRead ), //i
  1706. .io_cpu_fetch_mmuBus_rsp_allowWrite (IBusCachedPlugin_mmuBus_rsp_allowWrite ), //i
  1707. .io_cpu_fetch_mmuBus_rsp_allowExecute (IBusCachedPlugin_mmuBus_rsp_allowExecute ), //i
  1708. .io_cpu_fetch_mmuBus_rsp_exception (IBusCachedPlugin_mmuBus_rsp_exception ), //i
  1709. .io_cpu_fetch_mmuBus_rsp_refilling (IBusCachedPlugin_mmuBus_rsp_refilling ), //i
  1710. .io_cpu_fetch_mmuBus_end (IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end ), //o
  1711. .io_cpu_fetch_mmuBus_busy (IBusCachedPlugin_mmuBus_busy ), //i
  1712. .io_cpu_fetch_physicalAddress (IBusCachedPlugin_cache_io_cpu_fetch_physicalAddress[31:0] ), //o
  1713. .io_cpu_fetch_haltIt (IBusCachedPlugin_cache_io_cpu_fetch_haltIt ), //o
  1714. .io_cpu_decode_isValid (_zz_161_ ), //i
  1715. .io_cpu_decode_isStuck (_zz_162_ ), //i
  1716. .io_cpu_decode_pc (IBusCachedPlugin_iBusRsp_stages_2_input_payload[31:0] ), //i
  1717. .io_cpu_decode_physicalAddress (IBusCachedPlugin_cache_io_cpu_decode_physicalAddress[31:0] ), //o
  1718. .io_cpu_decode_data (IBusCachedPlugin_cache_io_cpu_decode_data[31:0] ), //o
  1719. .io_cpu_decode_cacheMiss (IBusCachedPlugin_cache_io_cpu_decode_cacheMiss ), //o
  1720. .io_cpu_decode_error (IBusCachedPlugin_cache_io_cpu_decode_error ), //o
  1721. .io_cpu_decode_mmuRefilling (IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling ), //o
  1722. .io_cpu_decode_mmuException (IBusCachedPlugin_cache_io_cpu_decode_mmuException ), //o
  1723. .io_cpu_decode_isUser (_zz_163_ ), //i
  1724. .io_cpu_fill_valid (_zz_164_ ), //i
  1725. .io_cpu_fill_payload (IBusCachedPlugin_cache_io_cpu_decode_physicalAddress[31:0] ), //i
  1726. .io_mem_cmd_valid (IBusCachedPlugin_cache_io_mem_cmd_valid ), //o
  1727. .io_mem_cmd_ready (iBus_cmd_ready ), //i
  1728. .io_mem_cmd_payload_address (IBusCachedPlugin_cache_io_mem_cmd_payload_address[31:0] ), //o
  1729. .io_mem_cmd_payload_size (IBusCachedPlugin_cache_io_mem_cmd_payload_size[2:0] ), //o
  1730. .io_mem_rsp_valid (iBus_rsp_valid ), //i
  1731. .io_mem_rsp_payload_data (iBus_rsp_payload_data[31:0] ), //i
  1732. .io_mem_rsp_payload_error (iBus_rsp_payload_error ), //i
  1733. .clk (clk ), //i
  1734. .reset (reset ) //i
  1735. );
  1736. always @(*) begin
  1737. case(_zz_290_)
  1738. 2'b00 : begin
  1739. _zz_167_ = CsrPlugin_jumpInterface_payload;
  1740. end
  1741. 2'b01 : begin
  1742. _zz_167_ = DBusSimplePlugin_redoBranch_payload;
  1743. end
  1744. 2'b10 : begin
  1745. _zz_167_ = BranchPlugin_jumpInterface_payload;
  1746. end
  1747. default : begin
  1748. _zz_167_ = IBusCachedPlugin_predictionJumpInterface_payload;
  1749. end
  1750. endcase
  1751. end
  1752. `ifndef SYNTHESIS
  1753. always @(*) begin
  1754. case(decode_SRC2_CTRL)
  1755. `Src2CtrlEnum_defaultEncoding_RS : decode_SRC2_CTRL_string = "RS ";
  1756. `Src2CtrlEnum_defaultEncoding_IMI : decode_SRC2_CTRL_string = "IMI";
  1757. `Src2CtrlEnum_defaultEncoding_IMS : decode_SRC2_CTRL_string = "IMS";
  1758. `Src2CtrlEnum_defaultEncoding_PC : decode_SRC2_CTRL_string = "PC ";
  1759. default : decode_SRC2_CTRL_string = "???";
  1760. endcase
  1761. end
  1762. always @(*) begin
  1763. case(_zz_1_)
  1764. `Src2CtrlEnum_defaultEncoding_RS : _zz_1__string = "RS ";
  1765. `Src2CtrlEnum_defaultEncoding_IMI : _zz_1__string = "IMI";
  1766. `Src2CtrlEnum_defaultEncoding_IMS : _zz_1__string = "IMS";
  1767. `Src2CtrlEnum_defaultEncoding_PC : _zz_1__string = "PC ";
  1768. default : _zz_1__string = "???";
  1769. endcase
  1770. end
  1771. always @(*) begin
  1772. case(_zz_2_)
  1773. `Src2CtrlEnum_defaultEncoding_RS : _zz_2__string = "RS ";
  1774. `Src2CtrlEnum_defaultEncoding_IMI : _zz_2__string = "IMI";
  1775. `Src2CtrlEnum_defaultEncoding_IMS : _zz_2__string = "IMS";
  1776. `Src2CtrlEnum_defaultEncoding_PC : _zz_2__string = "PC ";
  1777. default : _zz_2__string = "???";
  1778. endcase
  1779. end
  1780. always @(*) begin
  1781. case(_zz_3_)
  1782. `Src2CtrlEnum_defaultEncoding_RS : _zz_3__string = "RS ";
  1783. `Src2CtrlEnum_defaultEncoding_IMI : _zz_3__string = "IMI";
  1784. `Src2CtrlEnum_defaultEncoding_IMS : _zz_3__string = "IMS";
  1785. `Src2CtrlEnum_defaultEncoding_PC : _zz_3__string = "PC ";
  1786. default : _zz_3__string = "???";
  1787. endcase
  1788. end
  1789. always @(*) begin
  1790. case(decode_SRC1_CTRL)
  1791. `Src1CtrlEnum_defaultEncoding_RS : decode_SRC1_CTRL_string = "RS ";
  1792. `Src1CtrlEnum_defaultEncoding_IMU : decode_SRC1_CTRL_string = "IMU ";
  1793. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_SRC1_CTRL_string = "PC_INCREMENT";
  1794. `Src1CtrlEnum_defaultEncoding_URS1 : decode_SRC1_CTRL_string = "URS1 ";
  1795. default : decode_SRC1_CTRL_string = "????????????";
  1796. endcase
  1797. end
  1798. always @(*) begin
  1799. case(_zz_4_)
  1800. `Src1CtrlEnum_defaultEncoding_RS : _zz_4__string = "RS ";
  1801. `Src1CtrlEnum_defaultEncoding_IMU : _zz_4__string = "IMU ";
  1802. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_4__string = "PC_INCREMENT";
  1803. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_4__string = "URS1 ";
  1804. default : _zz_4__string = "????????????";
  1805. endcase
  1806. end
  1807. always @(*) begin
  1808. case(_zz_5_)
  1809. `Src1CtrlEnum_defaultEncoding_RS : _zz_5__string = "RS ";
  1810. `Src1CtrlEnum_defaultEncoding_IMU : _zz_5__string = "IMU ";
  1811. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_5__string = "PC_INCREMENT";
  1812. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_5__string = "URS1 ";
  1813. default : _zz_5__string = "????????????";
  1814. endcase
  1815. end
  1816. always @(*) begin
  1817. case(_zz_6_)
  1818. `Src1CtrlEnum_defaultEncoding_RS : _zz_6__string = "RS ";
  1819. `Src1CtrlEnum_defaultEncoding_IMU : _zz_6__string = "IMU ";
  1820. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_6__string = "PC_INCREMENT";
  1821. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_6__string = "URS1 ";
  1822. default : _zz_6__string = "????????????";
  1823. endcase
  1824. end
  1825. always @(*) begin
  1826. case(_zz_7_)
  1827. `EnvCtrlEnum_defaultEncoding_NONE : _zz_7__string = "NONE ";
  1828. `EnvCtrlEnum_defaultEncoding_XRET : _zz_7__string = "XRET ";
  1829. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_7__string = "ECALL";
  1830. default : _zz_7__string = "?????";
  1831. endcase
  1832. end
  1833. always @(*) begin
  1834. case(_zz_8_)
  1835. `EnvCtrlEnum_defaultEncoding_NONE : _zz_8__string = "NONE ";
  1836. `EnvCtrlEnum_defaultEncoding_XRET : _zz_8__string = "XRET ";
  1837. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_8__string = "ECALL";
  1838. default : _zz_8__string = "?????";
  1839. endcase
  1840. end
  1841. always @(*) begin
  1842. case(_zz_9_)
  1843. `EnvCtrlEnum_defaultEncoding_NONE : _zz_9__string = "NONE ";
  1844. `EnvCtrlEnum_defaultEncoding_XRET : _zz_9__string = "XRET ";
  1845. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_9__string = "ECALL";
  1846. default : _zz_9__string = "?????";
  1847. endcase
  1848. end
  1849. always @(*) begin
  1850. case(_zz_10_)
  1851. `EnvCtrlEnum_defaultEncoding_NONE : _zz_10__string = "NONE ";
  1852. `EnvCtrlEnum_defaultEncoding_XRET : _zz_10__string = "XRET ";
  1853. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_10__string = "ECALL";
  1854. default : _zz_10__string = "?????";
  1855. endcase
  1856. end
  1857. always @(*) begin
  1858. case(decode_ENV_CTRL)
  1859. `EnvCtrlEnum_defaultEncoding_NONE : decode_ENV_CTRL_string = "NONE ";
  1860. `EnvCtrlEnum_defaultEncoding_XRET : decode_ENV_CTRL_string = "XRET ";
  1861. `EnvCtrlEnum_defaultEncoding_ECALL : decode_ENV_CTRL_string = "ECALL";
  1862. default : decode_ENV_CTRL_string = "?????";
  1863. endcase
  1864. end
  1865. always @(*) begin
  1866. case(_zz_11_)
  1867. `EnvCtrlEnum_defaultEncoding_NONE : _zz_11__string = "NONE ";
  1868. `EnvCtrlEnum_defaultEncoding_XRET : _zz_11__string = "XRET ";
  1869. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_11__string = "ECALL";
  1870. default : _zz_11__string = "?????";
  1871. endcase
  1872. end
  1873. always @(*) begin
  1874. case(_zz_12_)
  1875. `EnvCtrlEnum_defaultEncoding_NONE : _zz_12__string = "NONE ";
  1876. `EnvCtrlEnum_defaultEncoding_XRET : _zz_12__string = "XRET ";
  1877. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_12__string = "ECALL";
  1878. default : _zz_12__string = "?????";
  1879. endcase
  1880. end
  1881. always @(*) begin
  1882. case(_zz_13_)
  1883. `EnvCtrlEnum_defaultEncoding_NONE : _zz_13__string = "NONE ";
  1884. `EnvCtrlEnum_defaultEncoding_XRET : _zz_13__string = "XRET ";
  1885. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_13__string = "ECALL";
  1886. default : _zz_13__string = "?????";
  1887. endcase
  1888. end
  1889. always @(*) begin
  1890. case(decode_ALU_CTRL)
  1891. `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_ALU_CTRL_string = "ADD_SUB ";
  1892. `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_ALU_CTRL_string = "SLT_SLTU";
  1893. `AluCtrlEnum_defaultEncoding_BITWISE : decode_ALU_CTRL_string = "BITWISE ";
  1894. default : decode_ALU_CTRL_string = "????????";
  1895. endcase
  1896. end
  1897. always @(*) begin
  1898. case(_zz_14_)
  1899. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_14__string = "ADD_SUB ";
  1900. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_14__string = "SLT_SLTU";
  1901. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_14__string = "BITWISE ";
  1902. default : _zz_14__string = "????????";
  1903. endcase
  1904. end
  1905. always @(*) begin
  1906. case(_zz_15_)
  1907. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_15__string = "ADD_SUB ";
  1908. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_15__string = "SLT_SLTU";
  1909. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_15__string = "BITWISE ";
  1910. default : _zz_15__string = "????????";
  1911. endcase
  1912. end
  1913. always @(*) begin
  1914. case(_zz_16_)
  1915. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_16__string = "ADD_SUB ";
  1916. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_16__string = "SLT_SLTU";
  1917. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_16__string = "BITWISE ";
  1918. default : _zz_16__string = "????????";
  1919. endcase
  1920. end
  1921. always @(*) begin
  1922. case(decode_ALU_BITWISE_CTRL)
  1923. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_ALU_BITWISE_CTRL_string = "XOR_1";
  1924. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_ALU_BITWISE_CTRL_string = "OR_1 ";
  1925. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_ALU_BITWISE_CTRL_string = "AND_1";
  1926. default : decode_ALU_BITWISE_CTRL_string = "?????";
  1927. endcase
  1928. end
  1929. always @(*) begin
  1930. case(_zz_17_)
  1931. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_17__string = "XOR_1";
  1932. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_17__string = "OR_1 ";
  1933. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_17__string = "AND_1";
  1934. default : _zz_17__string = "?????";
  1935. endcase
  1936. end
  1937. always @(*) begin
  1938. case(_zz_18_)
  1939. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_18__string = "XOR_1";
  1940. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_18__string = "OR_1 ";
  1941. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_18__string = "AND_1";
  1942. default : _zz_18__string = "?????";
  1943. endcase
  1944. end
  1945. always @(*) begin
  1946. case(_zz_19_)
  1947. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_19__string = "XOR_1";
  1948. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_19__string = "OR_1 ";
  1949. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_19__string = "AND_1";
  1950. default : _zz_19__string = "?????";
  1951. endcase
  1952. end
  1953. always @(*) begin
  1954. case(_zz_20_)
  1955. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_20__string = "DISABLE_1";
  1956. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_20__string = "SLL_1 ";
  1957. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_20__string = "SRL_1 ";
  1958. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_20__string = "SRA_1 ";
  1959. default : _zz_20__string = "?????????";
  1960. endcase
  1961. end
  1962. always @(*) begin
  1963. case(_zz_21_)
  1964. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_21__string = "DISABLE_1";
  1965. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_21__string = "SLL_1 ";
  1966. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_21__string = "SRL_1 ";
  1967. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_21__string = "SRA_1 ";
  1968. default : _zz_21__string = "?????????";
  1969. endcase
  1970. end
  1971. always @(*) begin
  1972. case(decode_SHIFT_CTRL)
  1973. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_SHIFT_CTRL_string = "DISABLE_1";
  1974. `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_SHIFT_CTRL_string = "SLL_1 ";
  1975. `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_SHIFT_CTRL_string = "SRL_1 ";
  1976. `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_SHIFT_CTRL_string = "SRA_1 ";
  1977. default : decode_SHIFT_CTRL_string = "?????????";
  1978. endcase
  1979. end
  1980. always @(*) begin
  1981. case(_zz_22_)
  1982. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_22__string = "DISABLE_1";
  1983. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_22__string = "SLL_1 ";
  1984. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_22__string = "SRL_1 ";
  1985. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_22__string = "SRA_1 ";
  1986. default : _zz_22__string = "?????????";
  1987. endcase
  1988. end
  1989. always @(*) begin
  1990. case(_zz_23_)
  1991. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_23__string = "DISABLE_1";
  1992. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_23__string = "SLL_1 ";
  1993. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_23__string = "SRL_1 ";
  1994. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_23__string = "SRA_1 ";
  1995. default : _zz_23__string = "?????????";
  1996. endcase
  1997. end
  1998. always @(*) begin
  1999. case(_zz_24_)
  2000. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_24__string = "DISABLE_1";
  2001. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_24__string = "SLL_1 ";
  2002. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_24__string = "SRL_1 ";
  2003. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_24__string = "SRA_1 ";
  2004. default : _zz_24__string = "?????????";
  2005. endcase
  2006. end
  2007. always @(*) begin
  2008. case(_zz_25_)
  2009. `BranchCtrlEnum_defaultEncoding_INC : _zz_25__string = "INC ";
  2010. `BranchCtrlEnum_defaultEncoding_B : _zz_25__string = "B ";
  2011. `BranchCtrlEnum_defaultEncoding_JAL : _zz_25__string = "JAL ";
  2012. `BranchCtrlEnum_defaultEncoding_JALR : _zz_25__string = "JALR";
  2013. default : _zz_25__string = "????";
  2014. endcase
  2015. end
  2016. always @(*) begin
  2017. case(_zz_26_)
  2018. `BranchCtrlEnum_defaultEncoding_INC : _zz_26__string = "INC ";
  2019. `BranchCtrlEnum_defaultEncoding_B : _zz_26__string = "B ";
  2020. `BranchCtrlEnum_defaultEncoding_JAL : _zz_26__string = "JAL ";
  2021. `BranchCtrlEnum_defaultEncoding_JALR : _zz_26__string = "JALR";
  2022. default : _zz_26__string = "????";
  2023. endcase
  2024. end
  2025. always @(*) begin
  2026. case(memory_ENV_CTRL)
  2027. `EnvCtrlEnum_defaultEncoding_NONE : memory_ENV_CTRL_string = "NONE ";
  2028. `EnvCtrlEnum_defaultEncoding_XRET : memory_ENV_CTRL_string = "XRET ";
  2029. `EnvCtrlEnum_defaultEncoding_ECALL : memory_ENV_CTRL_string = "ECALL";
  2030. default : memory_ENV_CTRL_string = "?????";
  2031. endcase
  2032. end
  2033. always @(*) begin
  2034. case(_zz_27_)
  2035. `EnvCtrlEnum_defaultEncoding_NONE : _zz_27__string = "NONE ";
  2036. `EnvCtrlEnum_defaultEncoding_XRET : _zz_27__string = "XRET ";
  2037. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_27__string = "ECALL";
  2038. default : _zz_27__string = "?????";
  2039. endcase
  2040. end
  2041. always @(*) begin
  2042. case(execute_ENV_CTRL)
  2043. `EnvCtrlEnum_defaultEncoding_NONE : execute_ENV_CTRL_string = "NONE ";
  2044. `EnvCtrlEnum_defaultEncoding_XRET : execute_ENV_CTRL_string = "XRET ";
  2045. `EnvCtrlEnum_defaultEncoding_ECALL : execute_ENV_CTRL_string = "ECALL";
  2046. default : execute_ENV_CTRL_string = "?????";
  2047. endcase
  2048. end
  2049. always @(*) begin
  2050. case(_zz_28_)
  2051. `EnvCtrlEnum_defaultEncoding_NONE : _zz_28__string = "NONE ";
  2052. `EnvCtrlEnum_defaultEncoding_XRET : _zz_28__string = "XRET ";
  2053. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_28__string = "ECALL";
  2054. default : _zz_28__string = "?????";
  2055. endcase
  2056. end
  2057. always @(*) begin
  2058. case(writeBack_ENV_CTRL)
  2059. `EnvCtrlEnum_defaultEncoding_NONE : writeBack_ENV_CTRL_string = "NONE ";
  2060. `EnvCtrlEnum_defaultEncoding_XRET : writeBack_ENV_CTRL_string = "XRET ";
  2061. `EnvCtrlEnum_defaultEncoding_ECALL : writeBack_ENV_CTRL_string = "ECALL";
  2062. default : writeBack_ENV_CTRL_string = "?????";
  2063. endcase
  2064. end
  2065. always @(*) begin
  2066. case(_zz_29_)
  2067. `EnvCtrlEnum_defaultEncoding_NONE : _zz_29__string = "NONE ";
  2068. `EnvCtrlEnum_defaultEncoding_XRET : _zz_29__string = "XRET ";
  2069. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_29__string = "ECALL";
  2070. default : _zz_29__string = "?????";
  2071. endcase
  2072. end
  2073. always @(*) begin
  2074. case(execute_BRANCH_CTRL)
  2075. `BranchCtrlEnum_defaultEncoding_INC : execute_BRANCH_CTRL_string = "INC ";
  2076. `BranchCtrlEnum_defaultEncoding_B : execute_BRANCH_CTRL_string = "B ";
  2077. `BranchCtrlEnum_defaultEncoding_JAL : execute_BRANCH_CTRL_string = "JAL ";
  2078. `BranchCtrlEnum_defaultEncoding_JALR : execute_BRANCH_CTRL_string = "JALR";
  2079. default : execute_BRANCH_CTRL_string = "????";
  2080. endcase
  2081. end
  2082. always @(*) begin
  2083. case(_zz_30_)
  2084. `BranchCtrlEnum_defaultEncoding_INC : _zz_30__string = "INC ";
  2085. `BranchCtrlEnum_defaultEncoding_B : _zz_30__string = "B ";
  2086. `BranchCtrlEnum_defaultEncoding_JAL : _zz_30__string = "JAL ";
  2087. `BranchCtrlEnum_defaultEncoding_JALR : _zz_30__string = "JALR";
  2088. default : _zz_30__string = "????";
  2089. endcase
  2090. end
  2091. always @(*) begin
  2092. case(memory_SHIFT_CTRL)
  2093. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : memory_SHIFT_CTRL_string = "DISABLE_1";
  2094. `ShiftCtrlEnum_defaultEncoding_SLL_1 : memory_SHIFT_CTRL_string = "SLL_1 ";
  2095. `ShiftCtrlEnum_defaultEncoding_SRL_1 : memory_SHIFT_CTRL_string = "SRL_1 ";
  2096. `ShiftCtrlEnum_defaultEncoding_SRA_1 : memory_SHIFT_CTRL_string = "SRA_1 ";
  2097. default : memory_SHIFT_CTRL_string = "?????????";
  2098. endcase
  2099. end
  2100. always @(*) begin
  2101. case(_zz_33_)
  2102. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_33__string = "DISABLE_1";
  2103. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_33__string = "SLL_1 ";
  2104. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_33__string = "SRL_1 ";
  2105. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_33__string = "SRA_1 ";
  2106. default : _zz_33__string = "?????????";
  2107. endcase
  2108. end
  2109. always @(*) begin
  2110. case(execute_SHIFT_CTRL)
  2111. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_SHIFT_CTRL_string = "DISABLE_1";
  2112. `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_SHIFT_CTRL_string = "SLL_1 ";
  2113. `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_SHIFT_CTRL_string = "SRL_1 ";
  2114. `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_SHIFT_CTRL_string = "SRA_1 ";
  2115. default : execute_SHIFT_CTRL_string = "?????????";
  2116. endcase
  2117. end
  2118. always @(*) begin
  2119. case(_zz_34_)
  2120. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_34__string = "DISABLE_1";
  2121. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_34__string = "SLL_1 ";
  2122. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_34__string = "SRL_1 ";
  2123. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_34__string = "SRA_1 ";
  2124. default : _zz_34__string = "?????????";
  2125. endcase
  2126. end
  2127. always @(*) begin
  2128. case(execute_SRC2_CTRL)
  2129. `Src2CtrlEnum_defaultEncoding_RS : execute_SRC2_CTRL_string = "RS ";
  2130. `Src2CtrlEnum_defaultEncoding_IMI : execute_SRC2_CTRL_string = "IMI";
  2131. `Src2CtrlEnum_defaultEncoding_IMS : execute_SRC2_CTRL_string = "IMS";
  2132. `Src2CtrlEnum_defaultEncoding_PC : execute_SRC2_CTRL_string = "PC ";
  2133. default : execute_SRC2_CTRL_string = "???";
  2134. endcase
  2135. end
  2136. always @(*) begin
  2137. case(_zz_36_)
  2138. `Src2CtrlEnum_defaultEncoding_RS : _zz_36__string = "RS ";
  2139. `Src2CtrlEnum_defaultEncoding_IMI : _zz_36__string = "IMI";
  2140. `Src2CtrlEnum_defaultEncoding_IMS : _zz_36__string = "IMS";
  2141. `Src2CtrlEnum_defaultEncoding_PC : _zz_36__string = "PC ";
  2142. default : _zz_36__string = "???";
  2143. endcase
  2144. end
  2145. always @(*) begin
  2146. case(execute_SRC1_CTRL)
  2147. `Src1CtrlEnum_defaultEncoding_RS : execute_SRC1_CTRL_string = "RS ";
  2148. `Src1CtrlEnum_defaultEncoding_IMU : execute_SRC1_CTRL_string = "IMU ";
  2149. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : execute_SRC1_CTRL_string = "PC_INCREMENT";
  2150. `Src1CtrlEnum_defaultEncoding_URS1 : execute_SRC1_CTRL_string = "URS1 ";
  2151. default : execute_SRC1_CTRL_string = "????????????";
  2152. endcase
  2153. end
  2154. always @(*) begin
  2155. case(_zz_37_)
  2156. `Src1CtrlEnum_defaultEncoding_RS : _zz_37__string = "RS ";
  2157. `Src1CtrlEnum_defaultEncoding_IMU : _zz_37__string = "IMU ";
  2158. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_37__string = "PC_INCREMENT";
  2159. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_37__string = "URS1 ";
  2160. default : _zz_37__string = "????????????";
  2161. endcase
  2162. end
  2163. always @(*) begin
  2164. case(execute_ALU_CTRL)
  2165. `AluCtrlEnum_defaultEncoding_ADD_SUB : execute_ALU_CTRL_string = "ADD_SUB ";
  2166. `AluCtrlEnum_defaultEncoding_SLT_SLTU : execute_ALU_CTRL_string = "SLT_SLTU";
  2167. `AluCtrlEnum_defaultEncoding_BITWISE : execute_ALU_CTRL_string = "BITWISE ";
  2168. default : execute_ALU_CTRL_string = "????????";
  2169. endcase
  2170. end
  2171. always @(*) begin
  2172. case(_zz_38_)
  2173. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_38__string = "ADD_SUB ";
  2174. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_38__string = "SLT_SLTU";
  2175. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_38__string = "BITWISE ";
  2176. default : _zz_38__string = "????????";
  2177. endcase
  2178. end
  2179. always @(*) begin
  2180. case(execute_ALU_BITWISE_CTRL)
  2181. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : execute_ALU_BITWISE_CTRL_string = "XOR_1";
  2182. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : execute_ALU_BITWISE_CTRL_string = "OR_1 ";
  2183. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : execute_ALU_BITWISE_CTRL_string = "AND_1";
  2184. default : execute_ALU_BITWISE_CTRL_string = "?????";
  2185. endcase
  2186. end
  2187. always @(*) begin
  2188. case(_zz_39_)
  2189. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_39__string = "XOR_1";
  2190. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_39__string = "OR_1 ";
  2191. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_39__string = "AND_1";
  2192. default : _zz_39__string = "?????";
  2193. endcase
  2194. end
  2195. always @(*) begin
  2196. case(_zz_43_)
  2197. `BranchCtrlEnum_defaultEncoding_INC : _zz_43__string = "INC ";
  2198. `BranchCtrlEnum_defaultEncoding_B : _zz_43__string = "B ";
  2199. `BranchCtrlEnum_defaultEncoding_JAL : _zz_43__string = "JAL ";
  2200. `BranchCtrlEnum_defaultEncoding_JALR : _zz_43__string = "JALR";
  2201. default : _zz_43__string = "????";
  2202. endcase
  2203. end
  2204. always @(*) begin
  2205. case(_zz_44_)
  2206. `Src1CtrlEnum_defaultEncoding_RS : _zz_44__string = "RS ";
  2207. `Src1CtrlEnum_defaultEncoding_IMU : _zz_44__string = "IMU ";
  2208. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_44__string = "PC_INCREMENT";
  2209. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_44__string = "URS1 ";
  2210. default : _zz_44__string = "????????????";
  2211. endcase
  2212. end
  2213. always @(*) begin
  2214. case(_zz_45_)
  2215. `EnvCtrlEnum_defaultEncoding_NONE : _zz_45__string = "NONE ";
  2216. `EnvCtrlEnum_defaultEncoding_XRET : _zz_45__string = "XRET ";
  2217. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_45__string = "ECALL";
  2218. default : _zz_45__string = "?????";
  2219. endcase
  2220. end
  2221. always @(*) begin
  2222. case(_zz_46_)
  2223. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_46__string = "XOR_1";
  2224. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_46__string = "OR_1 ";
  2225. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_46__string = "AND_1";
  2226. default : _zz_46__string = "?????";
  2227. endcase
  2228. end
  2229. always @(*) begin
  2230. case(_zz_47_)
  2231. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_47__string = "ADD_SUB ";
  2232. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_47__string = "SLT_SLTU";
  2233. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_47__string = "BITWISE ";
  2234. default : _zz_47__string = "????????";
  2235. endcase
  2236. end
  2237. always @(*) begin
  2238. case(_zz_48_)
  2239. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_48__string = "DISABLE_1";
  2240. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_48__string = "SLL_1 ";
  2241. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_48__string = "SRL_1 ";
  2242. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_48__string = "SRA_1 ";
  2243. default : _zz_48__string = "?????????";
  2244. endcase
  2245. end
  2246. always @(*) begin
  2247. case(_zz_49_)
  2248. `Src2CtrlEnum_defaultEncoding_RS : _zz_49__string = "RS ";
  2249. `Src2CtrlEnum_defaultEncoding_IMI : _zz_49__string = "IMI";
  2250. `Src2CtrlEnum_defaultEncoding_IMS : _zz_49__string = "IMS";
  2251. `Src2CtrlEnum_defaultEncoding_PC : _zz_49__string = "PC ";
  2252. default : _zz_49__string = "???";
  2253. endcase
  2254. end
  2255. always @(*) begin
  2256. case(decode_BRANCH_CTRL)
  2257. `BranchCtrlEnum_defaultEncoding_INC : decode_BRANCH_CTRL_string = "INC ";
  2258. `BranchCtrlEnum_defaultEncoding_B : decode_BRANCH_CTRL_string = "B ";
  2259. `BranchCtrlEnum_defaultEncoding_JAL : decode_BRANCH_CTRL_string = "JAL ";
  2260. `BranchCtrlEnum_defaultEncoding_JALR : decode_BRANCH_CTRL_string = "JALR";
  2261. default : decode_BRANCH_CTRL_string = "????";
  2262. endcase
  2263. end
  2264. always @(*) begin
  2265. case(_zz_52_)
  2266. `BranchCtrlEnum_defaultEncoding_INC : _zz_52__string = "INC ";
  2267. `BranchCtrlEnum_defaultEncoding_B : _zz_52__string = "B ";
  2268. `BranchCtrlEnum_defaultEncoding_JAL : _zz_52__string = "JAL ";
  2269. `BranchCtrlEnum_defaultEncoding_JALR : _zz_52__string = "JALR";
  2270. default : _zz_52__string = "????";
  2271. endcase
  2272. end
  2273. always @(*) begin
  2274. case(_zz_94_)
  2275. `Src2CtrlEnum_defaultEncoding_RS : _zz_94__string = "RS ";
  2276. `Src2CtrlEnum_defaultEncoding_IMI : _zz_94__string = "IMI";
  2277. `Src2CtrlEnum_defaultEncoding_IMS : _zz_94__string = "IMS";
  2278. `Src2CtrlEnum_defaultEncoding_PC : _zz_94__string = "PC ";
  2279. default : _zz_94__string = "???";
  2280. endcase
  2281. end
  2282. always @(*) begin
  2283. case(_zz_95_)
  2284. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : _zz_95__string = "DISABLE_1";
  2285. `ShiftCtrlEnum_defaultEncoding_SLL_1 : _zz_95__string = "SLL_1 ";
  2286. `ShiftCtrlEnum_defaultEncoding_SRL_1 : _zz_95__string = "SRL_1 ";
  2287. `ShiftCtrlEnum_defaultEncoding_SRA_1 : _zz_95__string = "SRA_1 ";
  2288. default : _zz_95__string = "?????????";
  2289. endcase
  2290. end
  2291. always @(*) begin
  2292. case(_zz_96_)
  2293. `AluCtrlEnum_defaultEncoding_ADD_SUB : _zz_96__string = "ADD_SUB ";
  2294. `AluCtrlEnum_defaultEncoding_SLT_SLTU : _zz_96__string = "SLT_SLTU";
  2295. `AluCtrlEnum_defaultEncoding_BITWISE : _zz_96__string = "BITWISE ";
  2296. default : _zz_96__string = "????????";
  2297. endcase
  2298. end
  2299. always @(*) begin
  2300. case(_zz_97_)
  2301. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : _zz_97__string = "XOR_1";
  2302. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : _zz_97__string = "OR_1 ";
  2303. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : _zz_97__string = "AND_1";
  2304. default : _zz_97__string = "?????";
  2305. endcase
  2306. end
  2307. always @(*) begin
  2308. case(_zz_98_)
  2309. `EnvCtrlEnum_defaultEncoding_NONE : _zz_98__string = "NONE ";
  2310. `EnvCtrlEnum_defaultEncoding_XRET : _zz_98__string = "XRET ";
  2311. `EnvCtrlEnum_defaultEncoding_ECALL : _zz_98__string = "ECALL";
  2312. default : _zz_98__string = "?????";
  2313. endcase
  2314. end
  2315. always @(*) begin
  2316. case(_zz_99_)
  2317. `Src1CtrlEnum_defaultEncoding_RS : _zz_99__string = "RS ";
  2318. `Src1CtrlEnum_defaultEncoding_IMU : _zz_99__string = "IMU ";
  2319. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : _zz_99__string = "PC_INCREMENT";
  2320. `Src1CtrlEnum_defaultEncoding_URS1 : _zz_99__string = "URS1 ";
  2321. default : _zz_99__string = "????????????";
  2322. endcase
  2323. end
  2324. always @(*) begin
  2325. case(_zz_100_)
  2326. `BranchCtrlEnum_defaultEncoding_INC : _zz_100__string = "INC ";
  2327. `BranchCtrlEnum_defaultEncoding_B : _zz_100__string = "B ";
  2328. `BranchCtrlEnum_defaultEncoding_JAL : _zz_100__string = "JAL ";
  2329. `BranchCtrlEnum_defaultEncoding_JALR : _zz_100__string = "JALR";
  2330. default : _zz_100__string = "????";
  2331. endcase
  2332. end
  2333. always @(*) begin
  2334. case(decode_to_execute_BRANCH_CTRL)
  2335. `BranchCtrlEnum_defaultEncoding_INC : decode_to_execute_BRANCH_CTRL_string = "INC ";
  2336. `BranchCtrlEnum_defaultEncoding_B : decode_to_execute_BRANCH_CTRL_string = "B ";
  2337. `BranchCtrlEnum_defaultEncoding_JAL : decode_to_execute_BRANCH_CTRL_string = "JAL ";
  2338. `BranchCtrlEnum_defaultEncoding_JALR : decode_to_execute_BRANCH_CTRL_string = "JALR";
  2339. default : decode_to_execute_BRANCH_CTRL_string = "????";
  2340. endcase
  2341. end
  2342. always @(*) begin
  2343. case(decode_to_execute_SHIFT_CTRL)
  2344. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : decode_to_execute_SHIFT_CTRL_string = "DISABLE_1";
  2345. `ShiftCtrlEnum_defaultEncoding_SLL_1 : decode_to_execute_SHIFT_CTRL_string = "SLL_1 ";
  2346. `ShiftCtrlEnum_defaultEncoding_SRL_1 : decode_to_execute_SHIFT_CTRL_string = "SRL_1 ";
  2347. `ShiftCtrlEnum_defaultEncoding_SRA_1 : decode_to_execute_SHIFT_CTRL_string = "SRA_1 ";
  2348. default : decode_to_execute_SHIFT_CTRL_string = "?????????";
  2349. endcase
  2350. end
  2351. always @(*) begin
  2352. case(execute_to_memory_SHIFT_CTRL)
  2353. `ShiftCtrlEnum_defaultEncoding_DISABLE_1 : execute_to_memory_SHIFT_CTRL_string = "DISABLE_1";
  2354. `ShiftCtrlEnum_defaultEncoding_SLL_1 : execute_to_memory_SHIFT_CTRL_string = "SLL_1 ";
  2355. `ShiftCtrlEnum_defaultEncoding_SRL_1 : execute_to_memory_SHIFT_CTRL_string = "SRL_1 ";
  2356. `ShiftCtrlEnum_defaultEncoding_SRA_1 : execute_to_memory_SHIFT_CTRL_string = "SRA_1 ";
  2357. default : execute_to_memory_SHIFT_CTRL_string = "?????????";
  2358. endcase
  2359. end
  2360. always @(*) begin
  2361. case(decode_to_execute_ALU_BITWISE_CTRL)
  2362. `AluBitwiseCtrlEnum_defaultEncoding_XOR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "XOR_1";
  2363. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "OR_1 ";
  2364. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : decode_to_execute_ALU_BITWISE_CTRL_string = "AND_1";
  2365. default : decode_to_execute_ALU_BITWISE_CTRL_string = "?????";
  2366. endcase
  2367. end
  2368. always @(*) begin
  2369. case(decode_to_execute_ALU_CTRL)
  2370. `AluCtrlEnum_defaultEncoding_ADD_SUB : decode_to_execute_ALU_CTRL_string = "ADD_SUB ";
  2371. `AluCtrlEnum_defaultEncoding_SLT_SLTU : decode_to_execute_ALU_CTRL_string = "SLT_SLTU";
  2372. `AluCtrlEnum_defaultEncoding_BITWISE : decode_to_execute_ALU_CTRL_string = "BITWISE ";
  2373. default : decode_to_execute_ALU_CTRL_string = "????????";
  2374. endcase
  2375. end
  2376. always @(*) begin
  2377. case(decode_to_execute_ENV_CTRL)
  2378. `EnvCtrlEnum_defaultEncoding_NONE : decode_to_execute_ENV_CTRL_string = "NONE ";
  2379. `EnvCtrlEnum_defaultEncoding_XRET : decode_to_execute_ENV_CTRL_string = "XRET ";
  2380. `EnvCtrlEnum_defaultEncoding_ECALL : decode_to_execute_ENV_CTRL_string = "ECALL";
  2381. default : decode_to_execute_ENV_CTRL_string = "?????";
  2382. endcase
  2383. end
  2384. always @(*) begin
  2385. case(execute_to_memory_ENV_CTRL)
  2386. `EnvCtrlEnum_defaultEncoding_NONE : execute_to_memory_ENV_CTRL_string = "NONE ";
  2387. `EnvCtrlEnum_defaultEncoding_XRET : execute_to_memory_ENV_CTRL_string = "XRET ";
  2388. `EnvCtrlEnum_defaultEncoding_ECALL : execute_to_memory_ENV_CTRL_string = "ECALL";
  2389. default : execute_to_memory_ENV_CTRL_string = "?????";
  2390. endcase
  2391. end
  2392. always @(*) begin
  2393. case(memory_to_writeBack_ENV_CTRL)
  2394. `EnvCtrlEnum_defaultEncoding_NONE : memory_to_writeBack_ENV_CTRL_string = "NONE ";
  2395. `EnvCtrlEnum_defaultEncoding_XRET : memory_to_writeBack_ENV_CTRL_string = "XRET ";
  2396. `EnvCtrlEnum_defaultEncoding_ECALL : memory_to_writeBack_ENV_CTRL_string = "ECALL";
  2397. default : memory_to_writeBack_ENV_CTRL_string = "?????";
  2398. endcase
  2399. end
  2400. always @(*) begin
  2401. case(decode_to_execute_SRC1_CTRL)
  2402. `Src1CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC1_CTRL_string = "RS ";
  2403. `Src1CtrlEnum_defaultEncoding_IMU : decode_to_execute_SRC1_CTRL_string = "IMU ";
  2404. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : decode_to_execute_SRC1_CTRL_string = "PC_INCREMENT";
  2405. `Src1CtrlEnum_defaultEncoding_URS1 : decode_to_execute_SRC1_CTRL_string = "URS1 ";
  2406. default : decode_to_execute_SRC1_CTRL_string = "????????????";
  2407. endcase
  2408. end
  2409. always @(*) begin
  2410. case(decode_to_execute_SRC2_CTRL)
  2411. `Src2CtrlEnum_defaultEncoding_RS : decode_to_execute_SRC2_CTRL_string = "RS ";
  2412. `Src2CtrlEnum_defaultEncoding_IMI : decode_to_execute_SRC2_CTRL_string = "IMI";
  2413. `Src2CtrlEnum_defaultEncoding_IMS : decode_to_execute_SRC2_CTRL_string = "IMS";
  2414. `Src2CtrlEnum_defaultEncoding_PC : decode_to_execute_SRC2_CTRL_string = "PC ";
  2415. default : decode_to_execute_SRC2_CTRL_string = "???";
  2416. endcase
  2417. end
  2418. `endif
  2419. assign memory_MEMORY_READ_DATA = dBus_rsp_data;
  2420. assign execute_MUL_LH = ($signed(execute_MulPlugin_aSLow) * $signed(execute_MulPlugin_bHigh));
  2421. assign decode_SRC2_CTRL = _zz_1_;
  2422. assign _zz_2_ = _zz_3_;
  2423. assign decode_IS_RS2_SIGNED = _zz_198_[0];
  2424. assign decode_IS_RS1_SIGNED = _zz_199_[0];
  2425. assign memory_MEMORY_ADDRESS_LOW = execute_to_memory_MEMORY_ADDRESS_LOW;
  2426. assign execute_MEMORY_ADDRESS_LOW = dBus_cmd_payload_address[1 : 0];
  2427. assign decode_SRC1_CTRL = _zz_4_;
  2428. assign _zz_5_ = _zz_6_;
  2429. assign execute_BRANCH_DO = ((execute_PREDICTION_HAD_BRANCHED2 != execute_BRANCH_COND_RESULT) || execute_BranchPlugin_missAlignedTarget);
  2430. assign memory_MUL_LOW = ($signed(_zz_200_) + $signed(_zz_208_));
  2431. assign decode_BYPASSABLE_EXECUTE_STAGE = _zz_209_[0];
  2432. assign _zz_7_ = _zz_8_;
  2433. assign _zz_9_ = _zz_10_;
  2434. assign decode_ENV_CTRL = _zz_11_;
  2435. assign _zz_12_ = _zz_13_;
  2436. assign execute_BRANCH_CALC = {execute_BranchPlugin_branchAdder[31 : 1],(1'b0)};
  2437. assign decode_IS_CSR = _zz_210_[0];
  2438. assign writeBack_REGFILE_WRITE_DATA = memory_to_writeBack_REGFILE_WRITE_DATA;
  2439. assign execute_REGFILE_WRITE_DATA = _zz_102_;
  2440. assign execute_BYPASSABLE_MEMORY_STAGE = decode_to_execute_BYPASSABLE_MEMORY_STAGE;
  2441. assign decode_BYPASSABLE_MEMORY_STAGE = _zz_211_[0];
  2442. assign decode_ALU_CTRL = _zz_14_;
  2443. assign _zz_15_ = _zz_16_;
  2444. assign decode_SRC_LESS_UNSIGNED = _zz_212_[0];
  2445. assign decode_CSR_WRITE_OPCODE = (! (((decode_INSTRUCTION[14 : 13] == (2'b01)) && (decode_INSTRUCTION[19 : 15] == 5'h0)) || ((decode_INSTRUCTION[14 : 13] == (2'b11)) && (decode_INSTRUCTION[19 : 15] == 5'h0))));
  2446. assign execute_MUL_HL = ($signed(execute_MulPlugin_aHigh) * $signed(execute_MulPlugin_bSLow));
  2447. assign decode_IS_DIV = _zz_213_[0];
  2448. assign decode_ALU_BITWISE_CTRL = _zz_17_;
  2449. assign _zz_18_ = _zz_19_;
  2450. assign _zz_20_ = _zz_21_;
  2451. assign decode_SHIFT_CTRL = _zz_22_;
  2452. assign _zz_23_ = _zz_24_;
  2453. assign writeBack_FORMAL_PC_NEXT = memory_to_writeBack_FORMAL_PC_NEXT;
  2454. assign memory_FORMAL_PC_NEXT = execute_to_memory_FORMAL_PC_NEXT;
  2455. assign execute_FORMAL_PC_NEXT = decode_to_execute_FORMAL_PC_NEXT;
  2456. assign decode_FORMAL_PC_NEXT = (decode_PC + 32'h00000004);
  2457. assign execute_SHIFT_RIGHT = _zz_215_;
  2458. assign _zz_25_ = _zz_26_;
  2459. assign execute_MUL_LL = (execute_MulPlugin_aULow * execute_MulPlugin_bULow);
  2460. assign decode_SRC2_FORCE_ZERO = (decode_SRC_ADD_ZERO && (! decode_SRC_USE_SUB_LESS));
  2461. assign decode_CSR_READ_OPCODE = (decode_INSTRUCTION[13 : 7] != 7'h20);
  2462. assign memory_IS_MUL = execute_to_memory_IS_MUL;
  2463. assign execute_IS_MUL = decode_to_execute_IS_MUL;
  2464. assign decode_IS_MUL = _zz_217_[0];
  2465. assign decode_MEMORY_STORE = _zz_218_[0];
  2466. assign decode_PREDICTION_HAD_BRANCHED2 = IBusCachedPlugin_decodePrediction_cmd_hadBranch;
  2467. assign memory_MUL_HH = execute_to_memory_MUL_HH;
  2468. assign execute_MUL_HH = ($signed(execute_MulPlugin_aHigh) * $signed(execute_MulPlugin_bHigh));
  2469. assign execute_IS_RS1_SIGNED = decode_to_execute_IS_RS1_SIGNED;
  2470. assign execute_IS_DIV = decode_to_execute_IS_DIV;
  2471. assign execute_IS_RS2_SIGNED = decode_to_execute_IS_RS2_SIGNED;
  2472. assign memory_IS_DIV = execute_to_memory_IS_DIV;
  2473. assign writeBack_IS_MUL = memory_to_writeBack_IS_MUL;
  2474. assign writeBack_MUL_HH = memory_to_writeBack_MUL_HH;
  2475. assign writeBack_MUL_LOW = memory_to_writeBack_MUL_LOW;
  2476. assign memory_MUL_HL = execute_to_memory_MUL_HL;
  2477. assign memory_MUL_LH = execute_to_memory_MUL_LH;
  2478. assign memory_MUL_LL = execute_to_memory_MUL_LL;
  2479. assign execute_CSR_READ_OPCODE = decode_to_execute_CSR_READ_OPCODE;
  2480. assign execute_CSR_WRITE_OPCODE = decode_to_execute_CSR_WRITE_OPCODE;
  2481. assign execute_IS_CSR = decode_to_execute_IS_CSR;
  2482. assign memory_ENV_CTRL = _zz_27_;
  2483. assign execute_ENV_CTRL = _zz_28_;
  2484. assign writeBack_ENV_CTRL = _zz_29_;
  2485. assign memory_BRANCH_CALC = execute_to_memory_BRANCH_CALC;
  2486. assign memory_BRANCH_DO = execute_to_memory_BRANCH_DO;
  2487. assign execute_PC = decode_to_execute_PC;
  2488. assign execute_PREDICTION_HAD_BRANCHED2 = decode_to_execute_PREDICTION_HAD_BRANCHED2;
  2489. assign execute_RS1 = decode_to_execute_RS1;
  2490. assign execute_BRANCH_COND_RESULT = _zz_124_;
  2491. assign execute_BRANCH_CTRL = _zz_30_;
  2492. assign decode_RS2_USE = _zz_219_[0];
  2493. assign decode_RS1_USE = _zz_220_[0];
  2494. always @ (*) begin
  2495. _zz_31_ = execute_REGFILE_WRITE_DATA;
  2496. if(_zz_168_)begin
  2497. _zz_31_ = execute_CsrPlugin_readData;
  2498. end
  2499. end
  2500. assign execute_REGFILE_WRITE_VALID = decode_to_execute_REGFILE_WRITE_VALID;
  2501. assign execute_BYPASSABLE_EXECUTE_STAGE = decode_to_execute_BYPASSABLE_EXECUTE_STAGE;
  2502. assign memory_REGFILE_WRITE_VALID = execute_to_memory_REGFILE_WRITE_VALID;
  2503. assign memory_INSTRUCTION = execute_to_memory_INSTRUCTION;
  2504. assign memory_BYPASSABLE_MEMORY_STAGE = execute_to_memory_BYPASSABLE_MEMORY_STAGE;
  2505. assign writeBack_REGFILE_WRITE_VALID = memory_to_writeBack_REGFILE_WRITE_VALID;
  2506. always @ (*) begin
  2507. decode_RS2 = decode_RegFilePlugin_rs2Data;
  2508. if(_zz_113_)begin
  2509. if((_zz_114_ == decode_INSTRUCTION[24 : 20]))begin
  2510. decode_RS2 = _zz_115_;
  2511. end
  2512. end
  2513. if(_zz_169_)begin
  2514. if(_zz_170_)begin
  2515. if(_zz_117_)begin
  2516. decode_RS2 = _zz_50_;
  2517. end
  2518. end
  2519. end
  2520. if(_zz_171_)begin
  2521. if(memory_BYPASSABLE_MEMORY_STAGE)begin
  2522. if(_zz_119_)begin
  2523. decode_RS2 = _zz_32_;
  2524. end
  2525. end
  2526. end
  2527. if(_zz_172_)begin
  2528. if(execute_BYPASSABLE_EXECUTE_STAGE)begin
  2529. if(_zz_121_)begin
  2530. decode_RS2 = _zz_31_;
  2531. end
  2532. end
  2533. end
  2534. end
  2535. always @ (*) begin
  2536. decode_RS1 = decode_RegFilePlugin_rs1Data;
  2537. if(_zz_113_)begin
  2538. if((_zz_114_ == decode_INSTRUCTION[19 : 15]))begin
  2539. decode_RS1 = _zz_115_;
  2540. end
  2541. end
  2542. if(_zz_169_)begin
  2543. if(_zz_170_)begin
  2544. if(_zz_116_)begin
  2545. decode_RS1 = _zz_50_;
  2546. end
  2547. end
  2548. end
  2549. if(_zz_171_)begin
  2550. if(memory_BYPASSABLE_MEMORY_STAGE)begin
  2551. if(_zz_118_)begin
  2552. decode_RS1 = _zz_32_;
  2553. end
  2554. end
  2555. end
  2556. if(_zz_172_)begin
  2557. if(execute_BYPASSABLE_EXECUTE_STAGE)begin
  2558. if(_zz_120_)begin
  2559. decode_RS1 = _zz_31_;
  2560. end
  2561. end
  2562. end
  2563. end
  2564. assign memory_SHIFT_RIGHT = execute_to_memory_SHIFT_RIGHT;
  2565. always @ (*) begin
  2566. _zz_32_ = memory_REGFILE_WRITE_DATA;
  2567. if(memory_arbitration_isValid)begin
  2568. case(memory_SHIFT_CTRL)
  2569. `ShiftCtrlEnum_defaultEncoding_SLL_1 : begin
  2570. _zz_32_ = _zz_110_;
  2571. end
  2572. `ShiftCtrlEnum_defaultEncoding_SRL_1, `ShiftCtrlEnum_defaultEncoding_SRA_1 : begin
  2573. _zz_32_ = memory_SHIFT_RIGHT;
  2574. end
  2575. default : begin
  2576. end
  2577. endcase
  2578. end
  2579. if(_zz_173_)begin
  2580. _zz_32_ = memory_DivPlugin_div_result;
  2581. end
  2582. end
  2583. assign memory_SHIFT_CTRL = _zz_33_;
  2584. assign execute_SHIFT_CTRL = _zz_34_;
  2585. assign execute_SRC_LESS_UNSIGNED = decode_to_execute_SRC_LESS_UNSIGNED;
  2586. assign execute_SRC2_FORCE_ZERO = decode_to_execute_SRC2_FORCE_ZERO;
  2587. assign execute_SRC_USE_SUB_LESS = decode_to_execute_SRC_USE_SUB_LESS;
  2588. assign _zz_35_ = execute_PC;
  2589. assign execute_SRC2_CTRL = _zz_36_;
  2590. assign execute_SRC1_CTRL = _zz_37_;
  2591. assign decode_SRC_USE_SUB_LESS = _zz_221_[0];
  2592. assign decode_SRC_ADD_ZERO = _zz_222_[0];
  2593. assign execute_SRC_ADD_SUB = execute_SrcPlugin_addSub;
  2594. assign execute_SRC_LESS = execute_SrcPlugin_less;
  2595. assign execute_ALU_CTRL = _zz_38_;
  2596. assign execute_SRC2 = _zz_108_;
  2597. assign execute_SRC1 = _zz_103_;
  2598. assign execute_ALU_BITWISE_CTRL = _zz_39_;
  2599. assign _zz_40_ = writeBack_INSTRUCTION;
  2600. assign _zz_41_ = writeBack_REGFILE_WRITE_VALID;
  2601. always @ (*) begin
  2602. _zz_42_ = 1'b0;
  2603. if(lastStageRegFileWrite_valid)begin
  2604. _zz_42_ = 1'b1;
  2605. end
  2606. end
  2607. assign decode_INSTRUCTION_ANTICIPATED = (decode_arbitration_isStuck ? decode_INSTRUCTION : IBusCachedPlugin_cache_io_cpu_fetch_data);
  2608. always @ (*) begin
  2609. decode_REGFILE_WRITE_VALID = _zz_223_[0];
  2610. if((decode_INSTRUCTION[11 : 7] == 5'h0))begin
  2611. decode_REGFILE_WRITE_VALID = 1'b0;
  2612. end
  2613. end
  2614. assign writeBack_MEMORY_STORE = memory_to_writeBack_MEMORY_STORE;
  2615. always @ (*) begin
  2616. _zz_50_ = writeBack_REGFILE_WRITE_DATA;
  2617. if((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE))begin
  2618. _zz_50_ = writeBack_DBusSimplePlugin_rspFormated;
  2619. end
  2620. if((writeBack_arbitration_isValid && writeBack_IS_MUL))begin
  2621. case(_zz_197_)
  2622. 2'b00 : begin
  2623. _zz_50_ = _zz_261_;
  2624. end
  2625. default : begin
  2626. _zz_50_ = _zz_262_;
  2627. end
  2628. endcase
  2629. end
  2630. end
  2631. assign writeBack_MEMORY_ENABLE = memory_to_writeBack_MEMORY_ENABLE;
  2632. assign writeBack_MEMORY_ADDRESS_LOW = memory_to_writeBack_MEMORY_ADDRESS_LOW;
  2633. assign writeBack_MEMORY_READ_DATA = memory_to_writeBack_MEMORY_READ_DATA;
  2634. assign memory_MMU_FAULT = execute_to_memory_MMU_FAULT;
  2635. assign memory_MMU_RSP_physicalAddress = execute_to_memory_MMU_RSP_physicalAddress;
  2636. assign memory_MMU_RSP_isIoAccess = execute_to_memory_MMU_RSP_isIoAccess;
  2637. assign memory_MMU_RSP_allowRead = execute_to_memory_MMU_RSP_allowRead;
  2638. assign memory_MMU_RSP_allowWrite = execute_to_memory_MMU_RSP_allowWrite;
  2639. assign memory_MMU_RSP_allowExecute = execute_to_memory_MMU_RSP_allowExecute;
  2640. assign memory_MMU_RSP_exception = execute_to_memory_MMU_RSP_exception;
  2641. assign memory_MMU_RSP_refilling = execute_to_memory_MMU_RSP_refilling;
  2642. assign memory_PC = execute_to_memory_PC;
  2643. assign memory_REGFILE_WRITE_DATA = execute_to_memory_REGFILE_WRITE_DATA;
  2644. assign memory_MEMORY_STORE = execute_to_memory_MEMORY_STORE;
  2645. assign memory_MEMORY_ENABLE = execute_to_memory_MEMORY_ENABLE;
  2646. assign execute_MMU_FAULT = ((execute_MMU_RSP_exception || ((! execute_MMU_RSP_allowWrite) && execute_MEMORY_STORE)) || ((! execute_MMU_RSP_allowRead) && (! execute_MEMORY_STORE)));
  2647. assign execute_MMU_RSP_physicalAddress = DBusSimplePlugin_mmuBus_rsp_physicalAddress;
  2648. assign execute_MMU_RSP_isIoAccess = DBusSimplePlugin_mmuBus_rsp_isIoAccess;
  2649. assign execute_MMU_RSP_allowRead = DBusSimplePlugin_mmuBus_rsp_allowRead;
  2650. assign execute_MMU_RSP_allowWrite = DBusSimplePlugin_mmuBus_rsp_allowWrite;
  2651. assign execute_MMU_RSP_allowExecute = DBusSimplePlugin_mmuBus_rsp_allowExecute;
  2652. assign execute_MMU_RSP_exception = DBusSimplePlugin_mmuBus_rsp_exception;
  2653. assign execute_MMU_RSP_refilling = DBusSimplePlugin_mmuBus_rsp_refilling;
  2654. assign execute_SRC_ADD = execute_SrcPlugin_addSub;
  2655. assign execute_RS2 = decode_to_execute_RS2;
  2656. assign execute_INSTRUCTION = decode_to_execute_INSTRUCTION;
  2657. assign execute_MEMORY_STORE = decode_to_execute_MEMORY_STORE;
  2658. assign execute_MEMORY_ENABLE = decode_to_execute_MEMORY_ENABLE;
  2659. assign execute_ALIGNEMENT_FAULT = 1'b0;
  2660. assign decode_MEMORY_ENABLE = _zz_224_[0];
  2661. assign decode_FLUSH_ALL = _zz_225_[0];
  2662. always @ (*) begin
  2663. _zz_51_ = _zz_51__0;
  2664. if(_zz_174_)begin
  2665. _zz_51_ = 1'b1;
  2666. end
  2667. end
  2668. always @ (*) begin
  2669. _zz_51__0 = IBusCachedPlugin_rsp_issueDetected;
  2670. if(_zz_175_)begin
  2671. _zz_51__0 = 1'b1;
  2672. end
  2673. end
  2674. assign decode_BRANCH_CTRL = _zz_52_;
  2675. assign decode_INSTRUCTION = IBusCachedPlugin_iBusRsp_output_payload_rsp_inst;
  2676. always @ (*) begin
  2677. _zz_53_ = memory_FORMAL_PC_NEXT;
  2678. if(DBusSimplePlugin_redoBranch_valid)begin
  2679. _zz_53_ = DBusSimplePlugin_redoBranch_payload;
  2680. end
  2681. if(BranchPlugin_jumpInterface_valid)begin
  2682. _zz_53_ = BranchPlugin_jumpInterface_payload;
  2683. end
  2684. end
  2685. always @ (*) begin
  2686. _zz_54_ = decode_FORMAL_PC_NEXT;
  2687. if(IBusCachedPlugin_predictionJumpInterface_valid)begin
  2688. _zz_54_ = IBusCachedPlugin_predictionJumpInterface_payload;
  2689. end
  2690. end
  2691. assign decode_PC = IBusCachedPlugin_iBusRsp_output_payload_pc;
  2692. assign writeBack_PC = memory_to_writeBack_PC;
  2693. assign writeBack_INSTRUCTION = memory_to_writeBack_INSTRUCTION;
  2694. always @ (*) begin
  2695. decode_arbitration_haltItself = 1'b0;
  2696. if(((DBusSimplePlugin_mmuBus_busy && decode_arbitration_isValid) && decode_MEMORY_ENABLE))begin
  2697. decode_arbitration_haltItself = 1'b1;
  2698. end
  2699. end
  2700. always @ (*) begin
  2701. decode_arbitration_haltByOther = 1'b0;
  2702. if((decode_arbitration_isValid && (_zz_111_ || _zz_112_)))begin
  2703. decode_arbitration_haltByOther = 1'b1;
  2704. end
  2705. if(CsrPlugin_pipelineLiberator_active)begin
  2706. decode_arbitration_haltByOther = 1'b1;
  2707. end
  2708. if(({(writeBack_arbitration_isValid && (writeBack_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),{(memory_arbitration_isValid && (memory_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)),(execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET))}} != (3'b000)))begin
  2709. decode_arbitration_haltByOther = 1'b1;
  2710. end
  2711. end
  2712. always @ (*) begin
  2713. decode_arbitration_removeIt = 1'b0;
  2714. if(decode_arbitration_isFlushed)begin
  2715. decode_arbitration_removeIt = 1'b1;
  2716. end
  2717. end
  2718. assign decode_arbitration_flushIt = 1'b0;
  2719. always @ (*) begin
  2720. decode_arbitration_flushNext = 1'b0;
  2721. if(IBusCachedPlugin_predictionJumpInterface_valid)begin
  2722. decode_arbitration_flushNext = 1'b1;
  2723. end
  2724. end
  2725. always @ (*) begin
  2726. execute_arbitration_haltItself = 1'b0;
  2727. if(((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! dBus_cmd_ready)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_81_)))begin
  2728. execute_arbitration_haltItself = 1'b1;
  2729. end
  2730. if(_zz_168_)begin
  2731. if(execute_CsrPlugin_blockedBySideEffects)begin
  2732. execute_arbitration_haltItself = 1'b1;
  2733. end
  2734. end
  2735. end
  2736. assign execute_arbitration_haltByOther = 1'b0;
  2737. always @ (*) begin
  2738. execute_arbitration_removeIt = 1'b0;
  2739. if(CsrPlugin_selfException_valid)begin
  2740. execute_arbitration_removeIt = 1'b1;
  2741. end
  2742. if(execute_arbitration_isFlushed)begin
  2743. execute_arbitration_removeIt = 1'b1;
  2744. end
  2745. end
  2746. assign execute_arbitration_flushIt = 1'b0;
  2747. always @ (*) begin
  2748. execute_arbitration_flushNext = 1'b0;
  2749. if(CsrPlugin_selfException_valid)begin
  2750. execute_arbitration_flushNext = 1'b1;
  2751. end
  2752. end
  2753. always @ (*) begin
  2754. memory_arbitration_haltItself = 1'b0;
  2755. if((((memory_arbitration_isValid && memory_MEMORY_ENABLE) && (! memory_MEMORY_STORE)) && ((! dBus_rsp_ready) || 1'b0)))begin
  2756. memory_arbitration_haltItself = 1'b1;
  2757. end
  2758. if(_zz_173_)begin
  2759. if(((! memory_DivPlugin_frontendOk) || (! memory_DivPlugin_div_done)))begin
  2760. memory_arbitration_haltItself = 1'b1;
  2761. end
  2762. end
  2763. end
  2764. assign memory_arbitration_haltByOther = 1'b0;
  2765. always @ (*) begin
  2766. memory_arbitration_removeIt = 1'b0;
  2767. if(DBusSimplePlugin_memoryExceptionPort_valid)begin
  2768. memory_arbitration_removeIt = 1'b1;
  2769. end
  2770. if(memory_arbitration_isFlushed)begin
  2771. memory_arbitration_removeIt = 1'b1;
  2772. end
  2773. end
  2774. always @ (*) begin
  2775. memory_arbitration_flushIt = 1'b0;
  2776. if(DBusSimplePlugin_redoBranch_valid)begin
  2777. memory_arbitration_flushIt = 1'b1;
  2778. end
  2779. end
  2780. always @ (*) begin
  2781. memory_arbitration_flushNext = 1'b0;
  2782. if(DBusSimplePlugin_redoBranch_valid)begin
  2783. memory_arbitration_flushNext = 1'b1;
  2784. end
  2785. if(BranchPlugin_jumpInterface_valid)begin
  2786. memory_arbitration_flushNext = 1'b1;
  2787. end
  2788. if(DBusSimplePlugin_memoryExceptionPort_valid)begin
  2789. memory_arbitration_flushNext = 1'b1;
  2790. end
  2791. end
  2792. assign writeBack_arbitration_haltItself = 1'b0;
  2793. assign writeBack_arbitration_haltByOther = 1'b0;
  2794. always @ (*) begin
  2795. writeBack_arbitration_removeIt = 1'b0;
  2796. if(writeBack_arbitration_isFlushed)begin
  2797. writeBack_arbitration_removeIt = 1'b1;
  2798. end
  2799. end
  2800. assign writeBack_arbitration_flushIt = 1'b0;
  2801. always @ (*) begin
  2802. writeBack_arbitration_flushNext = 1'b0;
  2803. if(_zz_176_)begin
  2804. writeBack_arbitration_flushNext = 1'b1;
  2805. end
  2806. if(_zz_177_)begin
  2807. writeBack_arbitration_flushNext = 1'b1;
  2808. end
  2809. end
  2810. assign lastStageInstruction = writeBack_INSTRUCTION;
  2811. assign lastStagePc = writeBack_PC;
  2812. assign lastStageIsValid = writeBack_arbitration_isValid;
  2813. assign lastStageIsFiring = writeBack_arbitration_isFiring;
  2814. always @ (*) begin
  2815. IBusCachedPlugin_fetcherHalt = 1'b0;
  2816. if(({CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValids_memory,{CsrPlugin_exceptionPortCtrl_exceptionValids_execute,CsrPlugin_exceptionPortCtrl_exceptionValids_decode}}} != (4'b0000)))begin
  2817. IBusCachedPlugin_fetcherHalt = 1'b1;
  2818. end
  2819. if(_zz_176_)begin
  2820. IBusCachedPlugin_fetcherHalt = 1'b1;
  2821. end
  2822. if(_zz_177_)begin
  2823. IBusCachedPlugin_fetcherHalt = 1'b1;
  2824. end
  2825. end
  2826. always @ (*) begin
  2827. IBusCachedPlugin_incomingInstruction = 1'b0;
  2828. if((IBusCachedPlugin_iBusRsp_stages_1_input_valid || IBusCachedPlugin_iBusRsp_stages_2_input_valid))begin
  2829. IBusCachedPlugin_incomingInstruction = 1'b1;
  2830. end
  2831. end
  2832. assign CsrPlugin_inWfi = 1'b0;
  2833. assign CsrPlugin_thirdPartyWake = 1'b0;
  2834. always @ (*) begin
  2835. CsrPlugin_jumpInterface_valid = 1'b0;
  2836. if(_zz_176_)begin
  2837. CsrPlugin_jumpInterface_valid = 1'b1;
  2838. end
  2839. if(_zz_177_)begin
  2840. CsrPlugin_jumpInterface_valid = 1'b1;
  2841. end
  2842. end
  2843. always @ (*) begin
  2844. CsrPlugin_jumpInterface_payload = 32'h0;
  2845. if(_zz_176_)begin
  2846. CsrPlugin_jumpInterface_payload = {CsrPlugin_xtvec_base,(2'b00)};
  2847. end
  2848. if(_zz_177_)begin
  2849. case(_zz_178_)
  2850. 2'b11 : begin
  2851. CsrPlugin_jumpInterface_payload = CsrPlugin_mepc;
  2852. end
  2853. default : begin
  2854. end
  2855. endcase
  2856. end
  2857. end
  2858. assign CsrPlugin_forceMachineWire = 1'b0;
  2859. assign CsrPlugin_allowInterrupts = 1'b1;
  2860. assign CsrPlugin_allowException = 1'b1;
  2861. assign IBusCachedPlugin_externalFlush = ({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,{execute_arbitration_flushNext,decode_arbitration_flushNext}}} != (4'b0000));
  2862. assign IBusCachedPlugin_jump_pcLoad_valid = ({CsrPlugin_jumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,IBusCachedPlugin_predictionJumpInterface_valid}}} != (4'b0000));
  2863. assign _zz_55_ = {IBusCachedPlugin_predictionJumpInterface_valid,{BranchPlugin_jumpInterface_valid,{DBusSimplePlugin_redoBranch_valid,CsrPlugin_jumpInterface_valid}}};
  2864. assign _zz_56_ = (_zz_55_ & (~ _zz_226_));
  2865. assign _zz_57_ = _zz_56_[3];
  2866. assign _zz_58_ = (_zz_56_[1] || _zz_57_);
  2867. assign _zz_59_ = (_zz_56_[2] || _zz_57_);
  2868. assign IBusCachedPlugin_jump_pcLoad_payload = _zz_167_;
  2869. always @ (*) begin
  2870. IBusCachedPlugin_fetchPc_correction = 1'b0;
  2871. if(IBusCachedPlugin_fetchPc_redo_valid)begin
  2872. IBusCachedPlugin_fetchPc_correction = 1'b1;
  2873. end
  2874. if(IBusCachedPlugin_jump_pcLoad_valid)begin
  2875. IBusCachedPlugin_fetchPc_correction = 1'b1;
  2876. end
  2877. end
  2878. assign IBusCachedPlugin_fetchPc_corrected = (IBusCachedPlugin_fetchPc_correction || IBusCachedPlugin_fetchPc_correctionReg);
  2879. always @ (*) begin
  2880. IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b0;
  2881. if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin
  2882. IBusCachedPlugin_fetchPc_pcRegPropagate = 1'b1;
  2883. end
  2884. end
  2885. always @ (*) begin
  2886. IBusCachedPlugin_fetchPc_pc = (IBusCachedPlugin_fetchPc_pcReg + _zz_228_);
  2887. if(IBusCachedPlugin_fetchPc_redo_valid)begin
  2888. IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_fetchPc_redo_payload;
  2889. end
  2890. if(IBusCachedPlugin_jump_pcLoad_valid)begin
  2891. IBusCachedPlugin_fetchPc_pc = IBusCachedPlugin_jump_pcLoad_payload;
  2892. end
  2893. IBusCachedPlugin_fetchPc_pc[0] = 1'b0;
  2894. IBusCachedPlugin_fetchPc_pc[1] = 1'b0;
  2895. end
  2896. always @ (*) begin
  2897. IBusCachedPlugin_fetchPc_flushed = 1'b0;
  2898. if(IBusCachedPlugin_fetchPc_redo_valid)begin
  2899. IBusCachedPlugin_fetchPc_flushed = 1'b1;
  2900. end
  2901. if(IBusCachedPlugin_jump_pcLoad_valid)begin
  2902. IBusCachedPlugin_fetchPc_flushed = 1'b1;
  2903. end
  2904. end
  2905. assign IBusCachedPlugin_fetchPc_output_valid = ((! IBusCachedPlugin_fetcherHalt) && IBusCachedPlugin_fetchPc_booted);
  2906. assign IBusCachedPlugin_fetchPc_output_payload = IBusCachedPlugin_fetchPc_pc;
  2907. always @ (*) begin
  2908. IBusCachedPlugin_iBusRsp_redoFetch = 1'b0;
  2909. if(IBusCachedPlugin_rsp_redoFetch)begin
  2910. IBusCachedPlugin_iBusRsp_redoFetch = 1'b1;
  2911. end
  2912. end
  2913. assign IBusCachedPlugin_iBusRsp_stages_0_input_valid = IBusCachedPlugin_fetchPc_output_valid;
  2914. assign IBusCachedPlugin_fetchPc_output_ready = IBusCachedPlugin_iBusRsp_stages_0_input_ready;
  2915. assign IBusCachedPlugin_iBusRsp_stages_0_input_payload = IBusCachedPlugin_fetchPc_output_payload;
  2916. always @ (*) begin
  2917. IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b0;
  2918. if(IBusCachedPlugin_cache_io_cpu_prefetch_haltIt)begin
  2919. IBusCachedPlugin_iBusRsp_stages_0_halt = 1'b1;
  2920. end
  2921. end
  2922. assign _zz_60_ = (! IBusCachedPlugin_iBusRsp_stages_0_halt);
  2923. assign IBusCachedPlugin_iBusRsp_stages_0_input_ready = (IBusCachedPlugin_iBusRsp_stages_0_output_ready && _zz_60_);
  2924. assign IBusCachedPlugin_iBusRsp_stages_0_output_valid = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && _zz_60_);
  2925. assign IBusCachedPlugin_iBusRsp_stages_0_output_payload = IBusCachedPlugin_iBusRsp_stages_0_input_payload;
  2926. always @ (*) begin
  2927. IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b0;
  2928. if(IBusCachedPlugin_cache_io_cpu_fetch_haltIt)begin
  2929. IBusCachedPlugin_iBusRsp_stages_1_halt = 1'b1;
  2930. end
  2931. end
  2932. assign _zz_61_ = (! IBusCachedPlugin_iBusRsp_stages_1_halt);
  2933. assign IBusCachedPlugin_iBusRsp_stages_1_input_ready = (IBusCachedPlugin_iBusRsp_stages_1_output_ready && _zz_61_);
  2934. assign IBusCachedPlugin_iBusRsp_stages_1_output_valid = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && _zz_61_);
  2935. assign IBusCachedPlugin_iBusRsp_stages_1_output_payload = IBusCachedPlugin_iBusRsp_stages_1_input_payload;
  2936. always @ (*) begin
  2937. IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b0;
  2938. if((_zz_51_ || IBusCachedPlugin_rsp_iBusRspOutputHalt))begin
  2939. IBusCachedPlugin_iBusRsp_stages_2_halt = 1'b1;
  2940. end
  2941. end
  2942. assign _zz_62_ = (! IBusCachedPlugin_iBusRsp_stages_2_halt);
  2943. assign IBusCachedPlugin_iBusRsp_stages_2_input_ready = (IBusCachedPlugin_iBusRsp_stages_2_output_ready && _zz_62_);
  2944. assign IBusCachedPlugin_iBusRsp_stages_2_output_valid = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && _zz_62_);
  2945. assign IBusCachedPlugin_iBusRsp_stages_2_output_payload = IBusCachedPlugin_iBusRsp_stages_2_input_payload;
  2946. assign IBusCachedPlugin_fetchPc_redo_valid = IBusCachedPlugin_iBusRsp_redoFetch;
  2947. assign IBusCachedPlugin_fetchPc_redo_payload = IBusCachedPlugin_iBusRsp_stages_2_input_payload;
  2948. assign IBusCachedPlugin_iBusRsp_flush = ((decode_arbitration_removeIt || (decode_arbitration_flushNext && (! decode_arbitration_isStuck))) || IBusCachedPlugin_iBusRsp_redoFetch);
  2949. assign IBusCachedPlugin_iBusRsp_stages_0_output_ready = _zz_63_;
  2950. assign _zz_63_ = ((1'b0 && (! _zz_64_)) || IBusCachedPlugin_iBusRsp_stages_1_input_ready);
  2951. assign _zz_64_ = _zz_65_;
  2952. assign IBusCachedPlugin_iBusRsp_stages_1_input_valid = _zz_64_;
  2953. assign IBusCachedPlugin_iBusRsp_stages_1_input_payload = IBusCachedPlugin_fetchPc_pcReg;
  2954. assign IBusCachedPlugin_iBusRsp_stages_1_output_ready = ((1'b0 && (! _zz_66_)) || IBusCachedPlugin_iBusRsp_stages_2_input_ready);
  2955. assign _zz_66_ = _zz_67_;
  2956. assign IBusCachedPlugin_iBusRsp_stages_2_input_valid = _zz_66_;
  2957. assign IBusCachedPlugin_iBusRsp_stages_2_input_payload = _zz_68_;
  2958. always @ (*) begin
  2959. IBusCachedPlugin_iBusRsp_readyForError = 1'b1;
  2960. if((! IBusCachedPlugin_pcValids_0))begin
  2961. IBusCachedPlugin_iBusRsp_readyForError = 1'b0;
  2962. end
  2963. end
  2964. assign IBusCachedPlugin_pcValids_0 = IBusCachedPlugin_injector_nextPcCalc_valids_1;
  2965. assign IBusCachedPlugin_pcValids_1 = IBusCachedPlugin_injector_nextPcCalc_valids_2;
  2966. assign IBusCachedPlugin_pcValids_2 = IBusCachedPlugin_injector_nextPcCalc_valids_3;
  2967. assign IBusCachedPlugin_pcValids_3 = IBusCachedPlugin_injector_nextPcCalc_valids_4;
  2968. assign IBusCachedPlugin_iBusRsp_output_ready = (! decode_arbitration_isStuck);
  2969. assign decode_arbitration_isValid = IBusCachedPlugin_iBusRsp_output_valid;
  2970. assign _zz_69_ = _zz_229_[11];
  2971. always @ (*) begin
  2972. _zz_70_[18] = _zz_69_;
  2973. _zz_70_[17] = _zz_69_;
  2974. _zz_70_[16] = _zz_69_;
  2975. _zz_70_[15] = _zz_69_;
  2976. _zz_70_[14] = _zz_69_;
  2977. _zz_70_[13] = _zz_69_;
  2978. _zz_70_[12] = _zz_69_;
  2979. _zz_70_[11] = _zz_69_;
  2980. _zz_70_[10] = _zz_69_;
  2981. _zz_70_[9] = _zz_69_;
  2982. _zz_70_[8] = _zz_69_;
  2983. _zz_70_[7] = _zz_69_;
  2984. _zz_70_[6] = _zz_69_;
  2985. _zz_70_[5] = _zz_69_;
  2986. _zz_70_[4] = _zz_69_;
  2987. _zz_70_[3] = _zz_69_;
  2988. _zz_70_[2] = _zz_69_;
  2989. _zz_70_[1] = _zz_69_;
  2990. _zz_70_[0] = _zz_69_;
  2991. end
  2992. always @ (*) begin
  2993. IBusCachedPlugin_decodePrediction_cmd_hadBranch = ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) || ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_B) && _zz_230_[31]));
  2994. if(_zz_75_)begin
  2995. IBusCachedPlugin_decodePrediction_cmd_hadBranch = 1'b0;
  2996. end
  2997. end
  2998. assign _zz_71_ = _zz_231_[19];
  2999. always @ (*) begin
  3000. _zz_72_[10] = _zz_71_;
  3001. _zz_72_[9] = _zz_71_;
  3002. _zz_72_[8] = _zz_71_;
  3003. _zz_72_[7] = _zz_71_;
  3004. _zz_72_[6] = _zz_71_;
  3005. _zz_72_[5] = _zz_71_;
  3006. _zz_72_[4] = _zz_71_;
  3007. _zz_72_[3] = _zz_71_;
  3008. _zz_72_[2] = _zz_71_;
  3009. _zz_72_[1] = _zz_71_;
  3010. _zz_72_[0] = _zz_71_;
  3011. end
  3012. assign _zz_73_ = _zz_232_[11];
  3013. always @ (*) begin
  3014. _zz_74_[18] = _zz_73_;
  3015. _zz_74_[17] = _zz_73_;
  3016. _zz_74_[16] = _zz_73_;
  3017. _zz_74_[15] = _zz_73_;
  3018. _zz_74_[14] = _zz_73_;
  3019. _zz_74_[13] = _zz_73_;
  3020. _zz_74_[12] = _zz_73_;
  3021. _zz_74_[11] = _zz_73_;
  3022. _zz_74_[10] = _zz_73_;
  3023. _zz_74_[9] = _zz_73_;
  3024. _zz_74_[8] = _zz_73_;
  3025. _zz_74_[7] = _zz_73_;
  3026. _zz_74_[6] = _zz_73_;
  3027. _zz_74_[5] = _zz_73_;
  3028. _zz_74_[4] = _zz_73_;
  3029. _zz_74_[3] = _zz_73_;
  3030. _zz_74_[2] = _zz_73_;
  3031. _zz_74_[1] = _zz_73_;
  3032. _zz_74_[0] = _zz_73_;
  3033. end
  3034. always @ (*) begin
  3035. case(decode_BRANCH_CTRL)
  3036. `BranchCtrlEnum_defaultEncoding_JAL : begin
  3037. _zz_75_ = _zz_233_[1];
  3038. end
  3039. default : begin
  3040. _zz_75_ = _zz_234_[1];
  3041. end
  3042. endcase
  3043. end
  3044. assign IBusCachedPlugin_predictionJumpInterface_valid = (decode_arbitration_isValid && IBusCachedPlugin_decodePrediction_cmd_hadBranch);
  3045. assign _zz_76_ = _zz_235_[19];
  3046. always @ (*) begin
  3047. _zz_77_[10] = _zz_76_;
  3048. _zz_77_[9] = _zz_76_;
  3049. _zz_77_[8] = _zz_76_;
  3050. _zz_77_[7] = _zz_76_;
  3051. _zz_77_[6] = _zz_76_;
  3052. _zz_77_[5] = _zz_76_;
  3053. _zz_77_[4] = _zz_76_;
  3054. _zz_77_[3] = _zz_76_;
  3055. _zz_77_[2] = _zz_76_;
  3056. _zz_77_[1] = _zz_76_;
  3057. _zz_77_[0] = _zz_76_;
  3058. end
  3059. assign _zz_78_ = _zz_236_[11];
  3060. always @ (*) begin
  3061. _zz_79_[18] = _zz_78_;
  3062. _zz_79_[17] = _zz_78_;
  3063. _zz_79_[16] = _zz_78_;
  3064. _zz_79_[15] = _zz_78_;
  3065. _zz_79_[14] = _zz_78_;
  3066. _zz_79_[13] = _zz_78_;
  3067. _zz_79_[12] = _zz_78_;
  3068. _zz_79_[11] = _zz_78_;
  3069. _zz_79_[10] = _zz_78_;
  3070. _zz_79_[9] = _zz_78_;
  3071. _zz_79_[8] = _zz_78_;
  3072. _zz_79_[7] = _zz_78_;
  3073. _zz_79_[6] = _zz_78_;
  3074. _zz_79_[5] = _zz_78_;
  3075. _zz_79_[4] = _zz_78_;
  3076. _zz_79_[3] = _zz_78_;
  3077. _zz_79_[2] = _zz_78_;
  3078. _zz_79_[1] = _zz_78_;
  3079. _zz_79_[0] = _zz_78_;
  3080. end
  3081. assign IBusCachedPlugin_predictionJumpInterface_payload = (decode_PC + ((decode_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_77_,{{{_zz_291_,decode_INSTRUCTION[19 : 12]},decode_INSTRUCTION[20]},decode_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_79_,{{{_zz_292_,_zz_293_},decode_INSTRUCTION[30 : 25]},decode_INSTRUCTION[11 : 8]}},1'b0}));
  3082. assign iBus_cmd_valid = IBusCachedPlugin_cache_io_mem_cmd_valid;
  3083. always @ (*) begin
  3084. iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address;
  3085. iBus_cmd_payload_address = IBusCachedPlugin_cache_io_mem_cmd_payload_address;
  3086. end
  3087. assign iBus_cmd_payload_size = IBusCachedPlugin_cache_io_mem_cmd_payload_size;
  3088. assign IBusCachedPlugin_s0_tightlyCoupledHit = 1'b0;
  3089. assign _zz_158_ = (IBusCachedPlugin_iBusRsp_stages_0_input_valid && (! IBusCachedPlugin_s0_tightlyCoupledHit));
  3090. assign _zz_159_ = (IBusCachedPlugin_iBusRsp_stages_1_input_valid && (! IBusCachedPlugin_s1_tightlyCoupledHit));
  3091. assign _zz_160_ = (! IBusCachedPlugin_iBusRsp_stages_1_input_ready);
  3092. assign _zz_161_ = (IBusCachedPlugin_iBusRsp_stages_2_input_valid && (! IBusCachedPlugin_s2_tightlyCoupledHit));
  3093. assign _zz_162_ = (! IBusCachedPlugin_iBusRsp_stages_2_input_ready);
  3094. assign _zz_163_ = (CsrPlugin_privilege == (2'b00));
  3095. assign IBusCachedPlugin_rsp_iBusRspOutputHalt = 1'b0;
  3096. assign IBusCachedPlugin_rsp_issueDetected = 1'b0;
  3097. always @ (*) begin
  3098. IBusCachedPlugin_rsp_redoFetch = 1'b0;
  3099. if(_zz_175_)begin
  3100. IBusCachedPlugin_rsp_redoFetch = 1'b1;
  3101. end
  3102. if(_zz_174_)begin
  3103. IBusCachedPlugin_rsp_redoFetch = 1'b1;
  3104. end
  3105. end
  3106. always @ (*) begin
  3107. _zz_164_ = (IBusCachedPlugin_rsp_redoFetch && (! IBusCachedPlugin_cache_io_cpu_decode_mmuRefilling));
  3108. if(_zz_174_)begin
  3109. _zz_164_ = 1'b1;
  3110. end
  3111. end
  3112. assign IBusCachedPlugin_iBusRsp_output_valid = IBusCachedPlugin_iBusRsp_stages_2_output_valid;
  3113. assign IBusCachedPlugin_iBusRsp_stages_2_output_ready = IBusCachedPlugin_iBusRsp_output_ready;
  3114. assign IBusCachedPlugin_iBusRsp_output_payload_rsp_inst = IBusCachedPlugin_cache_io_cpu_decode_data;
  3115. assign IBusCachedPlugin_iBusRsp_output_payload_pc = IBusCachedPlugin_iBusRsp_stages_2_output_payload;
  3116. assign IBusCachedPlugin_mmuBus_cmd_isValid = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_isValid;
  3117. assign IBusCachedPlugin_mmuBus_cmd_virtualAddress = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_virtualAddress;
  3118. assign IBusCachedPlugin_mmuBus_cmd_bypassTranslation = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_cmd_bypassTranslation;
  3119. assign IBusCachedPlugin_mmuBus_end = IBusCachedPlugin_cache_io_cpu_fetch_mmuBus_end;
  3120. assign _zz_157_ = (decode_arbitration_isValid && decode_FLUSH_ALL);
  3121. assign _zz_81_ = 1'b0;
  3122. always @ (*) begin
  3123. execute_DBusSimplePlugin_skipCmd = 1'b0;
  3124. if(execute_ALIGNEMENT_FAULT)begin
  3125. execute_DBusSimplePlugin_skipCmd = 1'b1;
  3126. end
  3127. if((execute_MMU_FAULT || execute_MMU_RSP_refilling))begin
  3128. execute_DBusSimplePlugin_skipCmd = 1'b1;
  3129. end
  3130. end
  3131. assign dBus_cmd_valid = (((((execute_arbitration_isValid && execute_MEMORY_ENABLE) && (! execute_arbitration_isStuckByOthers)) && (! execute_arbitration_isFlushed)) && (! execute_DBusSimplePlugin_skipCmd)) && (! _zz_81_));
  3132. assign dBus_cmd_payload_wr = execute_MEMORY_STORE;
  3133. assign dBus_cmd_payload_size = execute_INSTRUCTION[13 : 12];
  3134. always @ (*) begin
  3135. case(dBus_cmd_payload_size)
  3136. 2'b00 : begin
  3137. _zz_82_ = {{{execute_RS2[7 : 0],execute_RS2[7 : 0]},execute_RS2[7 : 0]},execute_RS2[7 : 0]};
  3138. end
  3139. 2'b01 : begin
  3140. _zz_82_ = {execute_RS2[15 : 0],execute_RS2[15 : 0]};
  3141. end
  3142. default : begin
  3143. _zz_82_ = execute_RS2[31 : 0];
  3144. end
  3145. endcase
  3146. end
  3147. assign dBus_cmd_payload_data = _zz_82_;
  3148. always @ (*) begin
  3149. case(dBus_cmd_payload_size)
  3150. 2'b00 : begin
  3151. _zz_83_ = (4'b0001);
  3152. end
  3153. 2'b01 : begin
  3154. _zz_83_ = (4'b0011);
  3155. end
  3156. default : begin
  3157. _zz_83_ = (4'b1111);
  3158. end
  3159. endcase
  3160. end
  3161. assign execute_DBusSimplePlugin_formalMask = (_zz_83_ <<< dBus_cmd_payload_address[1 : 0]);
  3162. assign DBusSimplePlugin_mmuBus_cmd_isValid = (execute_arbitration_isValid && execute_MEMORY_ENABLE);
  3163. assign DBusSimplePlugin_mmuBus_cmd_virtualAddress = execute_SRC_ADD;
  3164. assign DBusSimplePlugin_mmuBus_cmd_bypassTranslation = 1'b0;
  3165. assign DBusSimplePlugin_mmuBus_end = ((! execute_arbitration_isStuck) || execute_arbitration_removeIt);
  3166. assign dBus_cmd_payload_address = DBusSimplePlugin_mmuBus_rsp_physicalAddress;
  3167. always @ (*) begin
  3168. DBusSimplePlugin_memoryExceptionPort_valid = 1'b0;
  3169. if(memory_MMU_RSP_refilling)begin
  3170. DBusSimplePlugin_memoryExceptionPort_valid = 1'b0;
  3171. end else begin
  3172. if(memory_MMU_FAULT)begin
  3173. DBusSimplePlugin_memoryExceptionPort_valid = 1'b1;
  3174. end
  3175. end
  3176. if(_zz_179_)begin
  3177. DBusSimplePlugin_memoryExceptionPort_valid = 1'b0;
  3178. end
  3179. end
  3180. always @ (*) begin
  3181. DBusSimplePlugin_memoryExceptionPort_payload_code = (4'bxxxx);
  3182. if(! memory_MMU_RSP_refilling) begin
  3183. if(memory_MMU_FAULT)begin
  3184. DBusSimplePlugin_memoryExceptionPort_payload_code = (memory_MEMORY_STORE ? (4'b1111) : (4'b1101));
  3185. end
  3186. end
  3187. end
  3188. assign DBusSimplePlugin_memoryExceptionPort_payload_badAddr = memory_REGFILE_WRITE_DATA;
  3189. always @ (*) begin
  3190. DBusSimplePlugin_redoBranch_valid = 1'b0;
  3191. if(memory_MMU_RSP_refilling)begin
  3192. DBusSimplePlugin_redoBranch_valid = 1'b1;
  3193. end
  3194. if(_zz_179_)begin
  3195. DBusSimplePlugin_redoBranch_valid = 1'b0;
  3196. end
  3197. end
  3198. assign DBusSimplePlugin_redoBranch_payload = memory_PC;
  3199. always @ (*) begin
  3200. writeBack_DBusSimplePlugin_rspShifted = writeBack_MEMORY_READ_DATA;
  3201. case(writeBack_MEMORY_ADDRESS_LOW)
  3202. 2'b01 : begin
  3203. writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[15 : 8];
  3204. end
  3205. 2'b10 : begin
  3206. writeBack_DBusSimplePlugin_rspShifted[15 : 0] = writeBack_MEMORY_READ_DATA[31 : 16];
  3207. end
  3208. 2'b11 : begin
  3209. writeBack_DBusSimplePlugin_rspShifted[7 : 0] = writeBack_MEMORY_READ_DATA[31 : 24];
  3210. end
  3211. default : begin
  3212. end
  3213. endcase
  3214. end
  3215. assign _zz_84_ = (writeBack_DBusSimplePlugin_rspShifted[7] && (! writeBack_INSTRUCTION[14]));
  3216. always @ (*) begin
  3217. _zz_85_[31] = _zz_84_;
  3218. _zz_85_[30] = _zz_84_;
  3219. _zz_85_[29] = _zz_84_;
  3220. _zz_85_[28] = _zz_84_;
  3221. _zz_85_[27] = _zz_84_;
  3222. _zz_85_[26] = _zz_84_;
  3223. _zz_85_[25] = _zz_84_;
  3224. _zz_85_[24] = _zz_84_;
  3225. _zz_85_[23] = _zz_84_;
  3226. _zz_85_[22] = _zz_84_;
  3227. _zz_85_[21] = _zz_84_;
  3228. _zz_85_[20] = _zz_84_;
  3229. _zz_85_[19] = _zz_84_;
  3230. _zz_85_[18] = _zz_84_;
  3231. _zz_85_[17] = _zz_84_;
  3232. _zz_85_[16] = _zz_84_;
  3233. _zz_85_[15] = _zz_84_;
  3234. _zz_85_[14] = _zz_84_;
  3235. _zz_85_[13] = _zz_84_;
  3236. _zz_85_[12] = _zz_84_;
  3237. _zz_85_[11] = _zz_84_;
  3238. _zz_85_[10] = _zz_84_;
  3239. _zz_85_[9] = _zz_84_;
  3240. _zz_85_[8] = _zz_84_;
  3241. _zz_85_[7 : 0] = writeBack_DBusSimplePlugin_rspShifted[7 : 0];
  3242. end
  3243. assign _zz_86_ = (writeBack_DBusSimplePlugin_rspShifted[15] && (! writeBack_INSTRUCTION[14]));
  3244. always @ (*) begin
  3245. _zz_87_[31] = _zz_86_;
  3246. _zz_87_[30] = _zz_86_;
  3247. _zz_87_[29] = _zz_86_;
  3248. _zz_87_[28] = _zz_86_;
  3249. _zz_87_[27] = _zz_86_;
  3250. _zz_87_[26] = _zz_86_;
  3251. _zz_87_[25] = _zz_86_;
  3252. _zz_87_[24] = _zz_86_;
  3253. _zz_87_[23] = _zz_86_;
  3254. _zz_87_[22] = _zz_86_;
  3255. _zz_87_[21] = _zz_86_;
  3256. _zz_87_[20] = _zz_86_;
  3257. _zz_87_[19] = _zz_86_;
  3258. _zz_87_[18] = _zz_86_;
  3259. _zz_87_[17] = _zz_86_;
  3260. _zz_87_[16] = _zz_86_;
  3261. _zz_87_[15 : 0] = writeBack_DBusSimplePlugin_rspShifted[15 : 0];
  3262. end
  3263. always @ (*) begin
  3264. case(_zz_195_)
  3265. 2'b00 : begin
  3266. writeBack_DBusSimplePlugin_rspFormated = _zz_85_;
  3267. end
  3268. 2'b01 : begin
  3269. writeBack_DBusSimplePlugin_rspFormated = _zz_87_;
  3270. end
  3271. default : begin
  3272. writeBack_DBusSimplePlugin_rspFormated = writeBack_DBusSimplePlugin_rspShifted;
  3273. end
  3274. endcase
  3275. end
  3276. assign IBusCachedPlugin_mmuBus_rsp_physicalAddress = IBusCachedPlugin_mmuBus_cmd_virtualAddress;
  3277. assign IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1;
  3278. assign IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1;
  3279. assign IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1;
  3280. assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = IBusCachedPlugin_mmuBus_rsp_physicalAddress[31];
  3281. assign IBusCachedPlugin_mmuBus_rsp_exception = 1'b0;
  3282. assign IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0;
  3283. assign IBusCachedPlugin_mmuBus_busy = 1'b0;
  3284. assign DBusSimplePlugin_mmuBus_rsp_physicalAddress = DBusSimplePlugin_mmuBus_cmd_virtualAddress;
  3285. assign DBusSimplePlugin_mmuBus_rsp_allowRead = 1'b1;
  3286. assign DBusSimplePlugin_mmuBus_rsp_allowWrite = 1'b1;
  3287. assign DBusSimplePlugin_mmuBus_rsp_allowExecute = 1'b1;
  3288. assign DBusSimplePlugin_mmuBus_rsp_isIoAccess = DBusSimplePlugin_mmuBus_rsp_physicalAddress[31];
  3289. assign DBusSimplePlugin_mmuBus_rsp_exception = 1'b0;
  3290. assign DBusSimplePlugin_mmuBus_rsp_refilling = 1'b0;
  3291. assign DBusSimplePlugin_mmuBus_busy = 1'b0;
  3292. assign _zz_89_ = ((decode_INSTRUCTION & 32'h00000004) == 32'h00000004);
  3293. assign _zz_90_ = ((decode_INSTRUCTION & 32'h00006004) == 32'h00002000);
  3294. assign _zz_91_ = ((decode_INSTRUCTION & 32'h00001000) == 32'h0);
  3295. assign _zz_92_ = ((decode_INSTRUCTION & 32'h00004050) == 32'h00004050);
  3296. assign _zz_93_ = ((decode_INSTRUCTION & 32'h00000048) == 32'h00000048);
  3297. assign _zz_88_ = {(_zz_91_ != (1'b0)),{((_zz_294_ == _zz_295_) != (1'b0)),{({_zz_296_,_zz_297_} != (2'b00)),{(_zz_298_ != _zz_299_),{_zz_300_,{_zz_301_,_zz_302_}}}}}};
  3298. assign _zz_94_ = _zz_88_[1 : 0];
  3299. assign _zz_49_ = _zz_94_;
  3300. assign _zz_95_ = _zz_88_[4 : 3];
  3301. assign _zz_48_ = _zz_95_;
  3302. assign _zz_96_ = _zz_88_[7 : 6];
  3303. assign _zz_47_ = _zz_96_;
  3304. assign _zz_97_ = _zz_88_[9 : 8];
  3305. assign _zz_46_ = _zz_97_;
  3306. assign _zz_98_ = _zz_88_[12 : 11];
  3307. assign _zz_45_ = _zz_98_;
  3308. assign _zz_99_ = _zz_88_[24 : 23];
  3309. assign _zz_44_ = _zz_99_;
  3310. assign _zz_100_ = _zz_88_[27 : 26];
  3311. assign _zz_43_ = _zz_100_;
  3312. assign decode_RegFilePlugin_regFileReadAddress1 = {RegFilePlugin_shadow_read,decode_INSTRUCTION_ANTICIPATED[19 : 15]};
  3313. assign decode_RegFilePlugin_regFileReadAddress2 = {RegFilePlugin_shadow_read,decode_INSTRUCTION_ANTICIPATED[24 : 20]};
  3314. assign decode_RegFilePlugin_rs1Data = _zz_165_;
  3315. assign decode_RegFilePlugin_rs2Data = _zz_166_;
  3316. always @ (*) begin
  3317. lastStageRegFileWrite_valid = (_zz_41_ && writeBack_arbitration_isFiring);
  3318. if(_zz_101_)begin
  3319. lastStageRegFileWrite_valid = 1'b1;
  3320. end
  3321. end
  3322. assign lastStageRegFileWrite_payload_address = {RegFilePlugin_shadow_write,_zz_40_[11 : 7]};
  3323. assign lastStageRegFileWrite_payload_data = _zz_50_;
  3324. always @ (*) begin
  3325. case(execute_ALU_BITWISE_CTRL)
  3326. `AluBitwiseCtrlEnum_defaultEncoding_AND_1 : begin
  3327. execute_IntAluPlugin_bitwise = (execute_SRC1 & execute_SRC2);
  3328. end
  3329. `AluBitwiseCtrlEnum_defaultEncoding_OR_1 : begin
  3330. execute_IntAluPlugin_bitwise = (execute_SRC1 | execute_SRC2);
  3331. end
  3332. default : begin
  3333. execute_IntAluPlugin_bitwise = (execute_SRC1 ^ execute_SRC2);
  3334. end
  3335. endcase
  3336. end
  3337. always @ (*) begin
  3338. case(execute_ALU_CTRL)
  3339. `AluCtrlEnum_defaultEncoding_BITWISE : begin
  3340. _zz_102_ = execute_IntAluPlugin_bitwise;
  3341. end
  3342. `AluCtrlEnum_defaultEncoding_SLT_SLTU : begin
  3343. _zz_102_ = {31'd0, _zz_237_};
  3344. end
  3345. default : begin
  3346. _zz_102_ = execute_SRC_ADD_SUB;
  3347. end
  3348. endcase
  3349. end
  3350. always @ (*) begin
  3351. case(execute_SRC1_CTRL)
  3352. `Src1CtrlEnum_defaultEncoding_RS : begin
  3353. _zz_103_ = execute_RS1;
  3354. end
  3355. `Src1CtrlEnum_defaultEncoding_PC_INCREMENT : begin
  3356. _zz_103_ = {29'd0, _zz_238_};
  3357. end
  3358. `Src1CtrlEnum_defaultEncoding_IMU : begin
  3359. _zz_103_ = {execute_INSTRUCTION[31 : 12],12'h0};
  3360. end
  3361. default : begin
  3362. _zz_103_ = {27'd0, _zz_239_};
  3363. end
  3364. endcase
  3365. end
  3366. assign _zz_104_ = _zz_240_[11];
  3367. always @ (*) begin
  3368. _zz_105_[19] = _zz_104_;
  3369. _zz_105_[18] = _zz_104_;
  3370. _zz_105_[17] = _zz_104_;
  3371. _zz_105_[16] = _zz_104_;
  3372. _zz_105_[15] = _zz_104_;
  3373. _zz_105_[14] = _zz_104_;
  3374. _zz_105_[13] = _zz_104_;
  3375. _zz_105_[12] = _zz_104_;
  3376. _zz_105_[11] = _zz_104_;
  3377. _zz_105_[10] = _zz_104_;
  3378. _zz_105_[9] = _zz_104_;
  3379. _zz_105_[8] = _zz_104_;
  3380. _zz_105_[7] = _zz_104_;
  3381. _zz_105_[6] = _zz_104_;
  3382. _zz_105_[5] = _zz_104_;
  3383. _zz_105_[4] = _zz_104_;
  3384. _zz_105_[3] = _zz_104_;
  3385. _zz_105_[2] = _zz_104_;
  3386. _zz_105_[1] = _zz_104_;
  3387. _zz_105_[0] = _zz_104_;
  3388. end
  3389. assign _zz_106_ = _zz_241_[11];
  3390. always @ (*) begin
  3391. _zz_107_[19] = _zz_106_;
  3392. _zz_107_[18] = _zz_106_;
  3393. _zz_107_[17] = _zz_106_;
  3394. _zz_107_[16] = _zz_106_;
  3395. _zz_107_[15] = _zz_106_;
  3396. _zz_107_[14] = _zz_106_;
  3397. _zz_107_[13] = _zz_106_;
  3398. _zz_107_[12] = _zz_106_;
  3399. _zz_107_[11] = _zz_106_;
  3400. _zz_107_[10] = _zz_106_;
  3401. _zz_107_[9] = _zz_106_;
  3402. _zz_107_[8] = _zz_106_;
  3403. _zz_107_[7] = _zz_106_;
  3404. _zz_107_[6] = _zz_106_;
  3405. _zz_107_[5] = _zz_106_;
  3406. _zz_107_[4] = _zz_106_;
  3407. _zz_107_[3] = _zz_106_;
  3408. _zz_107_[2] = _zz_106_;
  3409. _zz_107_[1] = _zz_106_;
  3410. _zz_107_[0] = _zz_106_;
  3411. end
  3412. always @ (*) begin
  3413. case(execute_SRC2_CTRL)
  3414. `Src2CtrlEnum_defaultEncoding_RS : begin
  3415. _zz_108_ = execute_RS2;
  3416. end
  3417. `Src2CtrlEnum_defaultEncoding_IMI : begin
  3418. _zz_108_ = {_zz_105_,execute_INSTRUCTION[31 : 20]};
  3419. end
  3420. `Src2CtrlEnum_defaultEncoding_IMS : begin
  3421. _zz_108_ = {_zz_107_,{execute_INSTRUCTION[31 : 25],execute_INSTRUCTION[11 : 7]}};
  3422. end
  3423. default : begin
  3424. _zz_108_ = _zz_35_;
  3425. end
  3426. endcase
  3427. end
  3428. always @ (*) begin
  3429. execute_SrcPlugin_addSub = _zz_242_;
  3430. if(execute_SRC2_FORCE_ZERO)begin
  3431. execute_SrcPlugin_addSub = execute_SRC1;
  3432. end
  3433. end
  3434. assign execute_SrcPlugin_less = ((execute_SRC1[31] == execute_SRC2[31]) ? execute_SrcPlugin_addSub[31] : (execute_SRC_LESS_UNSIGNED ? execute_SRC2[31] : execute_SRC1[31]));
  3435. assign execute_FullBarrelShifterPlugin_amplitude = execute_SRC2[4 : 0];
  3436. always @ (*) begin
  3437. _zz_109_[0] = execute_SRC1[31];
  3438. _zz_109_[1] = execute_SRC1[30];
  3439. _zz_109_[2] = execute_SRC1[29];
  3440. _zz_109_[3] = execute_SRC1[28];
  3441. _zz_109_[4] = execute_SRC1[27];
  3442. _zz_109_[5] = execute_SRC1[26];
  3443. _zz_109_[6] = execute_SRC1[25];
  3444. _zz_109_[7] = execute_SRC1[24];
  3445. _zz_109_[8] = execute_SRC1[23];
  3446. _zz_109_[9] = execute_SRC1[22];
  3447. _zz_109_[10] = execute_SRC1[21];
  3448. _zz_109_[11] = execute_SRC1[20];
  3449. _zz_109_[12] = execute_SRC1[19];
  3450. _zz_109_[13] = execute_SRC1[18];
  3451. _zz_109_[14] = execute_SRC1[17];
  3452. _zz_109_[15] = execute_SRC1[16];
  3453. _zz_109_[16] = execute_SRC1[15];
  3454. _zz_109_[17] = execute_SRC1[14];
  3455. _zz_109_[18] = execute_SRC1[13];
  3456. _zz_109_[19] = execute_SRC1[12];
  3457. _zz_109_[20] = execute_SRC1[11];
  3458. _zz_109_[21] = execute_SRC1[10];
  3459. _zz_109_[22] = execute_SRC1[9];
  3460. _zz_109_[23] = execute_SRC1[8];
  3461. _zz_109_[24] = execute_SRC1[7];
  3462. _zz_109_[25] = execute_SRC1[6];
  3463. _zz_109_[26] = execute_SRC1[5];
  3464. _zz_109_[27] = execute_SRC1[4];
  3465. _zz_109_[28] = execute_SRC1[3];
  3466. _zz_109_[29] = execute_SRC1[2];
  3467. _zz_109_[30] = execute_SRC1[1];
  3468. _zz_109_[31] = execute_SRC1[0];
  3469. end
  3470. assign execute_FullBarrelShifterPlugin_reversed = ((execute_SHIFT_CTRL == `ShiftCtrlEnum_defaultEncoding_SLL_1) ? _zz_109_ : execute_SRC1);
  3471. always @ (*) begin
  3472. _zz_110_[0] = memory_SHIFT_RIGHT[31];
  3473. _zz_110_[1] = memory_SHIFT_RIGHT[30];
  3474. _zz_110_[2] = memory_SHIFT_RIGHT[29];
  3475. _zz_110_[3] = memory_SHIFT_RIGHT[28];
  3476. _zz_110_[4] = memory_SHIFT_RIGHT[27];
  3477. _zz_110_[5] = memory_SHIFT_RIGHT[26];
  3478. _zz_110_[6] = memory_SHIFT_RIGHT[25];
  3479. _zz_110_[7] = memory_SHIFT_RIGHT[24];
  3480. _zz_110_[8] = memory_SHIFT_RIGHT[23];
  3481. _zz_110_[9] = memory_SHIFT_RIGHT[22];
  3482. _zz_110_[10] = memory_SHIFT_RIGHT[21];
  3483. _zz_110_[11] = memory_SHIFT_RIGHT[20];
  3484. _zz_110_[12] = memory_SHIFT_RIGHT[19];
  3485. _zz_110_[13] = memory_SHIFT_RIGHT[18];
  3486. _zz_110_[14] = memory_SHIFT_RIGHT[17];
  3487. _zz_110_[15] = memory_SHIFT_RIGHT[16];
  3488. _zz_110_[16] = memory_SHIFT_RIGHT[15];
  3489. _zz_110_[17] = memory_SHIFT_RIGHT[14];
  3490. _zz_110_[18] = memory_SHIFT_RIGHT[13];
  3491. _zz_110_[19] = memory_SHIFT_RIGHT[12];
  3492. _zz_110_[20] = memory_SHIFT_RIGHT[11];
  3493. _zz_110_[21] = memory_SHIFT_RIGHT[10];
  3494. _zz_110_[22] = memory_SHIFT_RIGHT[9];
  3495. _zz_110_[23] = memory_SHIFT_RIGHT[8];
  3496. _zz_110_[24] = memory_SHIFT_RIGHT[7];
  3497. _zz_110_[25] = memory_SHIFT_RIGHT[6];
  3498. _zz_110_[26] = memory_SHIFT_RIGHT[5];
  3499. _zz_110_[27] = memory_SHIFT_RIGHT[4];
  3500. _zz_110_[28] = memory_SHIFT_RIGHT[3];
  3501. _zz_110_[29] = memory_SHIFT_RIGHT[2];
  3502. _zz_110_[30] = memory_SHIFT_RIGHT[1];
  3503. _zz_110_[31] = memory_SHIFT_RIGHT[0];
  3504. end
  3505. always @ (*) begin
  3506. _zz_111_ = 1'b0;
  3507. if(_zz_180_)begin
  3508. if(_zz_181_)begin
  3509. if(_zz_116_)begin
  3510. _zz_111_ = 1'b1;
  3511. end
  3512. end
  3513. end
  3514. if(_zz_182_)begin
  3515. if(_zz_183_)begin
  3516. if(_zz_118_)begin
  3517. _zz_111_ = 1'b1;
  3518. end
  3519. end
  3520. end
  3521. if(_zz_184_)begin
  3522. if(_zz_185_)begin
  3523. if(_zz_120_)begin
  3524. _zz_111_ = 1'b1;
  3525. end
  3526. end
  3527. end
  3528. if((! decode_RS1_USE))begin
  3529. _zz_111_ = 1'b0;
  3530. end
  3531. end
  3532. always @ (*) begin
  3533. _zz_112_ = 1'b0;
  3534. if(_zz_180_)begin
  3535. if(_zz_181_)begin
  3536. if(_zz_117_)begin
  3537. _zz_112_ = 1'b1;
  3538. end
  3539. end
  3540. end
  3541. if(_zz_182_)begin
  3542. if(_zz_183_)begin
  3543. if(_zz_119_)begin
  3544. _zz_112_ = 1'b1;
  3545. end
  3546. end
  3547. end
  3548. if(_zz_184_)begin
  3549. if(_zz_185_)begin
  3550. if(_zz_121_)begin
  3551. _zz_112_ = 1'b1;
  3552. end
  3553. end
  3554. end
  3555. if((! decode_RS2_USE))begin
  3556. _zz_112_ = 1'b0;
  3557. end
  3558. end
  3559. assign _zz_116_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]);
  3560. assign _zz_117_ = (writeBack_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]);
  3561. assign _zz_118_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]);
  3562. assign _zz_119_ = (memory_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]);
  3563. assign _zz_120_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[19 : 15]);
  3564. assign _zz_121_ = (execute_INSTRUCTION[11 : 7] == decode_INSTRUCTION[24 : 20]);
  3565. assign execute_BranchPlugin_eq = (execute_SRC1 == execute_SRC2);
  3566. assign _zz_122_ = execute_INSTRUCTION[14 : 12];
  3567. always @ (*) begin
  3568. if((_zz_122_ == (3'b000))) begin
  3569. _zz_123_ = execute_BranchPlugin_eq;
  3570. end else if((_zz_122_ == (3'b001))) begin
  3571. _zz_123_ = (! execute_BranchPlugin_eq);
  3572. end else if((((_zz_122_ & (3'b101)) == (3'b101)))) begin
  3573. _zz_123_ = (! execute_SRC_LESS);
  3574. end else begin
  3575. _zz_123_ = execute_SRC_LESS;
  3576. end
  3577. end
  3578. always @ (*) begin
  3579. case(execute_BRANCH_CTRL)
  3580. `BranchCtrlEnum_defaultEncoding_INC : begin
  3581. _zz_124_ = 1'b0;
  3582. end
  3583. `BranchCtrlEnum_defaultEncoding_JAL : begin
  3584. _zz_124_ = 1'b1;
  3585. end
  3586. `BranchCtrlEnum_defaultEncoding_JALR : begin
  3587. _zz_124_ = 1'b1;
  3588. end
  3589. default : begin
  3590. _zz_124_ = _zz_123_;
  3591. end
  3592. endcase
  3593. end
  3594. assign _zz_125_ = _zz_249_[11];
  3595. always @ (*) begin
  3596. _zz_126_[19] = _zz_125_;
  3597. _zz_126_[18] = _zz_125_;
  3598. _zz_126_[17] = _zz_125_;
  3599. _zz_126_[16] = _zz_125_;
  3600. _zz_126_[15] = _zz_125_;
  3601. _zz_126_[14] = _zz_125_;
  3602. _zz_126_[13] = _zz_125_;
  3603. _zz_126_[12] = _zz_125_;
  3604. _zz_126_[11] = _zz_125_;
  3605. _zz_126_[10] = _zz_125_;
  3606. _zz_126_[9] = _zz_125_;
  3607. _zz_126_[8] = _zz_125_;
  3608. _zz_126_[7] = _zz_125_;
  3609. _zz_126_[6] = _zz_125_;
  3610. _zz_126_[5] = _zz_125_;
  3611. _zz_126_[4] = _zz_125_;
  3612. _zz_126_[3] = _zz_125_;
  3613. _zz_126_[2] = _zz_125_;
  3614. _zz_126_[1] = _zz_125_;
  3615. _zz_126_[0] = _zz_125_;
  3616. end
  3617. assign _zz_127_ = _zz_250_[19];
  3618. always @ (*) begin
  3619. _zz_128_[10] = _zz_127_;
  3620. _zz_128_[9] = _zz_127_;
  3621. _zz_128_[8] = _zz_127_;
  3622. _zz_128_[7] = _zz_127_;
  3623. _zz_128_[6] = _zz_127_;
  3624. _zz_128_[5] = _zz_127_;
  3625. _zz_128_[4] = _zz_127_;
  3626. _zz_128_[3] = _zz_127_;
  3627. _zz_128_[2] = _zz_127_;
  3628. _zz_128_[1] = _zz_127_;
  3629. _zz_128_[0] = _zz_127_;
  3630. end
  3631. assign _zz_129_ = _zz_251_[11];
  3632. always @ (*) begin
  3633. _zz_130_[18] = _zz_129_;
  3634. _zz_130_[17] = _zz_129_;
  3635. _zz_130_[16] = _zz_129_;
  3636. _zz_130_[15] = _zz_129_;
  3637. _zz_130_[14] = _zz_129_;
  3638. _zz_130_[13] = _zz_129_;
  3639. _zz_130_[12] = _zz_129_;
  3640. _zz_130_[11] = _zz_129_;
  3641. _zz_130_[10] = _zz_129_;
  3642. _zz_130_[9] = _zz_129_;
  3643. _zz_130_[8] = _zz_129_;
  3644. _zz_130_[7] = _zz_129_;
  3645. _zz_130_[6] = _zz_129_;
  3646. _zz_130_[5] = _zz_129_;
  3647. _zz_130_[4] = _zz_129_;
  3648. _zz_130_[3] = _zz_129_;
  3649. _zz_130_[2] = _zz_129_;
  3650. _zz_130_[1] = _zz_129_;
  3651. _zz_130_[0] = _zz_129_;
  3652. end
  3653. always @ (*) begin
  3654. case(execute_BRANCH_CTRL)
  3655. `BranchCtrlEnum_defaultEncoding_JALR : begin
  3656. _zz_131_ = (_zz_252_[1] ^ execute_RS1[1]);
  3657. end
  3658. `BranchCtrlEnum_defaultEncoding_JAL : begin
  3659. _zz_131_ = _zz_253_[1];
  3660. end
  3661. default : begin
  3662. _zz_131_ = _zz_254_[1];
  3663. end
  3664. endcase
  3665. end
  3666. assign execute_BranchPlugin_missAlignedTarget = (execute_BRANCH_COND_RESULT && _zz_131_);
  3667. always @ (*) begin
  3668. case(execute_BRANCH_CTRL)
  3669. `BranchCtrlEnum_defaultEncoding_JALR : begin
  3670. execute_BranchPlugin_branch_src1 = execute_RS1;
  3671. end
  3672. default : begin
  3673. execute_BranchPlugin_branch_src1 = execute_PC;
  3674. end
  3675. endcase
  3676. end
  3677. assign _zz_132_ = _zz_255_[11];
  3678. always @ (*) begin
  3679. _zz_133_[19] = _zz_132_;
  3680. _zz_133_[18] = _zz_132_;
  3681. _zz_133_[17] = _zz_132_;
  3682. _zz_133_[16] = _zz_132_;
  3683. _zz_133_[15] = _zz_132_;
  3684. _zz_133_[14] = _zz_132_;
  3685. _zz_133_[13] = _zz_132_;
  3686. _zz_133_[12] = _zz_132_;
  3687. _zz_133_[11] = _zz_132_;
  3688. _zz_133_[10] = _zz_132_;
  3689. _zz_133_[9] = _zz_132_;
  3690. _zz_133_[8] = _zz_132_;
  3691. _zz_133_[7] = _zz_132_;
  3692. _zz_133_[6] = _zz_132_;
  3693. _zz_133_[5] = _zz_132_;
  3694. _zz_133_[4] = _zz_132_;
  3695. _zz_133_[3] = _zz_132_;
  3696. _zz_133_[2] = _zz_132_;
  3697. _zz_133_[1] = _zz_132_;
  3698. _zz_133_[0] = _zz_132_;
  3699. end
  3700. always @ (*) begin
  3701. case(execute_BRANCH_CTRL)
  3702. `BranchCtrlEnum_defaultEncoding_JALR : begin
  3703. execute_BranchPlugin_branch_src2 = {_zz_133_,execute_INSTRUCTION[31 : 20]};
  3704. end
  3705. default : begin
  3706. execute_BranchPlugin_branch_src2 = ((execute_BRANCH_CTRL == `BranchCtrlEnum_defaultEncoding_JAL) ? {{_zz_135_,{{{_zz_442_,execute_INSTRUCTION[19 : 12]},execute_INSTRUCTION[20]},execute_INSTRUCTION[30 : 21]}},1'b0} : {{_zz_137_,{{{_zz_443_,_zz_444_},execute_INSTRUCTION[30 : 25]},execute_INSTRUCTION[11 : 8]}},1'b0});
  3707. if(execute_PREDICTION_HAD_BRANCHED2)begin
  3708. execute_BranchPlugin_branch_src2 = {29'd0, _zz_258_};
  3709. end
  3710. end
  3711. endcase
  3712. end
  3713. assign _zz_134_ = _zz_256_[19];
  3714. always @ (*) begin
  3715. _zz_135_[10] = _zz_134_;
  3716. _zz_135_[9] = _zz_134_;
  3717. _zz_135_[8] = _zz_134_;
  3718. _zz_135_[7] = _zz_134_;
  3719. _zz_135_[6] = _zz_134_;
  3720. _zz_135_[5] = _zz_134_;
  3721. _zz_135_[4] = _zz_134_;
  3722. _zz_135_[3] = _zz_134_;
  3723. _zz_135_[2] = _zz_134_;
  3724. _zz_135_[1] = _zz_134_;
  3725. _zz_135_[0] = _zz_134_;
  3726. end
  3727. assign _zz_136_ = _zz_257_[11];
  3728. always @ (*) begin
  3729. _zz_137_[18] = _zz_136_;
  3730. _zz_137_[17] = _zz_136_;
  3731. _zz_137_[16] = _zz_136_;
  3732. _zz_137_[15] = _zz_136_;
  3733. _zz_137_[14] = _zz_136_;
  3734. _zz_137_[13] = _zz_136_;
  3735. _zz_137_[12] = _zz_136_;
  3736. _zz_137_[11] = _zz_136_;
  3737. _zz_137_[10] = _zz_136_;
  3738. _zz_137_[9] = _zz_136_;
  3739. _zz_137_[8] = _zz_136_;
  3740. _zz_137_[7] = _zz_136_;
  3741. _zz_137_[6] = _zz_136_;
  3742. _zz_137_[5] = _zz_136_;
  3743. _zz_137_[4] = _zz_136_;
  3744. _zz_137_[3] = _zz_136_;
  3745. _zz_137_[2] = _zz_136_;
  3746. _zz_137_[1] = _zz_136_;
  3747. _zz_137_[0] = _zz_136_;
  3748. end
  3749. assign execute_BranchPlugin_branchAdder = (execute_BranchPlugin_branch_src1 + execute_BranchPlugin_branch_src2);
  3750. assign BranchPlugin_jumpInterface_valid = ((memory_arbitration_isValid && memory_BRANCH_DO) && (! 1'b0));
  3751. assign BranchPlugin_jumpInterface_payload = memory_BRANCH_CALC;
  3752. assign IBusCachedPlugin_decodePrediction_rsp_wasWrong = BranchPlugin_jumpInterface_valid;
  3753. always @ (*) begin
  3754. CsrPlugin_privilege = (2'b11);
  3755. if(CsrPlugin_forceMachineWire)begin
  3756. CsrPlugin_privilege = (2'b11);
  3757. end
  3758. end
  3759. assign CsrPlugin_misa_base = (2'b01);
  3760. assign CsrPlugin_misa_extensions = 26'h0000042;
  3761. assign _zz_138_ = (CsrPlugin_mip_MTIP && CsrPlugin_mie_MTIE);
  3762. assign _zz_139_ = (CsrPlugin_mip_MSIP && CsrPlugin_mie_MSIE);
  3763. assign _zz_140_ = (CsrPlugin_mip_MEIP && CsrPlugin_mie_MEIE);
  3764. assign CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode = 1'b0;
  3765. assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped = (2'b11);
  3766. assign CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege = ((CsrPlugin_privilege < CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped) ? CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilegeUncapped : CsrPlugin_privilege);
  3767. assign CsrPlugin_exceptionPortCtrl_exceptionValids_decode = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode;
  3768. always @ (*) begin
  3769. CsrPlugin_exceptionPortCtrl_exceptionValids_execute = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute;
  3770. if(CsrPlugin_selfException_valid)begin
  3771. CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b1;
  3772. end
  3773. if(execute_arbitration_isFlushed)begin
  3774. CsrPlugin_exceptionPortCtrl_exceptionValids_execute = 1'b0;
  3775. end
  3776. end
  3777. always @ (*) begin
  3778. CsrPlugin_exceptionPortCtrl_exceptionValids_memory = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory;
  3779. if(DBusSimplePlugin_memoryExceptionPort_valid)begin
  3780. CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b1;
  3781. end
  3782. if(memory_arbitration_isFlushed)begin
  3783. CsrPlugin_exceptionPortCtrl_exceptionValids_memory = 1'b0;
  3784. end
  3785. end
  3786. always @ (*) begin
  3787. CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack;
  3788. if(writeBack_arbitration_isFlushed)begin
  3789. CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack = 1'b0;
  3790. end
  3791. end
  3792. assign CsrPlugin_exceptionPendings_0 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_decode;
  3793. assign CsrPlugin_exceptionPendings_1 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute;
  3794. assign CsrPlugin_exceptionPendings_2 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory;
  3795. assign CsrPlugin_exceptionPendings_3 = CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack;
  3796. assign CsrPlugin_exception = (CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack && CsrPlugin_allowException);
  3797. assign CsrPlugin_lastStageWasWfi = 1'b0;
  3798. assign CsrPlugin_pipelineLiberator_active = ((CsrPlugin_interrupt_valid && CsrPlugin_allowInterrupts) && decode_arbitration_isValid);
  3799. always @ (*) begin
  3800. CsrPlugin_pipelineLiberator_done = CsrPlugin_pipelineLiberator_pcValids_2;
  3801. if(({CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack,{CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory,CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute}} != (3'b000)))begin
  3802. CsrPlugin_pipelineLiberator_done = 1'b0;
  3803. end
  3804. if(CsrPlugin_hadException)begin
  3805. CsrPlugin_pipelineLiberator_done = 1'b0;
  3806. end
  3807. end
  3808. assign CsrPlugin_interruptJump = ((CsrPlugin_interrupt_valid && CsrPlugin_pipelineLiberator_done) && CsrPlugin_allowInterrupts);
  3809. always @ (*) begin
  3810. CsrPlugin_targetPrivilege = CsrPlugin_interrupt_targetPrivilege;
  3811. if(CsrPlugin_hadException)begin
  3812. CsrPlugin_targetPrivilege = CsrPlugin_exceptionPortCtrl_exceptionTargetPrivilege;
  3813. end
  3814. end
  3815. always @ (*) begin
  3816. CsrPlugin_trapCause = CsrPlugin_interrupt_code;
  3817. if(CsrPlugin_hadException)begin
  3818. CsrPlugin_trapCause = CsrPlugin_exceptionPortCtrl_exceptionContext_code;
  3819. end
  3820. end
  3821. always @ (*) begin
  3822. CsrPlugin_xtvec_mode = (2'bxx);
  3823. case(CsrPlugin_targetPrivilege)
  3824. 2'b11 : begin
  3825. CsrPlugin_xtvec_mode = CsrPlugin_mtvec_mode;
  3826. end
  3827. default : begin
  3828. end
  3829. endcase
  3830. end
  3831. always @ (*) begin
  3832. CsrPlugin_xtvec_base = 30'h0;
  3833. case(CsrPlugin_targetPrivilege)
  3834. 2'b11 : begin
  3835. CsrPlugin_xtvec_base = CsrPlugin_mtvec_base;
  3836. end
  3837. default : begin
  3838. end
  3839. endcase
  3840. end
  3841. assign contextSwitching = CsrPlugin_jumpInterface_valid;
  3842. assign execute_CsrPlugin_blockedBySideEffects = ({writeBack_arbitration_isValid,memory_arbitration_isValid} != (2'b00));
  3843. always @ (*) begin
  3844. execute_CsrPlugin_illegalAccess = 1'b1;
  3845. if(execute_CsrPlugin_csr_1984)begin
  3846. if(execute_CSR_WRITE_OPCODE)begin
  3847. execute_CsrPlugin_illegalAccess = 1'b0;
  3848. end
  3849. end
  3850. if(execute_CsrPlugin_csr_768)begin
  3851. execute_CsrPlugin_illegalAccess = 1'b0;
  3852. end
  3853. if(execute_CsrPlugin_csr_836)begin
  3854. execute_CsrPlugin_illegalAccess = 1'b0;
  3855. end
  3856. if(execute_CsrPlugin_csr_772)begin
  3857. execute_CsrPlugin_illegalAccess = 1'b0;
  3858. end
  3859. if(execute_CsrPlugin_csr_773)begin
  3860. if(execute_CSR_WRITE_OPCODE)begin
  3861. execute_CsrPlugin_illegalAccess = 1'b0;
  3862. end
  3863. end
  3864. if(execute_CsrPlugin_csr_833)begin
  3865. execute_CsrPlugin_illegalAccess = 1'b0;
  3866. end
  3867. if(execute_CsrPlugin_csr_834)begin
  3868. if(execute_CSR_READ_OPCODE)begin
  3869. execute_CsrPlugin_illegalAccess = 1'b0;
  3870. end
  3871. end
  3872. if(execute_CsrPlugin_csr_835)begin
  3873. if(execute_CSR_READ_OPCODE)begin
  3874. execute_CsrPlugin_illegalAccess = 1'b0;
  3875. end
  3876. end
  3877. if(execute_CsrPlugin_csr_3008)begin
  3878. execute_CsrPlugin_illegalAccess = 1'b0;
  3879. end
  3880. if(execute_CsrPlugin_csr_4032)begin
  3881. if(execute_CSR_READ_OPCODE)begin
  3882. execute_CsrPlugin_illegalAccess = 1'b0;
  3883. end
  3884. end
  3885. if((CsrPlugin_privilege < execute_CsrPlugin_csrAddress[9 : 8]))begin
  3886. execute_CsrPlugin_illegalAccess = 1'b1;
  3887. end
  3888. if(((! execute_arbitration_isValid) || (! execute_IS_CSR)))begin
  3889. execute_CsrPlugin_illegalAccess = 1'b0;
  3890. end
  3891. end
  3892. always @ (*) begin
  3893. execute_CsrPlugin_illegalInstruction = 1'b0;
  3894. if((execute_arbitration_isValid && (execute_ENV_CTRL == `EnvCtrlEnum_defaultEncoding_XRET)))begin
  3895. if((CsrPlugin_privilege < execute_INSTRUCTION[29 : 28]))begin
  3896. execute_CsrPlugin_illegalInstruction = 1'b1;
  3897. end
  3898. end
  3899. end
  3900. always @ (*) begin
  3901. CsrPlugin_selfException_valid = 1'b0;
  3902. if(_zz_186_)begin
  3903. CsrPlugin_selfException_valid = 1'b1;
  3904. end
  3905. end
  3906. always @ (*) begin
  3907. CsrPlugin_selfException_payload_code = (4'bxxxx);
  3908. if(_zz_186_)begin
  3909. case(CsrPlugin_privilege)
  3910. 2'b00 : begin
  3911. CsrPlugin_selfException_payload_code = (4'b1000);
  3912. end
  3913. default : begin
  3914. CsrPlugin_selfException_payload_code = (4'b1011);
  3915. end
  3916. endcase
  3917. end
  3918. end
  3919. assign CsrPlugin_selfException_payload_badAddr = execute_INSTRUCTION;
  3920. assign execute_CsrPlugin_writeInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_WRITE_OPCODE);
  3921. assign execute_CsrPlugin_readInstruction = ((execute_arbitration_isValid && execute_IS_CSR) && execute_CSR_READ_OPCODE);
  3922. assign execute_CsrPlugin_writeEnable = ((execute_CsrPlugin_writeInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers));
  3923. assign execute_CsrPlugin_readEnable = ((execute_CsrPlugin_readInstruction && (! execute_CsrPlugin_blockedBySideEffects)) && (! execute_arbitration_isStuckByOthers));
  3924. assign execute_CsrPlugin_readToWriteData = execute_CsrPlugin_readData;
  3925. always @ (*) begin
  3926. case(_zz_196_)
  3927. 1'b0 : begin
  3928. execute_CsrPlugin_writeData = execute_SRC1;
  3929. end
  3930. default : begin
  3931. execute_CsrPlugin_writeData = (execute_INSTRUCTION[12] ? (execute_CsrPlugin_readToWriteData & (~ execute_SRC1)) : (execute_CsrPlugin_readToWriteData | execute_SRC1));
  3932. end
  3933. endcase
  3934. end
  3935. assign execute_CsrPlugin_csrAddress = execute_INSTRUCTION[31 : 20];
  3936. assign execute_MulPlugin_a = execute_RS1;
  3937. assign execute_MulPlugin_b = execute_RS2;
  3938. always @ (*) begin
  3939. case(_zz_187_)
  3940. 2'b01 : begin
  3941. execute_MulPlugin_aSigned = 1'b1;
  3942. end
  3943. 2'b10 : begin
  3944. execute_MulPlugin_aSigned = 1'b1;
  3945. end
  3946. default : begin
  3947. execute_MulPlugin_aSigned = 1'b0;
  3948. end
  3949. endcase
  3950. end
  3951. always @ (*) begin
  3952. case(_zz_187_)
  3953. 2'b01 : begin
  3954. execute_MulPlugin_bSigned = 1'b1;
  3955. end
  3956. 2'b10 : begin
  3957. execute_MulPlugin_bSigned = 1'b0;
  3958. end
  3959. default : begin
  3960. execute_MulPlugin_bSigned = 1'b0;
  3961. end
  3962. endcase
  3963. end
  3964. assign execute_MulPlugin_aULow = execute_MulPlugin_a[15 : 0];
  3965. assign execute_MulPlugin_bULow = execute_MulPlugin_b[15 : 0];
  3966. assign execute_MulPlugin_aSLow = {1'b0,execute_MulPlugin_a[15 : 0]};
  3967. assign execute_MulPlugin_bSLow = {1'b0,execute_MulPlugin_b[15 : 0]};
  3968. assign execute_MulPlugin_aHigh = {(execute_MulPlugin_aSigned && execute_MulPlugin_a[31]),execute_MulPlugin_a[31 : 16]};
  3969. assign execute_MulPlugin_bHigh = {(execute_MulPlugin_bSigned && execute_MulPlugin_b[31]),execute_MulPlugin_b[31 : 16]};
  3970. assign writeBack_MulPlugin_result = ($signed(_zz_259_) + $signed(_zz_260_));
  3971. assign memory_DivPlugin_frontendOk = 1'b1;
  3972. always @ (*) begin
  3973. memory_DivPlugin_div_counter_willIncrement = 1'b0;
  3974. if(_zz_173_)begin
  3975. if(_zz_188_)begin
  3976. memory_DivPlugin_div_counter_willIncrement = 1'b1;
  3977. end
  3978. end
  3979. end
  3980. always @ (*) begin
  3981. memory_DivPlugin_div_counter_willClear = 1'b0;
  3982. if(_zz_189_)begin
  3983. memory_DivPlugin_div_counter_willClear = 1'b1;
  3984. end
  3985. end
  3986. assign memory_DivPlugin_div_counter_willOverflowIfInc = (memory_DivPlugin_div_counter_value == 6'h21);
  3987. assign memory_DivPlugin_div_counter_willOverflow = (memory_DivPlugin_div_counter_willOverflowIfInc && memory_DivPlugin_div_counter_willIncrement);
  3988. always @ (*) begin
  3989. if(memory_DivPlugin_div_counter_willOverflow)begin
  3990. memory_DivPlugin_div_counter_valueNext = 6'h0;
  3991. end else begin
  3992. memory_DivPlugin_div_counter_valueNext = (memory_DivPlugin_div_counter_value + _zz_264_);
  3993. end
  3994. if(memory_DivPlugin_div_counter_willClear)begin
  3995. memory_DivPlugin_div_counter_valueNext = 6'h0;
  3996. end
  3997. end
  3998. assign _zz_141_ = memory_DivPlugin_rs1[31 : 0];
  3999. assign memory_DivPlugin_div_stage_0_remainderShifted = {memory_DivPlugin_accumulator[31 : 0],_zz_141_[31]};
  4000. assign memory_DivPlugin_div_stage_0_remainderMinusDenominator = (memory_DivPlugin_div_stage_0_remainderShifted - _zz_265_);
  4001. assign memory_DivPlugin_div_stage_0_outRemainder = ((! memory_DivPlugin_div_stage_0_remainderMinusDenominator[32]) ? _zz_266_ : _zz_267_);
  4002. assign memory_DivPlugin_div_stage_0_outNumerator = _zz_268_[31:0];
  4003. assign _zz_142_ = (memory_INSTRUCTION[13] ? memory_DivPlugin_accumulator[31 : 0] : memory_DivPlugin_rs1[31 : 0]);
  4004. assign _zz_143_ = (execute_RS2[31] && execute_IS_RS2_SIGNED);
  4005. assign _zz_144_ = (1'b0 || ((execute_IS_DIV && execute_RS1[31]) && execute_IS_RS1_SIGNED));
  4006. always @ (*) begin
  4007. _zz_145_[32] = (execute_IS_RS1_SIGNED && execute_RS1[31]);
  4008. _zz_145_[31 : 0] = execute_RS1;
  4009. end
  4010. assign _zz_147_ = (_zz_146_ & externalInterruptArray_regNext);
  4011. assign externalInterrupt = (_zz_147_ != 32'h0);
  4012. assign _zz_26_ = decode_BRANCH_CTRL;
  4013. assign _zz_52_ = _zz_43_;
  4014. assign _zz_30_ = decode_to_execute_BRANCH_CTRL;
  4015. assign _zz_24_ = decode_SHIFT_CTRL;
  4016. assign _zz_21_ = execute_SHIFT_CTRL;
  4017. assign _zz_22_ = _zz_48_;
  4018. assign _zz_34_ = decode_to_execute_SHIFT_CTRL;
  4019. assign _zz_33_ = execute_to_memory_SHIFT_CTRL;
  4020. assign _zz_19_ = decode_ALU_BITWISE_CTRL;
  4021. assign _zz_17_ = _zz_46_;
  4022. assign _zz_39_ = decode_to_execute_ALU_BITWISE_CTRL;
  4023. assign _zz_16_ = decode_ALU_CTRL;
  4024. assign _zz_14_ = _zz_47_;
  4025. assign _zz_38_ = decode_to_execute_ALU_CTRL;
  4026. assign _zz_13_ = decode_ENV_CTRL;
  4027. assign _zz_10_ = execute_ENV_CTRL;
  4028. assign _zz_8_ = memory_ENV_CTRL;
  4029. assign _zz_11_ = _zz_45_;
  4030. assign _zz_28_ = decode_to_execute_ENV_CTRL;
  4031. assign _zz_27_ = execute_to_memory_ENV_CTRL;
  4032. assign _zz_29_ = memory_to_writeBack_ENV_CTRL;
  4033. assign _zz_6_ = decode_SRC1_CTRL;
  4034. assign _zz_4_ = _zz_44_;
  4035. assign _zz_37_ = decode_to_execute_SRC1_CTRL;
  4036. assign _zz_3_ = decode_SRC2_CTRL;
  4037. assign _zz_1_ = _zz_49_;
  4038. assign _zz_36_ = decode_to_execute_SRC2_CTRL;
  4039. assign decode_arbitration_isFlushed = (({writeBack_arbitration_flushNext,{memory_arbitration_flushNext,execute_arbitration_flushNext}} != (3'b000)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,{execute_arbitration_flushIt,decode_arbitration_flushIt}}} != (4'b0000)));
  4040. assign execute_arbitration_isFlushed = (({writeBack_arbitration_flushNext,memory_arbitration_flushNext} != (2'b00)) || ({writeBack_arbitration_flushIt,{memory_arbitration_flushIt,execute_arbitration_flushIt}} != (3'b000)));
  4041. assign memory_arbitration_isFlushed = ((writeBack_arbitration_flushNext != (1'b0)) || ({writeBack_arbitration_flushIt,memory_arbitration_flushIt} != (2'b00)));
  4042. assign writeBack_arbitration_isFlushed = (1'b0 || (writeBack_arbitration_flushIt != (1'b0)));
  4043. assign decode_arbitration_isStuckByOthers = (decode_arbitration_haltByOther || (((1'b0 || execute_arbitration_isStuck) || memory_arbitration_isStuck) || writeBack_arbitration_isStuck));
  4044. assign decode_arbitration_isStuck = (decode_arbitration_haltItself || decode_arbitration_isStuckByOthers);
  4045. assign decode_arbitration_isMoving = ((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt));
  4046. assign decode_arbitration_isFiring = ((decode_arbitration_isValid && (! decode_arbitration_isStuck)) && (! decode_arbitration_removeIt));
  4047. assign execute_arbitration_isStuckByOthers = (execute_arbitration_haltByOther || ((1'b0 || memory_arbitration_isStuck) || writeBack_arbitration_isStuck));
  4048. assign execute_arbitration_isStuck = (execute_arbitration_haltItself || execute_arbitration_isStuckByOthers);
  4049. assign execute_arbitration_isMoving = ((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt));
  4050. assign execute_arbitration_isFiring = ((execute_arbitration_isValid && (! execute_arbitration_isStuck)) && (! execute_arbitration_removeIt));
  4051. assign memory_arbitration_isStuckByOthers = (memory_arbitration_haltByOther || (1'b0 || writeBack_arbitration_isStuck));
  4052. assign memory_arbitration_isStuck = (memory_arbitration_haltItself || memory_arbitration_isStuckByOthers);
  4053. assign memory_arbitration_isMoving = ((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt));
  4054. assign memory_arbitration_isFiring = ((memory_arbitration_isValid && (! memory_arbitration_isStuck)) && (! memory_arbitration_removeIt));
  4055. assign writeBack_arbitration_isStuckByOthers = (writeBack_arbitration_haltByOther || 1'b0);
  4056. assign writeBack_arbitration_isStuck = (writeBack_arbitration_haltItself || writeBack_arbitration_isStuckByOthers);
  4057. assign writeBack_arbitration_isMoving = ((! writeBack_arbitration_isStuck) && (! writeBack_arbitration_removeIt));
  4058. assign writeBack_arbitration_isFiring = ((writeBack_arbitration_isValid && (! writeBack_arbitration_isStuck)) && (! writeBack_arbitration_removeIt));
  4059. always @ (*) begin
  4060. _zz_148_ = 32'h0;
  4061. if(execute_CsrPlugin_csr_768)begin
  4062. _zz_148_[12 : 11] = CsrPlugin_mstatus_MPP;
  4063. _zz_148_[7 : 7] = CsrPlugin_mstatus_MPIE;
  4064. _zz_148_[3 : 3] = CsrPlugin_mstatus_MIE;
  4065. end
  4066. end
  4067. always @ (*) begin
  4068. _zz_149_ = 32'h0;
  4069. if(execute_CsrPlugin_csr_836)begin
  4070. _zz_149_[11 : 11] = CsrPlugin_mip_MEIP;
  4071. _zz_149_[7 : 7] = CsrPlugin_mip_MTIP;
  4072. _zz_149_[3 : 3] = CsrPlugin_mip_MSIP;
  4073. end
  4074. end
  4075. always @ (*) begin
  4076. _zz_150_ = 32'h0;
  4077. if(execute_CsrPlugin_csr_772)begin
  4078. _zz_150_[11 : 11] = CsrPlugin_mie_MEIE;
  4079. _zz_150_[7 : 7] = CsrPlugin_mie_MTIE;
  4080. _zz_150_[3 : 3] = CsrPlugin_mie_MSIE;
  4081. end
  4082. end
  4083. always @ (*) begin
  4084. _zz_151_ = 32'h0;
  4085. if(execute_CsrPlugin_csr_833)begin
  4086. _zz_151_[31 : 0] = CsrPlugin_mepc;
  4087. end
  4088. end
  4089. always @ (*) begin
  4090. _zz_152_ = 32'h0;
  4091. if(execute_CsrPlugin_csr_834)begin
  4092. _zz_152_[31 : 31] = CsrPlugin_mcause_interrupt;
  4093. _zz_152_[3 : 0] = CsrPlugin_mcause_exceptionCode;
  4094. end
  4095. end
  4096. always @ (*) begin
  4097. _zz_153_ = 32'h0;
  4098. if(execute_CsrPlugin_csr_835)begin
  4099. _zz_153_[31 : 0] = CsrPlugin_mtval;
  4100. end
  4101. end
  4102. always @ (*) begin
  4103. _zz_154_ = 32'h0;
  4104. if(execute_CsrPlugin_csr_3008)begin
  4105. _zz_154_[31 : 0] = _zz_146_;
  4106. end
  4107. end
  4108. always @ (*) begin
  4109. _zz_155_ = 32'h0;
  4110. if(execute_CsrPlugin_csr_4032)begin
  4111. _zz_155_[31 : 0] = _zz_147_;
  4112. end
  4113. end
  4114. assign execute_CsrPlugin_readData = (((_zz_148_ | _zz_149_) | (_zz_150_ | _zz_151_)) | ((_zz_152_ | _zz_153_) | (_zz_154_ | _zz_155_)));
  4115. assign iBusAXI_ar_valid = iBus_cmd_valid;
  4116. assign iBusAXI_ar_payload_len = 8'h07;
  4117. assign iBusAXI_ar_payload_addr = iBus_cmd_payload_address;
  4118. assign iBusAXI_ar_payload_prot = (3'b110);
  4119. assign iBusAXI_ar_payload_cache = (4'b1111);
  4120. assign iBusAXI_ar_payload_burst = (2'b01);
  4121. assign iBus_cmd_ready = iBusAXI_ar_ready;
  4122. assign iBus_rsp_valid = iBusAXI_r_valid;
  4123. assign iBus_rsp_payload_data = iBusAXI_r_payload_data;
  4124. assign iBus_rsp_payload_error = (! (iBusAXI_r_payload_resp == (2'b00)));
  4125. assign iBusAXI_r_ready = 1'b1;
  4126. assign dBus_cmd_halfPipe_valid = dBus_cmd_halfPipe_regs_valid;
  4127. assign dBus_cmd_halfPipe_payload_wr = dBus_cmd_halfPipe_regs_payload_wr;
  4128. assign dBus_cmd_halfPipe_payload_address = dBus_cmd_halfPipe_regs_payload_address;
  4129. assign dBus_cmd_halfPipe_payload_data = dBus_cmd_halfPipe_regs_payload_data;
  4130. assign dBus_cmd_halfPipe_payload_size = dBus_cmd_halfPipe_regs_payload_size;
  4131. assign dBus_cmd_ready = dBus_cmd_halfPipe_regs_ready;
  4132. assign dBusWishbone_ADR = (dBus_cmd_halfPipe_payload_address >>> 2);
  4133. assign dBusWishbone_CTI = (3'b000);
  4134. assign dBusWishbone_BTE = (2'b00);
  4135. always @ (*) begin
  4136. case(dBus_cmd_halfPipe_payload_size)
  4137. 2'b00 : begin
  4138. _zz_156_ = (4'b0001);
  4139. end
  4140. 2'b01 : begin
  4141. _zz_156_ = (4'b0011);
  4142. end
  4143. default : begin
  4144. _zz_156_ = (4'b1111);
  4145. end
  4146. endcase
  4147. end
  4148. always @ (*) begin
  4149. dBusWishbone_SEL = _zz_287_[3:0];
  4150. if((! dBus_cmd_halfPipe_payload_wr))begin
  4151. dBusWishbone_SEL = (4'b1111);
  4152. end
  4153. end
  4154. assign dBusWishbone_WE = dBus_cmd_halfPipe_payload_wr;
  4155. assign dBusWishbone_DAT_MOSI = dBus_cmd_halfPipe_payload_data;
  4156. assign dBus_cmd_halfPipe_ready = (dBus_cmd_halfPipe_valid && dBusWishbone_ACK);
  4157. assign dBusWishbone_CYC = dBus_cmd_halfPipe_valid;
  4158. assign dBusWishbone_STB = dBus_cmd_halfPipe_valid;
  4159. assign dBus_rsp_ready = ((dBus_cmd_halfPipe_valid && (! dBusWishbone_WE)) && dBusWishbone_ACK);
  4160. assign dBus_rsp_data = dBusWishbone_DAT_MISO;
  4161. assign dBus_rsp_error = 1'b0;
  4162. always @ (posedge clk or posedge reset) begin
  4163. if (reset) begin
  4164. IBusCachedPlugin_fetchPc_pcReg <= externalResetVector;
  4165. IBusCachedPlugin_fetchPc_correctionReg <= 1'b0;
  4166. IBusCachedPlugin_fetchPc_booted <= 1'b0;
  4167. IBusCachedPlugin_fetchPc_inc <= 1'b0;
  4168. _zz_65_ <= 1'b0;
  4169. _zz_67_ <= 1'b0;
  4170. IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0;
  4171. IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0;
  4172. IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0;
  4173. IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0;
  4174. IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0;
  4175. IBusCachedPlugin_rspCounter <= _zz_80_;
  4176. IBusCachedPlugin_rspCounter <= 32'h0;
  4177. RegFilePlugin_shadow_write <= 1'b0;
  4178. RegFilePlugin_shadow_read <= 1'b0;
  4179. RegFilePlugin_shadow_clear <= 1'b0;
  4180. _zz_101_ <= 1'b1;
  4181. _zz_113_ <= 1'b0;
  4182. CsrPlugin_mstatus_MIE <= 1'b0;
  4183. CsrPlugin_mstatus_MPIE <= 1'b0;
  4184. CsrPlugin_mstatus_MPP <= (2'b11);
  4185. CsrPlugin_mie_MEIE <= 1'b0;
  4186. CsrPlugin_mie_MTIE <= 1'b0;
  4187. CsrPlugin_mie_MSIE <= 1'b0;
  4188. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0;
  4189. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= 1'b0;
  4190. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0;
  4191. CsrPlugin_interrupt_valid <= 1'b0;
  4192. CsrPlugin_pipelineLiberator_pcValids_0 <= 1'b0;
  4193. CsrPlugin_pipelineLiberator_pcValids_1 <= 1'b0;
  4194. CsrPlugin_pipelineLiberator_pcValids_2 <= 1'b0;
  4195. CsrPlugin_hadException <= 1'b0;
  4196. execute_CsrPlugin_wfiWake <= 1'b0;
  4197. memory_DivPlugin_div_counter_value <= 6'h0;
  4198. _zz_146_ <= 32'h0;
  4199. execute_arbitration_isValid <= 1'b0;
  4200. memory_arbitration_isValid <= 1'b0;
  4201. writeBack_arbitration_isValid <= 1'b0;
  4202. memory_to_writeBack_REGFILE_WRITE_DATA <= 32'h0;
  4203. memory_to_writeBack_INSTRUCTION <= 32'h0;
  4204. dBus_cmd_halfPipe_regs_valid <= 1'b0;
  4205. dBus_cmd_halfPipe_regs_ready <= 1'b1;
  4206. end else begin
  4207. if(IBusCachedPlugin_fetchPc_correction)begin
  4208. IBusCachedPlugin_fetchPc_correctionReg <= 1'b1;
  4209. end
  4210. if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin
  4211. IBusCachedPlugin_fetchPc_correctionReg <= 1'b0;
  4212. end
  4213. IBusCachedPlugin_fetchPc_booted <= 1'b1;
  4214. if((IBusCachedPlugin_fetchPc_correction || IBusCachedPlugin_fetchPc_pcRegPropagate))begin
  4215. IBusCachedPlugin_fetchPc_inc <= 1'b0;
  4216. end
  4217. if((IBusCachedPlugin_fetchPc_output_valid && IBusCachedPlugin_fetchPc_output_ready))begin
  4218. IBusCachedPlugin_fetchPc_inc <= 1'b1;
  4219. end
  4220. if(((! IBusCachedPlugin_fetchPc_output_valid) && IBusCachedPlugin_fetchPc_output_ready))begin
  4221. IBusCachedPlugin_fetchPc_inc <= 1'b0;
  4222. end
  4223. if((IBusCachedPlugin_fetchPc_booted && ((IBusCachedPlugin_fetchPc_output_ready || IBusCachedPlugin_fetchPc_correction) || IBusCachedPlugin_fetchPc_pcRegPropagate)))begin
  4224. IBusCachedPlugin_fetchPc_pcReg <= IBusCachedPlugin_fetchPc_pc;
  4225. end
  4226. if(IBusCachedPlugin_iBusRsp_flush)begin
  4227. _zz_65_ <= 1'b0;
  4228. end
  4229. if(_zz_63_)begin
  4230. _zz_65_ <= (IBusCachedPlugin_iBusRsp_stages_0_output_valid && (! 1'b0));
  4231. end
  4232. if(IBusCachedPlugin_iBusRsp_flush)begin
  4233. _zz_67_ <= 1'b0;
  4234. end
  4235. if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin
  4236. _zz_67_ <= (IBusCachedPlugin_iBusRsp_stages_1_output_valid && (! IBusCachedPlugin_iBusRsp_flush));
  4237. end
  4238. if(IBusCachedPlugin_fetchPc_flushed)begin
  4239. IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b0;
  4240. end
  4241. if((! (! IBusCachedPlugin_iBusRsp_stages_1_input_ready)))begin
  4242. IBusCachedPlugin_injector_nextPcCalc_valids_0 <= 1'b1;
  4243. end
  4244. if(IBusCachedPlugin_fetchPc_flushed)begin
  4245. IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0;
  4246. end
  4247. if((! (! IBusCachedPlugin_iBusRsp_stages_2_input_ready)))begin
  4248. IBusCachedPlugin_injector_nextPcCalc_valids_1 <= IBusCachedPlugin_injector_nextPcCalc_valids_0;
  4249. end
  4250. if(IBusCachedPlugin_fetchPc_flushed)begin
  4251. IBusCachedPlugin_injector_nextPcCalc_valids_1 <= 1'b0;
  4252. end
  4253. if(IBusCachedPlugin_fetchPc_flushed)begin
  4254. IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0;
  4255. end
  4256. if((! execute_arbitration_isStuck))begin
  4257. IBusCachedPlugin_injector_nextPcCalc_valids_2 <= IBusCachedPlugin_injector_nextPcCalc_valids_1;
  4258. end
  4259. if(IBusCachedPlugin_fetchPc_flushed)begin
  4260. IBusCachedPlugin_injector_nextPcCalc_valids_2 <= 1'b0;
  4261. end
  4262. if(IBusCachedPlugin_fetchPc_flushed)begin
  4263. IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0;
  4264. end
  4265. if((! memory_arbitration_isStuck))begin
  4266. IBusCachedPlugin_injector_nextPcCalc_valids_3 <= IBusCachedPlugin_injector_nextPcCalc_valids_2;
  4267. end
  4268. if(IBusCachedPlugin_fetchPc_flushed)begin
  4269. IBusCachedPlugin_injector_nextPcCalc_valids_3 <= 1'b0;
  4270. end
  4271. if(IBusCachedPlugin_fetchPc_flushed)begin
  4272. IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0;
  4273. end
  4274. if((! writeBack_arbitration_isStuck))begin
  4275. IBusCachedPlugin_injector_nextPcCalc_valids_4 <= IBusCachedPlugin_injector_nextPcCalc_valids_3;
  4276. end
  4277. if(IBusCachedPlugin_fetchPc_flushed)begin
  4278. IBusCachedPlugin_injector_nextPcCalc_valids_4 <= 1'b0;
  4279. end
  4280. if(iBus_rsp_valid)begin
  4281. IBusCachedPlugin_rspCounter <= (IBusCachedPlugin_rspCounter + 32'h00000001);
  4282. end
  4283. if((RegFilePlugin_shadow_clear && (! decode_arbitration_isStuck)))begin
  4284. RegFilePlugin_shadow_read <= 1'b0;
  4285. end
  4286. if((RegFilePlugin_shadow_clear && (! writeBack_arbitration_isStuck)))begin
  4287. RegFilePlugin_shadow_write <= 1'b0;
  4288. end
  4289. _zz_101_ <= 1'b0;
  4290. _zz_113_ <= (_zz_41_ && writeBack_arbitration_isFiring);
  4291. if((! execute_arbitration_isStuck))begin
  4292. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= 1'b0;
  4293. end else begin
  4294. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_execute <= CsrPlugin_exceptionPortCtrl_exceptionValids_execute;
  4295. end
  4296. if((! memory_arbitration_isStuck))begin
  4297. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= (CsrPlugin_exceptionPortCtrl_exceptionValids_execute && (! execute_arbitration_isStuck));
  4298. end else begin
  4299. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_memory <= CsrPlugin_exceptionPortCtrl_exceptionValids_memory;
  4300. end
  4301. if((! writeBack_arbitration_isStuck))begin
  4302. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= (CsrPlugin_exceptionPortCtrl_exceptionValids_memory && (! memory_arbitration_isStuck));
  4303. end else begin
  4304. CsrPlugin_exceptionPortCtrl_exceptionValidsRegs_writeBack <= 1'b0;
  4305. end
  4306. CsrPlugin_interrupt_valid <= 1'b0;
  4307. if(_zz_190_)begin
  4308. if(_zz_191_)begin
  4309. CsrPlugin_interrupt_valid <= 1'b1;
  4310. end
  4311. if(_zz_192_)begin
  4312. CsrPlugin_interrupt_valid <= 1'b1;
  4313. end
  4314. if(_zz_193_)begin
  4315. CsrPlugin_interrupt_valid <= 1'b1;
  4316. end
  4317. end
  4318. if(CsrPlugin_pipelineLiberator_active)begin
  4319. if((! execute_arbitration_isStuck))begin
  4320. CsrPlugin_pipelineLiberator_pcValids_0 <= 1'b1;
  4321. end
  4322. if((! memory_arbitration_isStuck))begin
  4323. CsrPlugin_pipelineLiberator_pcValids_1 <= CsrPlugin_pipelineLiberator_pcValids_0;
  4324. end
  4325. if((! writeBack_arbitration_isStuck))begin
  4326. CsrPlugin_pipelineLiberator_pcValids_2 <= CsrPlugin_pipelineLiberator_pcValids_1;
  4327. end
  4328. end
  4329. if(((! CsrPlugin_pipelineLiberator_active) || decode_arbitration_removeIt))begin
  4330. CsrPlugin_pipelineLiberator_pcValids_0 <= 1'b0;
  4331. CsrPlugin_pipelineLiberator_pcValids_1 <= 1'b0;
  4332. CsrPlugin_pipelineLiberator_pcValids_2 <= 1'b0;
  4333. end
  4334. if(CsrPlugin_interruptJump)begin
  4335. CsrPlugin_interrupt_valid <= 1'b0;
  4336. end
  4337. CsrPlugin_hadException <= CsrPlugin_exception;
  4338. if(_zz_176_)begin
  4339. case(CsrPlugin_targetPrivilege)
  4340. 2'b11 : begin
  4341. CsrPlugin_mstatus_MIE <= 1'b0;
  4342. CsrPlugin_mstatus_MPIE <= CsrPlugin_mstatus_MIE;
  4343. CsrPlugin_mstatus_MPP <= CsrPlugin_privilege;
  4344. end
  4345. default : begin
  4346. end
  4347. endcase
  4348. end
  4349. if(_zz_177_)begin
  4350. case(_zz_178_)
  4351. 2'b11 : begin
  4352. CsrPlugin_mstatus_MPP <= (2'b00);
  4353. CsrPlugin_mstatus_MIE <= CsrPlugin_mstatus_MPIE;
  4354. CsrPlugin_mstatus_MPIE <= 1'b1;
  4355. end
  4356. default : begin
  4357. end
  4358. endcase
  4359. end
  4360. execute_CsrPlugin_wfiWake <= (({_zz_140_,{_zz_139_,_zz_138_}} != (3'b000)) || CsrPlugin_thirdPartyWake);
  4361. memory_DivPlugin_div_counter_value <= memory_DivPlugin_div_counter_valueNext;
  4362. if((! writeBack_arbitration_isStuck))begin
  4363. memory_to_writeBack_INSTRUCTION <= memory_INSTRUCTION;
  4364. end
  4365. if((! writeBack_arbitration_isStuck))begin
  4366. memory_to_writeBack_REGFILE_WRITE_DATA <= _zz_32_;
  4367. end
  4368. if(((! execute_arbitration_isStuck) || execute_arbitration_removeIt))begin
  4369. execute_arbitration_isValid <= 1'b0;
  4370. end
  4371. if(((! decode_arbitration_isStuck) && (! decode_arbitration_removeIt)))begin
  4372. execute_arbitration_isValid <= decode_arbitration_isValid;
  4373. end
  4374. if(((! memory_arbitration_isStuck) || memory_arbitration_removeIt))begin
  4375. memory_arbitration_isValid <= 1'b0;
  4376. end
  4377. if(((! execute_arbitration_isStuck) && (! execute_arbitration_removeIt)))begin
  4378. memory_arbitration_isValid <= execute_arbitration_isValid;
  4379. end
  4380. if(((! writeBack_arbitration_isStuck) || writeBack_arbitration_removeIt))begin
  4381. writeBack_arbitration_isValid <= 1'b0;
  4382. end
  4383. if(((! memory_arbitration_isStuck) && (! memory_arbitration_removeIt)))begin
  4384. writeBack_arbitration_isValid <= memory_arbitration_isValid;
  4385. end
  4386. if(execute_CsrPlugin_csr_1984)begin
  4387. if(execute_CsrPlugin_writeEnable)begin
  4388. RegFilePlugin_shadow_clear <= _zz_278_[0];
  4389. RegFilePlugin_shadow_read <= _zz_279_[0];
  4390. RegFilePlugin_shadow_write <= _zz_280_[0];
  4391. end
  4392. end
  4393. if(execute_CsrPlugin_csr_768)begin
  4394. if(execute_CsrPlugin_writeEnable)begin
  4395. CsrPlugin_mstatus_MPP <= execute_CsrPlugin_writeData[12 : 11];
  4396. CsrPlugin_mstatus_MPIE <= _zz_281_[0];
  4397. CsrPlugin_mstatus_MIE <= _zz_282_[0];
  4398. end
  4399. end
  4400. if(execute_CsrPlugin_csr_772)begin
  4401. if(execute_CsrPlugin_writeEnable)begin
  4402. CsrPlugin_mie_MEIE <= _zz_284_[0];
  4403. CsrPlugin_mie_MTIE <= _zz_285_[0];
  4404. CsrPlugin_mie_MSIE <= _zz_286_[0];
  4405. end
  4406. end
  4407. if(execute_CsrPlugin_csr_3008)begin
  4408. if(execute_CsrPlugin_writeEnable)begin
  4409. _zz_146_ <= execute_CsrPlugin_writeData[31 : 0];
  4410. end
  4411. end
  4412. if(_zz_194_)begin
  4413. dBus_cmd_halfPipe_regs_valid <= dBus_cmd_valid;
  4414. dBus_cmd_halfPipe_regs_ready <= (! dBus_cmd_valid);
  4415. end else begin
  4416. dBus_cmd_halfPipe_regs_valid <= (! dBus_cmd_halfPipe_ready);
  4417. dBus_cmd_halfPipe_regs_ready <= dBus_cmd_halfPipe_ready;
  4418. end
  4419. end
  4420. end
  4421. always @ (posedge clk) begin
  4422. if(IBusCachedPlugin_iBusRsp_stages_1_output_ready)begin
  4423. _zz_68_ <= IBusCachedPlugin_iBusRsp_stages_1_output_payload;
  4424. end
  4425. if(IBusCachedPlugin_iBusRsp_stages_1_input_ready)begin
  4426. IBusCachedPlugin_s1_tightlyCoupledHit <= IBusCachedPlugin_s0_tightlyCoupledHit;
  4427. end
  4428. if(IBusCachedPlugin_iBusRsp_stages_2_input_ready)begin
  4429. IBusCachedPlugin_s2_tightlyCoupledHit <= IBusCachedPlugin_s1_tightlyCoupledHit;
  4430. end
  4431. `ifndef SYNTHESIS
  4432. `ifdef FORMAL
  4433. assert((! (((dBus_rsp_ready && memory_MEMORY_ENABLE) && memory_arbitration_isValid) && memory_arbitration_isStuck)))
  4434. `else
  4435. if(!(! (((dBus_rsp_ready && memory_MEMORY_ENABLE) && memory_arbitration_isValid) && memory_arbitration_isStuck))) begin
  4436. $display("FAILURE DBusSimplePlugin doesn't allow memory stage stall when read happend");
  4437. $finish;
  4438. end
  4439. `endif
  4440. `endif
  4441. `ifndef SYNTHESIS
  4442. `ifdef FORMAL
  4443. assert((! (((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE) && (! writeBack_MEMORY_STORE)) && writeBack_arbitration_isStuck)))
  4444. `else
  4445. if(!(! (((writeBack_arbitration_isValid && writeBack_MEMORY_ENABLE) && (! writeBack_MEMORY_STORE)) && writeBack_arbitration_isStuck))) begin
  4446. $display("FAILURE DBusSimplePlugin doesn't allow writeback stage stall when read happend");
  4447. $finish;
  4448. end
  4449. `endif
  4450. `endif
  4451. _zz_114_ <= _zz_40_[11 : 7];
  4452. _zz_115_ <= _zz_50_;
  4453. CsrPlugin_mip_MEIP <= externalInterrupt;
  4454. CsrPlugin_mip_MTIP <= timerInterrupt;
  4455. CsrPlugin_mip_MSIP <= softwareInterrupt;
  4456. CsrPlugin_mcycle <= (CsrPlugin_mcycle + 64'h0000000000000001);
  4457. if(writeBack_arbitration_isFiring)begin
  4458. CsrPlugin_minstret <= (CsrPlugin_minstret + 64'h0000000000000001);
  4459. end
  4460. if(CsrPlugin_selfException_valid)begin
  4461. CsrPlugin_exceptionPortCtrl_exceptionContext_code <= CsrPlugin_selfException_payload_code;
  4462. CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= CsrPlugin_selfException_payload_badAddr;
  4463. end
  4464. if(DBusSimplePlugin_memoryExceptionPort_valid)begin
  4465. CsrPlugin_exceptionPortCtrl_exceptionContext_code <= DBusSimplePlugin_memoryExceptionPort_payload_code;
  4466. CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr <= DBusSimplePlugin_memoryExceptionPort_payload_badAddr;
  4467. end
  4468. if(_zz_190_)begin
  4469. if(_zz_191_)begin
  4470. CsrPlugin_interrupt_code <= (4'b0111);
  4471. CsrPlugin_interrupt_targetPrivilege <= (2'b11);
  4472. end
  4473. if(_zz_192_)begin
  4474. CsrPlugin_interrupt_code <= (4'b0011);
  4475. CsrPlugin_interrupt_targetPrivilege <= (2'b11);
  4476. end
  4477. if(_zz_193_)begin
  4478. CsrPlugin_interrupt_code <= (4'b1011);
  4479. CsrPlugin_interrupt_targetPrivilege <= (2'b11);
  4480. end
  4481. end
  4482. if(_zz_176_)begin
  4483. case(CsrPlugin_targetPrivilege)
  4484. 2'b11 : begin
  4485. CsrPlugin_mcause_interrupt <= (! CsrPlugin_hadException);
  4486. CsrPlugin_mcause_exceptionCode <= CsrPlugin_trapCause;
  4487. CsrPlugin_mepc <= writeBack_PC;
  4488. if(CsrPlugin_hadException)begin
  4489. CsrPlugin_mtval <= CsrPlugin_exceptionPortCtrl_exceptionContext_badAddr;
  4490. end
  4491. end
  4492. default : begin
  4493. end
  4494. endcase
  4495. end
  4496. if((memory_DivPlugin_div_counter_value == 6'h20))begin
  4497. memory_DivPlugin_div_done <= 1'b1;
  4498. end
  4499. if((! memory_arbitration_isStuck))begin
  4500. memory_DivPlugin_div_done <= 1'b0;
  4501. end
  4502. if(_zz_173_)begin
  4503. if(_zz_188_)begin
  4504. memory_DivPlugin_rs1[31 : 0] <= memory_DivPlugin_div_stage_0_outNumerator;
  4505. memory_DivPlugin_accumulator[31 : 0] <= memory_DivPlugin_div_stage_0_outRemainder;
  4506. if((memory_DivPlugin_div_counter_value == 6'h20))begin
  4507. memory_DivPlugin_div_result <= _zz_269_[31:0];
  4508. end
  4509. end
  4510. end
  4511. if(_zz_189_)begin
  4512. memory_DivPlugin_accumulator <= 65'h0;
  4513. memory_DivPlugin_rs1 <= ((_zz_144_ ? (~ _zz_145_) : _zz_145_) + _zz_275_);
  4514. memory_DivPlugin_rs2 <= ((_zz_143_ ? (~ execute_RS2) : execute_RS2) + _zz_277_);
  4515. memory_DivPlugin_div_needRevert <= ((_zz_144_ ^ (_zz_143_ && (! execute_INSTRUCTION[13]))) && (! (((execute_RS2 == 32'h0) && execute_IS_RS2_SIGNED) && (! execute_INSTRUCTION[13]))));
  4516. end
  4517. externalInterruptArray_regNext <= externalInterruptArray;
  4518. if((! memory_arbitration_isStuck))begin
  4519. execute_to_memory_MUL_HH <= execute_MUL_HH;
  4520. end
  4521. if((! writeBack_arbitration_isStuck))begin
  4522. memory_to_writeBack_MUL_HH <= memory_MUL_HH;
  4523. end
  4524. if((! execute_arbitration_isStuck))begin
  4525. decode_to_execute_RS1 <= decode_RS1;
  4526. end
  4527. if((! execute_arbitration_isStuck))begin
  4528. decode_to_execute_PREDICTION_HAD_BRANCHED2 <= decode_PREDICTION_HAD_BRANCHED2;
  4529. end
  4530. if((! execute_arbitration_isStuck))begin
  4531. decode_to_execute_MEMORY_STORE <= decode_MEMORY_STORE;
  4532. end
  4533. if((! memory_arbitration_isStuck))begin
  4534. execute_to_memory_MEMORY_STORE <= execute_MEMORY_STORE;
  4535. end
  4536. if((! writeBack_arbitration_isStuck))begin
  4537. memory_to_writeBack_MEMORY_STORE <= memory_MEMORY_STORE;
  4538. end
  4539. if((! execute_arbitration_isStuck))begin
  4540. decode_to_execute_MEMORY_ENABLE <= decode_MEMORY_ENABLE;
  4541. end
  4542. if((! memory_arbitration_isStuck))begin
  4543. execute_to_memory_MEMORY_ENABLE <= execute_MEMORY_ENABLE;
  4544. end
  4545. if((! writeBack_arbitration_isStuck))begin
  4546. memory_to_writeBack_MEMORY_ENABLE <= memory_MEMORY_ENABLE;
  4547. end
  4548. if((! execute_arbitration_isStuck))begin
  4549. decode_to_execute_IS_MUL <= decode_IS_MUL;
  4550. end
  4551. if((! memory_arbitration_isStuck))begin
  4552. execute_to_memory_IS_MUL <= execute_IS_MUL;
  4553. end
  4554. if((! writeBack_arbitration_isStuck))begin
  4555. memory_to_writeBack_IS_MUL <= memory_IS_MUL;
  4556. end
  4557. if((! execute_arbitration_isStuck))begin
  4558. decode_to_execute_CSR_READ_OPCODE <= decode_CSR_READ_OPCODE;
  4559. end
  4560. if((! execute_arbitration_isStuck))begin
  4561. decode_to_execute_SRC2_FORCE_ZERO <= decode_SRC2_FORCE_ZERO;
  4562. end
  4563. if((! memory_arbitration_isStuck))begin
  4564. execute_to_memory_MUL_LL <= execute_MUL_LL;
  4565. end
  4566. if((! memory_arbitration_isStuck))begin
  4567. execute_to_memory_MMU_RSP_physicalAddress <= execute_MMU_RSP_physicalAddress;
  4568. execute_to_memory_MMU_RSP_isIoAccess <= execute_MMU_RSP_isIoAccess;
  4569. execute_to_memory_MMU_RSP_allowRead <= execute_MMU_RSP_allowRead;
  4570. execute_to_memory_MMU_RSP_allowWrite <= execute_MMU_RSP_allowWrite;
  4571. execute_to_memory_MMU_RSP_allowExecute <= execute_MMU_RSP_allowExecute;
  4572. execute_to_memory_MMU_RSP_exception <= execute_MMU_RSP_exception;
  4573. execute_to_memory_MMU_RSP_refilling <= execute_MMU_RSP_refilling;
  4574. end
  4575. if((! execute_arbitration_isStuck))begin
  4576. decode_to_execute_SRC_USE_SUB_LESS <= decode_SRC_USE_SUB_LESS;
  4577. end
  4578. if((! execute_arbitration_isStuck))begin
  4579. decode_to_execute_BRANCH_CTRL <= _zz_25_;
  4580. end
  4581. if((! execute_arbitration_isStuck))begin
  4582. decode_to_execute_INSTRUCTION <= decode_INSTRUCTION;
  4583. end
  4584. if((! memory_arbitration_isStuck))begin
  4585. execute_to_memory_INSTRUCTION <= execute_INSTRUCTION;
  4586. end
  4587. if((! memory_arbitration_isStuck))begin
  4588. execute_to_memory_SHIFT_RIGHT <= execute_SHIFT_RIGHT;
  4589. end
  4590. if((! execute_arbitration_isStuck))begin
  4591. decode_to_execute_FORMAL_PC_NEXT <= _zz_54_;
  4592. end
  4593. if((! memory_arbitration_isStuck))begin
  4594. execute_to_memory_FORMAL_PC_NEXT <= execute_FORMAL_PC_NEXT;
  4595. end
  4596. if((! writeBack_arbitration_isStuck))begin
  4597. memory_to_writeBack_FORMAL_PC_NEXT <= _zz_53_;
  4598. end
  4599. if((! execute_arbitration_isStuck))begin
  4600. decode_to_execute_SHIFT_CTRL <= _zz_23_;
  4601. end
  4602. if((! memory_arbitration_isStuck))begin
  4603. execute_to_memory_SHIFT_CTRL <= _zz_20_;
  4604. end
  4605. if((! execute_arbitration_isStuck))begin
  4606. decode_to_execute_ALU_BITWISE_CTRL <= _zz_18_;
  4607. end
  4608. if((! execute_arbitration_isStuck))begin
  4609. decode_to_execute_IS_DIV <= decode_IS_DIV;
  4610. end
  4611. if((! memory_arbitration_isStuck))begin
  4612. execute_to_memory_IS_DIV <= execute_IS_DIV;
  4613. end
  4614. if((! memory_arbitration_isStuck))begin
  4615. execute_to_memory_MUL_HL <= execute_MUL_HL;
  4616. end
  4617. if((! execute_arbitration_isStuck))begin
  4618. decode_to_execute_REGFILE_WRITE_VALID <= decode_REGFILE_WRITE_VALID;
  4619. end
  4620. if((! memory_arbitration_isStuck))begin
  4621. execute_to_memory_REGFILE_WRITE_VALID <= execute_REGFILE_WRITE_VALID;
  4622. end
  4623. if((! writeBack_arbitration_isStuck))begin
  4624. memory_to_writeBack_REGFILE_WRITE_VALID <= memory_REGFILE_WRITE_VALID;
  4625. end
  4626. if((! execute_arbitration_isStuck))begin
  4627. decode_to_execute_PC <= decode_PC;
  4628. end
  4629. if((! memory_arbitration_isStuck))begin
  4630. execute_to_memory_PC <= _zz_35_;
  4631. end
  4632. if(((! writeBack_arbitration_isStuck) && (! CsrPlugin_exceptionPortCtrl_exceptionValids_writeBack)))begin
  4633. memory_to_writeBack_PC <= memory_PC;
  4634. end
  4635. if((! execute_arbitration_isStuck))begin
  4636. decode_to_execute_CSR_WRITE_OPCODE <= decode_CSR_WRITE_OPCODE;
  4637. end
  4638. if((! execute_arbitration_isStuck))begin
  4639. decode_to_execute_SRC_LESS_UNSIGNED <= decode_SRC_LESS_UNSIGNED;
  4640. end
  4641. if((! execute_arbitration_isStuck))begin
  4642. decode_to_execute_ALU_CTRL <= _zz_15_;
  4643. end
  4644. if((! execute_arbitration_isStuck))begin
  4645. decode_to_execute_BYPASSABLE_MEMORY_STAGE <= decode_BYPASSABLE_MEMORY_STAGE;
  4646. end
  4647. if((! memory_arbitration_isStuck))begin
  4648. execute_to_memory_BYPASSABLE_MEMORY_STAGE <= execute_BYPASSABLE_MEMORY_STAGE;
  4649. end
  4650. if((! memory_arbitration_isStuck))begin
  4651. execute_to_memory_REGFILE_WRITE_DATA <= _zz_31_;
  4652. end
  4653. if((! execute_arbitration_isStuck))begin
  4654. decode_to_execute_IS_CSR <= decode_IS_CSR;
  4655. end
  4656. if((! memory_arbitration_isStuck))begin
  4657. execute_to_memory_BRANCH_CALC <= execute_BRANCH_CALC;
  4658. end
  4659. if((! execute_arbitration_isStuck))begin
  4660. decode_to_execute_ENV_CTRL <= _zz_12_;
  4661. end
  4662. if((! memory_arbitration_isStuck))begin
  4663. execute_to_memory_ENV_CTRL <= _zz_9_;
  4664. end
  4665. if((! writeBack_arbitration_isStuck))begin
  4666. memory_to_writeBack_ENV_CTRL <= _zz_7_;
  4667. end
  4668. if((! execute_arbitration_isStuck))begin
  4669. decode_to_execute_BYPASSABLE_EXECUTE_STAGE <= decode_BYPASSABLE_EXECUTE_STAGE;
  4670. end
  4671. if((! writeBack_arbitration_isStuck))begin
  4672. memory_to_writeBack_MUL_LOW <= memory_MUL_LOW;
  4673. end
  4674. if((! memory_arbitration_isStuck))begin
  4675. execute_to_memory_BRANCH_DO <= execute_BRANCH_DO;
  4676. end
  4677. if((! memory_arbitration_isStuck))begin
  4678. execute_to_memory_MMU_FAULT <= execute_MMU_FAULT;
  4679. end
  4680. if((! execute_arbitration_isStuck))begin
  4681. decode_to_execute_RS2 <= decode_RS2;
  4682. end
  4683. if((! execute_arbitration_isStuck))begin
  4684. decode_to_execute_SRC1_CTRL <= _zz_5_;
  4685. end
  4686. if((! memory_arbitration_isStuck))begin
  4687. execute_to_memory_MEMORY_ADDRESS_LOW <= execute_MEMORY_ADDRESS_LOW;
  4688. end
  4689. if((! writeBack_arbitration_isStuck))begin
  4690. memory_to_writeBack_MEMORY_ADDRESS_LOW <= memory_MEMORY_ADDRESS_LOW;
  4691. end
  4692. if((! execute_arbitration_isStuck))begin
  4693. decode_to_execute_IS_RS1_SIGNED <= decode_IS_RS1_SIGNED;
  4694. end
  4695. if((! execute_arbitration_isStuck))begin
  4696. decode_to_execute_IS_RS2_SIGNED <= decode_IS_RS2_SIGNED;
  4697. end
  4698. if((! execute_arbitration_isStuck))begin
  4699. decode_to_execute_SRC2_CTRL <= _zz_2_;
  4700. end
  4701. if((! memory_arbitration_isStuck))begin
  4702. execute_to_memory_MUL_LH <= execute_MUL_LH;
  4703. end
  4704. if((! writeBack_arbitration_isStuck))begin
  4705. memory_to_writeBack_MEMORY_READ_DATA <= memory_MEMORY_READ_DATA;
  4706. end
  4707. if((! execute_arbitration_isStuck))begin
  4708. execute_CsrPlugin_csr_1984 <= (decode_INSTRUCTION[31 : 20] == 12'h7c0);
  4709. end
  4710. if((! execute_arbitration_isStuck))begin
  4711. execute_CsrPlugin_csr_768 <= (decode_INSTRUCTION[31 : 20] == 12'h300);
  4712. end
  4713. if((! execute_arbitration_isStuck))begin
  4714. execute_CsrPlugin_csr_836 <= (decode_INSTRUCTION[31 : 20] == 12'h344);
  4715. end
  4716. if((! execute_arbitration_isStuck))begin
  4717. execute_CsrPlugin_csr_772 <= (decode_INSTRUCTION[31 : 20] == 12'h304);
  4718. end
  4719. if((! execute_arbitration_isStuck))begin
  4720. execute_CsrPlugin_csr_773 <= (decode_INSTRUCTION[31 : 20] == 12'h305);
  4721. end
  4722. if((! execute_arbitration_isStuck))begin
  4723. execute_CsrPlugin_csr_833 <= (decode_INSTRUCTION[31 : 20] == 12'h341);
  4724. end
  4725. if((! execute_arbitration_isStuck))begin
  4726. execute_CsrPlugin_csr_834 <= (decode_INSTRUCTION[31 : 20] == 12'h342);
  4727. end
  4728. if((! execute_arbitration_isStuck))begin
  4729. execute_CsrPlugin_csr_835 <= (decode_INSTRUCTION[31 : 20] == 12'h343);
  4730. end
  4731. if((! execute_arbitration_isStuck))begin
  4732. execute_CsrPlugin_csr_3008 <= (decode_INSTRUCTION[31 : 20] == 12'hbc0);
  4733. end
  4734. if((! execute_arbitration_isStuck))begin
  4735. execute_CsrPlugin_csr_4032 <= (decode_INSTRUCTION[31 : 20] == 12'hfc0);
  4736. end
  4737. if(execute_CsrPlugin_csr_836)begin
  4738. if(execute_CsrPlugin_writeEnable)begin
  4739. CsrPlugin_mip_MSIP <= _zz_283_[0];
  4740. end
  4741. end
  4742. if(execute_CsrPlugin_csr_773)begin
  4743. if(execute_CsrPlugin_writeEnable)begin
  4744. CsrPlugin_mtvec_base <= execute_CsrPlugin_writeData[31 : 2];
  4745. CsrPlugin_mtvec_mode <= execute_CsrPlugin_writeData[1 : 0];
  4746. end
  4747. end
  4748. if(execute_CsrPlugin_csr_833)begin
  4749. if(execute_CsrPlugin_writeEnable)begin
  4750. CsrPlugin_mepc <= execute_CsrPlugin_writeData[31 : 0];
  4751. end
  4752. end
  4753. if(_zz_194_)begin
  4754. dBus_cmd_halfPipe_regs_payload_wr <= dBus_cmd_payload_wr;
  4755. dBus_cmd_halfPipe_regs_payload_address <= dBus_cmd_payload_address;
  4756. dBus_cmd_halfPipe_regs_payload_data <= dBus_cmd_payload_data;
  4757. dBus_cmd_halfPipe_regs_payload_size <= dBus_cmd_payload_size;
  4758. end
  4759. end
  4760. endmodule