12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750 |
- //Legal Notice: (C)2020 Altera Corporation. All rights reserved. Your
- //use of Altera Corporation's design tools, logic functions and other
- //software and tools, and its AMPP partner logic functions, and any
- //output files any of the foregoing (including device programming or
- //simulation files), and any associated documentation or information are
- //expressly subject to the terms and conditions of the Altera Program
- //License Subscription Agreement or other applicable license agreement,
- //including, without limitation, that your use is for the sole purpose
- //of programming logic devices manufactured by Altera and sold by Altera
- //or its authorized distributors. Please refer to the applicable
- //agreement for further details.
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_register_bank_a_module (
- // inputs:
- clock,
- data,
- rdaddress,
- wraddress,
- wren,
- // outputs:
- q
- )
- ;
- parameter lpm_file = "UNUSED";
- output [ 31: 0] q;
- input clock;
- input [ 31: 0] data;
- input [ 4: 0] rdaddress;
- input [ 4: 0] wraddress;
- input wren;
- wire [ 31: 0] q;
- wire [ 31: 0] ram_data;
- wire [ 31: 0] ram_q;
- assign q = ram_q;
- assign ram_data = data;
- altsyncram the_altsyncram
- (
- .address_a (wraddress),
- .address_b (rdaddress),
- .clock0 (clock),
- .data_a (ram_data),
- .q_b (ram_q),
- .wren_a (wren)
- );
- defparam the_altsyncram.address_reg_b = "CLOCK0",
- the_altsyncram.init_file = lpm_file,
- the_altsyncram.maximum_depth = 0,
- the_altsyncram.numwords_a = 32,
- the_altsyncram.numwords_b = 32,
- the_altsyncram.operation_mode = "DUAL_PORT",
- the_altsyncram.outdata_reg_b = "UNREGISTERED",
- the_altsyncram.ram_block_type = "AUTO",
- the_altsyncram.rdcontrol_reg_b = "CLOCK0",
- the_altsyncram.read_during_write_mode_mixed_ports = "DONT_CARE",
- the_altsyncram.width_a = 32,
- the_altsyncram.width_b = 32,
- the_altsyncram.widthad_a = 5,
- the_altsyncram.widthad_b = 5;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_register_bank_b_module (
- // inputs:
- clock,
- data,
- rdaddress,
- wraddress,
- wren,
- // outputs:
- q
- )
- ;
- parameter lpm_file = "UNUSED";
- output [ 31: 0] q;
- input clock;
- input [ 31: 0] data;
- input [ 4: 0] rdaddress;
- input [ 4: 0] wraddress;
- input wren;
- wire [ 31: 0] q;
- wire [ 31: 0] ram_data;
- wire [ 31: 0] ram_q;
- assign q = ram_q;
- assign ram_data = data;
- altsyncram the_altsyncram
- (
- .address_a (wraddress),
- .address_b (rdaddress),
- .clock0 (clock),
- .data_a (ram_data),
- .q_b (ram_q),
- .wren_a (wren)
- );
- defparam the_altsyncram.address_reg_b = "CLOCK0",
- the_altsyncram.init_file = lpm_file,
- the_altsyncram.maximum_depth = 0,
- the_altsyncram.numwords_a = 32,
- the_altsyncram.numwords_b = 32,
- the_altsyncram.operation_mode = "DUAL_PORT",
- the_altsyncram.outdata_reg_b = "UNREGISTERED",
- the_altsyncram.ram_block_type = "AUTO",
- the_altsyncram.rdcontrol_reg_b = "CLOCK0",
- the_altsyncram.read_during_write_mode_mixed_ports = "DONT_CARE",
- the_altsyncram.width_a = 32,
- the_altsyncram.width_b = 32,
- the_altsyncram.widthad_a = 5,
- the_altsyncram.widthad_b = 5;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_debug (
- // inputs:
- clk,
- dbrk_break,
- debugreq,
- hbreak_enabled,
- jdo,
- jrst_n,
- ocireg_ers,
- ocireg_mrs,
- reset,
- st_ready_test_idle,
- take_action_ocimem_a,
- take_action_ocireg,
- xbrk_break,
- // outputs:
- debugack,
- monitor_error,
- monitor_go,
- monitor_ready,
- oci_hbreak_req,
- resetlatch,
- resetrequest
- )
- ;
- output debugack;
- output monitor_error;
- output monitor_go;
- output monitor_ready;
- output oci_hbreak_req;
- output resetlatch;
- output resetrequest;
- input clk;
- input dbrk_break;
- input debugreq;
- input hbreak_enabled;
- input [ 37: 0] jdo;
- input jrst_n;
- input ocireg_ers;
- input ocireg_mrs;
- input reset;
- input st_ready_test_idle;
- input take_action_ocimem_a;
- input take_action_ocireg;
- input xbrk_break;
- reg break_on_reset /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- wire debugack;
- reg jtag_break /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg monitor_error /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=D101" */;
- reg monitor_go /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=D101" */;
- reg monitor_ready /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=D101" */;
- wire oci_hbreak_req;
- wire reset_sync;
- reg resetlatch /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg resetrequest /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- wire unxcomplemented_resetxx0;
- assign unxcomplemented_resetxx0 = jrst_n;
- altera_std_synchronizer the_altera_std_synchronizer
- (
- .clk (clk),
- .din (reset),
- .dout (reset_sync),
- .reset_n (unxcomplemented_resetxx0)
- );
- defparam the_altera_std_synchronizer.depth = 2;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- resetrequest <= 1'b0;
- break_on_reset <= 1'b0;
- jtag_break <= 1'b0;
- end
- else if (take_action_ocimem_a)
- begin
- resetrequest <= jdo[22];
- jtag_break <= jdo[21] ? 1
- : jdo[20] ? 0
- : jtag_break;
- break_on_reset <= jdo[19] ? 1
- : jdo[18] ? 0
- : break_on_reset;
- resetlatch <= jdo[24] ? 0 : resetlatch;
- end
- else if (reset_sync)
- begin
- jtag_break <= break_on_reset;
- resetlatch <= 1;
- end
- else if (debugreq & ~debugack & break_on_reset)
- jtag_break <= 1'b1;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- monitor_ready <= 1'b0;
- monitor_error <= 1'b0;
- monitor_go <= 1'b0;
- end
- else
- begin
- if (take_action_ocimem_a && jdo[25])
- monitor_ready <= 1'b0;
- else if (take_action_ocireg && ocireg_mrs)
- monitor_ready <= 1'b1;
- if (take_action_ocimem_a && jdo[25])
- monitor_error <= 1'b0;
- else if (take_action_ocireg && ocireg_ers)
- monitor_error <= 1'b1;
- if (take_action_ocimem_a && jdo[23])
- monitor_go <= 1'b1;
- else if (st_ready_test_idle)
- monitor_go <= 1'b0;
- end
- end
- assign oci_hbreak_req = jtag_break | dbrk_break | xbrk_break | debugreq;
- assign debugack = ~hbreak_enabled;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_break (
- // inputs:
- clk,
- dbrk_break,
- dbrk_goto0,
- dbrk_goto1,
- jdo,
- jrst_n,
- take_action_break_a,
- take_action_break_b,
- take_action_break_c,
- take_no_action_break_a,
- take_no_action_break_b,
- take_no_action_break_c,
- xbrk_goto0,
- xbrk_goto1,
- // outputs:
- break_readreg,
- dbrk_hit0_latch,
- dbrk_hit1_latch,
- dbrk_hit2_latch,
- dbrk_hit3_latch,
- trigbrktype,
- trigger_state_0,
- trigger_state_1,
- xbrk_ctrl0,
- xbrk_ctrl1,
- xbrk_ctrl2,
- xbrk_ctrl3
- )
- ;
- output [ 31: 0] break_readreg;
- output dbrk_hit0_latch;
- output dbrk_hit1_latch;
- output dbrk_hit2_latch;
- output dbrk_hit3_latch;
- output trigbrktype;
- output trigger_state_0;
- output trigger_state_1;
- output [ 7: 0] xbrk_ctrl0;
- output [ 7: 0] xbrk_ctrl1;
- output [ 7: 0] xbrk_ctrl2;
- output [ 7: 0] xbrk_ctrl3;
- input clk;
- input dbrk_break;
- input dbrk_goto0;
- input dbrk_goto1;
- input [ 37: 0] jdo;
- input jrst_n;
- input take_action_break_a;
- input take_action_break_b;
- input take_action_break_c;
- input take_no_action_break_a;
- input take_no_action_break_b;
- input take_no_action_break_c;
- input xbrk_goto0;
- input xbrk_goto1;
- wire [ 3: 0] break_a_wpr;
- wire [ 1: 0] break_a_wpr_high_bits;
- wire [ 1: 0] break_a_wpr_low_bits;
- wire [ 1: 0] break_b_rr;
- wire [ 1: 0] break_c_rr;
- reg [ 31: 0] break_readreg /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- wire dbrk0_high_value;
- wire dbrk0_low_value;
- wire dbrk1_high_value;
- wire dbrk1_low_value;
- wire dbrk2_high_value;
- wire dbrk2_low_value;
- wire dbrk3_high_value;
- wire dbrk3_low_value;
- wire dbrk_hit0_latch;
- wire dbrk_hit1_latch;
- wire dbrk_hit2_latch;
- wire dbrk_hit3_latch;
- wire take_action_any_break;
- reg trigbrktype /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg trigger_state;
- wire trigger_state_0;
- wire trigger_state_1;
- wire [ 31: 0] xbrk0_value;
- wire [ 31: 0] xbrk1_value;
- wire [ 31: 0] xbrk2_value;
- wire [ 31: 0] xbrk3_value;
- reg [ 7: 0] xbrk_ctrl0 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg [ 7: 0] xbrk_ctrl1 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg [ 7: 0] xbrk_ctrl2 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- reg [ 7: 0] xbrk_ctrl3 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,R101\"" */;
- assign break_a_wpr = jdo[35 : 32];
- assign break_a_wpr_high_bits = break_a_wpr[3 : 2];
- assign break_a_wpr_low_bits = break_a_wpr[1 : 0];
- assign break_b_rr = jdo[33 : 32];
- assign break_c_rr = jdo[33 : 32];
- assign take_action_any_break = take_action_break_a | take_action_break_b | take_action_break_c;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- xbrk_ctrl0 <= 0;
- xbrk_ctrl1 <= 0;
- xbrk_ctrl2 <= 0;
- xbrk_ctrl3 <= 0;
- trigbrktype <= 0;
- end
- else
- begin
- if (take_action_any_break)
- trigbrktype <= 0;
- else if (dbrk_break)
- trigbrktype <= 1;
- if (take_action_break_b)
- begin
- if ((break_b_rr == 2'b00) && (0 >= 1))
- begin
- xbrk_ctrl0[0] <= jdo[27];
- xbrk_ctrl0[1] <= jdo[28];
- xbrk_ctrl0[2] <= jdo[29];
- xbrk_ctrl0[3] <= jdo[30];
- xbrk_ctrl0[4] <= jdo[21];
- xbrk_ctrl0[5] <= jdo[20];
- xbrk_ctrl0[6] <= jdo[19];
- xbrk_ctrl0[7] <= jdo[18];
- end
- if ((break_b_rr == 2'b01) && (0 >= 2))
- begin
- xbrk_ctrl1[0] <= jdo[27];
- xbrk_ctrl1[1] <= jdo[28];
- xbrk_ctrl1[2] <= jdo[29];
- xbrk_ctrl1[3] <= jdo[30];
- xbrk_ctrl1[4] <= jdo[21];
- xbrk_ctrl1[5] <= jdo[20];
- xbrk_ctrl1[6] <= jdo[19];
- xbrk_ctrl1[7] <= jdo[18];
- end
- if ((break_b_rr == 2'b10) && (0 >= 3))
- begin
- xbrk_ctrl2[0] <= jdo[27];
- xbrk_ctrl2[1] <= jdo[28];
- xbrk_ctrl2[2] <= jdo[29];
- xbrk_ctrl2[3] <= jdo[30];
- xbrk_ctrl2[4] <= jdo[21];
- xbrk_ctrl2[5] <= jdo[20];
- xbrk_ctrl2[6] <= jdo[19];
- xbrk_ctrl2[7] <= jdo[18];
- end
- if ((break_b_rr == 2'b11) && (0 >= 4))
- begin
- xbrk_ctrl3[0] <= jdo[27];
- xbrk_ctrl3[1] <= jdo[28];
- xbrk_ctrl3[2] <= jdo[29];
- xbrk_ctrl3[3] <= jdo[30];
- xbrk_ctrl3[4] <= jdo[21];
- xbrk_ctrl3[5] <= jdo[20];
- xbrk_ctrl3[6] <= jdo[19];
- xbrk_ctrl3[7] <= jdo[18];
- end
- end
- end
- end
- assign dbrk_hit0_latch = 1'b0;
- assign dbrk0_low_value = 0;
- assign dbrk0_high_value = 0;
- assign dbrk_hit1_latch = 1'b0;
- assign dbrk1_low_value = 0;
- assign dbrk1_high_value = 0;
- assign dbrk_hit2_latch = 1'b0;
- assign dbrk2_low_value = 0;
- assign dbrk2_high_value = 0;
- assign dbrk_hit3_latch = 1'b0;
- assign dbrk3_low_value = 0;
- assign dbrk3_high_value = 0;
- assign xbrk0_value = 32'b0;
- assign xbrk1_value = 32'b0;
- assign xbrk2_value = 32'b0;
- assign xbrk3_value = 32'b0;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- break_readreg <= 32'b0;
- else if (take_action_any_break)
- break_readreg <= jdo[31 : 0];
- else if (take_no_action_break_a)
- case (break_a_wpr_high_bits)
-
- 2'd0: begin
- case (break_a_wpr_low_bits) // synthesis full_case
-
- 2'd0: begin
- break_readreg <= xbrk0_value;
- end // 2'd0
-
- 2'd1: begin
- break_readreg <= xbrk1_value;
- end // 2'd1
-
- 2'd2: begin
- break_readreg <= xbrk2_value;
- end // 2'd2
-
- 2'd3: begin
- break_readreg <= xbrk3_value;
- end // 2'd3
-
- endcase // break_a_wpr_low_bits
- end // 2'd0
-
- 2'd1: begin
- break_readreg <= 32'b0;
- end // 2'd1
-
- 2'd2: begin
- case (break_a_wpr_low_bits) // synthesis full_case
-
- 2'd0: begin
- break_readreg <= dbrk0_low_value;
- end // 2'd0
-
- 2'd1: begin
- break_readreg <= dbrk1_low_value;
- end // 2'd1
-
- 2'd2: begin
- break_readreg <= dbrk2_low_value;
- end // 2'd2
-
- 2'd3: begin
- break_readreg <= dbrk3_low_value;
- end // 2'd3
-
- endcase // break_a_wpr_low_bits
- end // 2'd2
-
- 2'd3: begin
- case (break_a_wpr_low_bits) // synthesis full_case
-
- 2'd0: begin
- break_readreg <= dbrk0_high_value;
- end // 2'd0
-
- 2'd1: begin
- break_readreg <= dbrk1_high_value;
- end // 2'd1
-
- 2'd2: begin
- break_readreg <= dbrk2_high_value;
- end // 2'd2
-
- 2'd3: begin
- break_readreg <= dbrk3_high_value;
- end // 2'd3
-
- endcase // break_a_wpr_low_bits
- end // 2'd3
-
- endcase // break_a_wpr_high_bits
- else if (take_no_action_break_b)
- break_readreg <= jdo[31 : 0];
- else if (take_no_action_break_c)
- break_readreg <= jdo[31 : 0];
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- trigger_state <= 0;
- else if (trigger_state_1 & (xbrk_goto0 | dbrk_goto0))
- trigger_state <= 0;
- else if (trigger_state_0 & (xbrk_goto1 | dbrk_goto1))
- trigger_state <= -1;
- end
- assign trigger_state_0 = ~trigger_state;
- assign trigger_state_1 = trigger_state;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_xbrk (
- // inputs:
- D_valid,
- E_valid,
- F_pc,
- clk,
- reset_n,
- trigger_state_0,
- trigger_state_1,
- xbrk_ctrl0,
- xbrk_ctrl1,
- xbrk_ctrl2,
- xbrk_ctrl3,
- // outputs:
- xbrk_break,
- xbrk_goto0,
- xbrk_goto1,
- xbrk_traceoff,
- xbrk_traceon,
- xbrk_trigout
- )
- ;
- output xbrk_break;
- output xbrk_goto0;
- output xbrk_goto1;
- output xbrk_traceoff;
- output xbrk_traceon;
- output xbrk_trigout;
- input D_valid;
- input E_valid;
- input [ 17: 0] F_pc;
- input clk;
- input reset_n;
- input trigger_state_0;
- input trigger_state_1;
- input [ 7: 0] xbrk_ctrl0;
- input [ 7: 0] xbrk_ctrl1;
- input [ 7: 0] xbrk_ctrl2;
- input [ 7: 0] xbrk_ctrl3;
- wire D_cpu_addr_en;
- wire E_cpu_addr_en;
- reg E_xbrk_goto0;
- reg E_xbrk_goto1;
- reg E_xbrk_traceoff;
- reg E_xbrk_traceon;
- reg E_xbrk_trigout;
- wire [ 19: 0] cpu_i_address;
- wire xbrk0_armed;
- wire xbrk0_break_hit;
- wire xbrk0_goto0_hit;
- wire xbrk0_goto1_hit;
- wire xbrk0_toff_hit;
- wire xbrk0_ton_hit;
- wire xbrk0_tout_hit;
- wire xbrk1_armed;
- wire xbrk1_break_hit;
- wire xbrk1_goto0_hit;
- wire xbrk1_goto1_hit;
- wire xbrk1_toff_hit;
- wire xbrk1_ton_hit;
- wire xbrk1_tout_hit;
- wire xbrk2_armed;
- wire xbrk2_break_hit;
- wire xbrk2_goto0_hit;
- wire xbrk2_goto1_hit;
- wire xbrk2_toff_hit;
- wire xbrk2_ton_hit;
- wire xbrk2_tout_hit;
- wire xbrk3_armed;
- wire xbrk3_break_hit;
- wire xbrk3_goto0_hit;
- wire xbrk3_goto1_hit;
- wire xbrk3_toff_hit;
- wire xbrk3_ton_hit;
- wire xbrk3_tout_hit;
- reg xbrk_break;
- wire xbrk_break_hit;
- wire xbrk_goto0;
- wire xbrk_goto0_hit;
- wire xbrk_goto1;
- wire xbrk_goto1_hit;
- wire xbrk_toff_hit;
- wire xbrk_ton_hit;
- wire xbrk_tout_hit;
- wire xbrk_traceoff;
- wire xbrk_traceon;
- wire xbrk_trigout;
- assign cpu_i_address = {F_pc, 2'b00};
- assign D_cpu_addr_en = D_valid;
- assign E_cpu_addr_en = E_valid;
- assign xbrk0_break_hit = 0;
- assign xbrk0_ton_hit = 0;
- assign xbrk0_toff_hit = 0;
- assign xbrk0_tout_hit = 0;
- assign xbrk0_goto0_hit = 0;
- assign xbrk0_goto1_hit = 0;
- assign xbrk1_break_hit = 0;
- assign xbrk1_ton_hit = 0;
- assign xbrk1_toff_hit = 0;
- assign xbrk1_tout_hit = 0;
- assign xbrk1_goto0_hit = 0;
- assign xbrk1_goto1_hit = 0;
- assign xbrk2_break_hit = 0;
- assign xbrk2_ton_hit = 0;
- assign xbrk2_toff_hit = 0;
- assign xbrk2_tout_hit = 0;
- assign xbrk2_goto0_hit = 0;
- assign xbrk2_goto1_hit = 0;
- assign xbrk3_break_hit = 0;
- assign xbrk3_ton_hit = 0;
- assign xbrk3_toff_hit = 0;
- assign xbrk3_tout_hit = 0;
- assign xbrk3_goto0_hit = 0;
- assign xbrk3_goto1_hit = 0;
- assign xbrk_break_hit = (xbrk0_break_hit) | (xbrk1_break_hit) | (xbrk2_break_hit) | (xbrk3_break_hit);
- assign xbrk_ton_hit = (xbrk0_ton_hit) | (xbrk1_ton_hit) | (xbrk2_ton_hit) | (xbrk3_ton_hit);
- assign xbrk_toff_hit = (xbrk0_toff_hit) | (xbrk1_toff_hit) | (xbrk2_toff_hit) | (xbrk3_toff_hit);
- assign xbrk_tout_hit = (xbrk0_tout_hit) | (xbrk1_tout_hit) | (xbrk2_tout_hit) | (xbrk3_tout_hit);
- assign xbrk_goto0_hit = (xbrk0_goto0_hit) | (xbrk1_goto0_hit) | (xbrk2_goto0_hit) | (xbrk3_goto0_hit);
- assign xbrk_goto1_hit = (xbrk0_goto1_hit) | (xbrk1_goto1_hit) | (xbrk2_goto1_hit) | (xbrk3_goto1_hit);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- xbrk_break <= 0;
- else if (E_cpu_addr_en)
- xbrk_break <= xbrk_break_hit;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_xbrk_traceon <= 0;
- else if (E_cpu_addr_en)
- E_xbrk_traceon <= xbrk_ton_hit;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_xbrk_traceoff <= 0;
- else if (E_cpu_addr_en)
- E_xbrk_traceoff <= xbrk_toff_hit;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_xbrk_trigout <= 0;
- else if (E_cpu_addr_en)
- E_xbrk_trigout <= xbrk_tout_hit;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_xbrk_goto0 <= 0;
- else if (E_cpu_addr_en)
- E_xbrk_goto0 <= xbrk_goto0_hit;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_xbrk_goto1 <= 0;
- else if (E_cpu_addr_en)
- E_xbrk_goto1 <= xbrk_goto1_hit;
- end
- assign xbrk_traceon = 1'b0;
- assign xbrk_traceoff = 1'b0;
- assign xbrk_trigout = 1'b0;
- assign xbrk_goto0 = 1'b0;
- assign xbrk_goto1 = 1'b0;
- assign xbrk0_armed = (xbrk_ctrl0[4] & trigger_state_0) ||
- (xbrk_ctrl0[5] & trigger_state_1);
- assign xbrk1_armed = (xbrk_ctrl1[4] & trigger_state_0) ||
- (xbrk_ctrl1[5] & trigger_state_1);
- assign xbrk2_armed = (xbrk_ctrl2[4] & trigger_state_0) ||
- (xbrk_ctrl2[5] & trigger_state_1);
- assign xbrk3_armed = (xbrk_ctrl3[4] & trigger_state_0) ||
- (xbrk_ctrl3[5] & trigger_state_1);
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_dbrk (
- // inputs:
- E_st_data,
- av_ld_data_aligned_filtered,
- clk,
- d_address,
- d_read,
- d_waitrequest,
- d_write,
- debugack,
- reset_n,
- // outputs:
- cpu_d_address,
- cpu_d_read,
- cpu_d_readdata,
- cpu_d_wait,
- cpu_d_write,
- cpu_d_writedata,
- dbrk_break,
- dbrk_goto0,
- dbrk_goto1,
- dbrk_traceme,
- dbrk_traceoff,
- dbrk_traceon,
- dbrk_trigout
- )
- ;
- output [ 19: 0] cpu_d_address;
- output cpu_d_read;
- output [ 31: 0] cpu_d_readdata;
- output cpu_d_wait;
- output cpu_d_write;
- output [ 31: 0] cpu_d_writedata;
- output dbrk_break;
- output dbrk_goto0;
- output dbrk_goto1;
- output dbrk_traceme;
- output dbrk_traceoff;
- output dbrk_traceon;
- output dbrk_trigout;
- input [ 31: 0] E_st_data;
- input [ 31: 0] av_ld_data_aligned_filtered;
- input clk;
- input [ 19: 0] d_address;
- input d_read;
- input d_waitrequest;
- input d_write;
- input debugack;
- input reset_n;
- wire [ 19: 0] cpu_d_address;
- wire cpu_d_read;
- wire [ 31: 0] cpu_d_readdata;
- wire cpu_d_wait;
- wire cpu_d_write;
- wire [ 31: 0] cpu_d_writedata;
- wire dbrk0_armed;
- wire dbrk0_break_pulse;
- wire dbrk0_goto0;
- wire dbrk0_goto1;
- wire dbrk0_traceme;
- wire dbrk0_traceoff;
- wire dbrk0_traceon;
- wire dbrk0_trigout;
- wire dbrk1_armed;
- wire dbrk1_break_pulse;
- wire dbrk1_goto0;
- wire dbrk1_goto1;
- wire dbrk1_traceme;
- wire dbrk1_traceoff;
- wire dbrk1_traceon;
- wire dbrk1_trigout;
- wire dbrk2_armed;
- wire dbrk2_break_pulse;
- wire dbrk2_goto0;
- wire dbrk2_goto1;
- wire dbrk2_traceme;
- wire dbrk2_traceoff;
- wire dbrk2_traceon;
- wire dbrk2_trigout;
- wire dbrk3_armed;
- wire dbrk3_break_pulse;
- wire dbrk3_goto0;
- wire dbrk3_goto1;
- wire dbrk3_traceme;
- wire dbrk3_traceoff;
- wire dbrk3_traceon;
- wire dbrk3_trigout;
- reg dbrk_break;
- reg dbrk_break_pulse;
- wire [ 31: 0] dbrk_data;
- reg dbrk_goto0;
- reg dbrk_goto1;
- reg dbrk_traceme;
- reg dbrk_traceoff;
- reg dbrk_traceon;
- reg dbrk_trigout;
- assign cpu_d_address = d_address;
- assign cpu_d_readdata = av_ld_data_aligned_filtered;
- assign cpu_d_read = d_read;
- assign cpu_d_writedata = E_st_data;
- assign cpu_d_write = d_write;
- assign cpu_d_wait = d_waitrequest;
- assign dbrk_data = cpu_d_write ? cpu_d_writedata : cpu_d_readdata;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- dbrk_break <= 0;
- else
- dbrk_break <= dbrk_break ? ~debugack
- : dbrk_break_pulse;
- end
- assign dbrk0_armed = 1'b0;
- assign dbrk0_trigout = 1'b0;
- assign dbrk0_break_pulse = 1'b0;
- assign dbrk0_traceoff = 1'b0;
- assign dbrk0_traceon = 1'b0;
- assign dbrk0_traceme = 1'b0;
- assign dbrk0_goto0 = 1'b0;
- assign dbrk0_goto1 = 1'b0;
- assign dbrk1_armed = 1'b0;
- assign dbrk1_trigout = 1'b0;
- assign dbrk1_break_pulse = 1'b0;
- assign dbrk1_traceoff = 1'b0;
- assign dbrk1_traceon = 1'b0;
- assign dbrk1_traceme = 1'b0;
- assign dbrk1_goto0 = 1'b0;
- assign dbrk1_goto1 = 1'b0;
- assign dbrk2_armed = 1'b0;
- assign dbrk2_trigout = 1'b0;
- assign dbrk2_break_pulse = 1'b0;
- assign dbrk2_traceoff = 1'b0;
- assign dbrk2_traceon = 1'b0;
- assign dbrk2_traceme = 1'b0;
- assign dbrk2_goto0 = 1'b0;
- assign dbrk2_goto1 = 1'b0;
- assign dbrk3_armed = 1'b0;
- assign dbrk3_trigout = 1'b0;
- assign dbrk3_break_pulse = 1'b0;
- assign dbrk3_traceoff = 1'b0;
- assign dbrk3_traceon = 1'b0;
- assign dbrk3_traceme = 1'b0;
- assign dbrk3_goto0 = 1'b0;
- assign dbrk3_goto1 = 1'b0;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- begin
- dbrk_trigout <= 0;
- dbrk_break_pulse <= 0;
- dbrk_traceoff <= 0;
- dbrk_traceon <= 0;
- dbrk_traceme <= 0;
- dbrk_goto0 <= 0;
- dbrk_goto1 <= 0;
- end
- else
- begin
- dbrk_trigout <= dbrk0_trigout | dbrk1_trigout | dbrk2_trigout | dbrk3_trigout;
- dbrk_break_pulse <= dbrk0_break_pulse | dbrk1_break_pulse | dbrk2_break_pulse | dbrk3_break_pulse;
- dbrk_traceoff <= dbrk0_traceoff | dbrk1_traceoff | dbrk2_traceoff | dbrk3_traceoff;
- dbrk_traceon <= dbrk0_traceon | dbrk1_traceon | dbrk2_traceon | dbrk3_traceon;
- dbrk_traceme <= dbrk0_traceme | dbrk1_traceme | dbrk2_traceme | dbrk3_traceme;
- dbrk_goto0 <= dbrk0_goto0 | dbrk1_goto0 | dbrk2_goto0 | dbrk3_goto0;
- dbrk_goto1 <= dbrk0_goto1 | dbrk1_goto1 | dbrk2_goto1 | dbrk3_goto1;
- end
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_itrace (
- // inputs:
- clk,
- dbrk_traceoff,
- dbrk_traceon,
- jdo,
- jrst_n,
- take_action_tracectrl,
- xbrk_traceoff,
- xbrk_traceon,
- xbrk_wrap_traceoff,
- // outputs:
- itm,
- trc_ctrl,
- trc_on
- )
- ;
- output [ 35: 0] itm;
- output [ 15: 0] trc_ctrl;
- output trc_on;
- input clk;
- input dbrk_traceoff;
- input dbrk_traceon;
- input [ 15: 0] jdo;
- input jrst_n;
- input take_action_tracectrl;
- input xbrk_traceoff;
- input xbrk_traceon;
- input xbrk_wrap_traceoff;
- wire advanced_exc_occured;
- wire curr_pid;
- wire [ 1: 0] dct_code;
- wire dct_is_taken;
- wire [ 31: 0] eic_addr;
- wire [ 31: 0] exc_addr;
- wire instr_retired;
- wire is_cond_dct;
- wire is_dct;
- wire is_exception_no_break;
- wire is_external_interrupt;
- wire is_fast_tlb_miss_exception;
- wire is_idct;
- wire [ 35: 0] itm;
- wire not_in_debug_mode;
- wire record_dct_outcome_in_sync;
- wire record_itrace;
- wire [ 31: 0] retired_pcb;
- wire [ 1: 0] sync_code;
- wire [ 6: 0] sync_interval;
- wire [ 6: 0] sync_timer;
- wire [ 6: 0] sync_timer_next;
- wire sync_timer_reached_zero;
- wire [ 15: 0] trc_ctrl;
- reg [ 10: 0] trc_ctrl_reg /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire trc_on;
- assign is_cond_dct = 1'b0;
- assign is_dct = 1'b0;
- assign dct_is_taken = 1'b0;
- assign is_idct = 1'b0;
- assign retired_pcb = 32'b0;
- assign not_in_debug_mode = 1'b0;
- assign instr_retired = 1'b0;
- assign advanced_exc_occured = 1'b0;
- assign is_exception_no_break = 1'b0;
- assign is_external_interrupt = 1'b0;
- assign is_fast_tlb_miss_exception = 1'b0;
- assign curr_pid = 1'b0;
- assign exc_addr = 32'b0;
- assign eic_addr = 32'b0;
- assign sync_code = trc_ctrl[3 : 2];
- assign sync_interval = { sync_code[1] & sync_code[0], 1'b0, sync_code[1] & ~sync_code[0], 1'b0, ~sync_code[1] & sync_code[0], 2'b00 };
- assign sync_timer_reached_zero = sync_timer == 0;
- assign record_dct_outcome_in_sync = dct_is_taken & sync_timer_reached_zero;
- assign sync_timer_next = sync_timer_reached_zero ? sync_timer : (sync_timer - 1);
- assign record_itrace = trc_on & trc_ctrl[4];
- assign dct_code = {is_cond_dct, dct_is_taken};
- assign itm = 36'd0;
- assign sync_timer = 7'd1;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- trc_ctrl_reg[0] <= 1'b0;
- trc_ctrl_reg[1] <= 1'b0;
- trc_ctrl_reg[3 : 2] <= 2'b00;
- trc_ctrl_reg[4] <= 1'b0;
- trc_ctrl_reg[7 : 5] <= 3'b000;
- trc_ctrl_reg[8] <= 0;
- trc_ctrl_reg[9] <= 1'b0;
- trc_ctrl_reg[10] <= 1'b0;
- end
- else if (take_action_tracectrl)
- begin
- trc_ctrl_reg[0] <= jdo[5];
- trc_ctrl_reg[1] <= jdo[6];
- trc_ctrl_reg[3 : 2] <= jdo[8 : 7];
- trc_ctrl_reg[4] <= jdo[9];
- trc_ctrl_reg[9] <= jdo[14];
- trc_ctrl_reg[10] <= jdo[2];
- trc_ctrl_reg[7 : 5] <= 3'b000;
- trc_ctrl_reg[8] <= 1'b0;
- end
- else if (xbrk_wrap_traceoff)
- begin
- trc_ctrl_reg[1] <= 0;
- trc_ctrl_reg[0] <= 0;
- end
- else if (dbrk_traceoff | xbrk_traceoff)
- trc_ctrl_reg[1] <= 0;
- else if (trc_ctrl_reg[0] &
- (dbrk_traceon | xbrk_traceon))
- trc_ctrl_reg[1] <= 1;
- end
- assign trc_ctrl = 0;
- assign trc_on = trc_ctrl[1] & (trc_ctrl[9] | not_in_debug_mode);
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_td_mode (
- // inputs:
- ctrl,
- // outputs:
- td_mode
- )
- ;
- output [ 3: 0] td_mode;
- input [ 8: 0] ctrl;
- wire [ 2: 0] ctrl_bits_for_mux;
- reg [ 3: 0] td_mode;
- assign ctrl_bits_for_mux = ctrl[7 : 5];
- always @(ctrl_bits_for_mux)
- begin
- case (ctrl_bits_for_mux)
-
- 3'b000: begin
- td_mode = 4'b0000;
- end // 3'b000
-
- 3'b001: begin
- td_mode = 4'b1000;
- end // 3'b001
-
- 3'b010: begin
- td_mode = 4'b0100;
- end // 3'b010
-
- 3'b011: begin
- td_mode = 4'b1100;
- end // 3'b011
-
- 3'b100: begin
- td_mode = 4'b0010;
- end // 3'b100
-
- 3'b101: begin
- td_mode = 4'b1010;
- end // 3'b101
-
- 3'b110: begin
- td_mode = 4'b0101;
- end // 3'b110
-
- 3'b111: begin
- td_mode = 4'b1111;
- end // 3'b111
-
- endcase // ctrl_bits_for_mux
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_dtrace (
- // inputs:
- clk,
- cpu_d_address,
- cpu_d_read,
- cpu_d_readdata,
- cpu_d_wait,
- cpu_d_write,
- cpu_d_writedata,
- jrst_n,
- trc_ctrl,
- // outputs:
- atm,
- dtm
- )
- ;
- output [ 35: 0] atm;
- output [ 35: 0] dtm;
- input clk;
- input [ 19: 0] cpu_d_address;
- input cpu_d_read;
- input [ 31: 0] cpu_d_readdata;
- input cpu_d_wait;
- input cpu_d_write;
- input [ 31: 0] cpu_d_writedata;
- input jrst_n;
- input [ 15: 0] trc_ctrl;
- reg [ 35: 0] atm /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire [ 31: 0] cpu_d_address_0_padded;
- wire [ 31: 0] cpu_d_readdata_0_padded;
- wire [ 31: 0] cpu_d_writedata_0_padded;
- reg [ 35: 0] dtm /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire dummy_tie_off;
- wire record_load_addr;
- wire record_load_data;
- wire record_store_addr;
- wire record_store_data;
- wire [ 3: 0] td_mode_trc_ctrl;
- assign cpu_d_writedata_0_padded = cpu_d_writedata | 32'b0;
- assign cpu_d_readdata_0_padded = cpu_d_readdata | 32'b0;
- assign cpu_d_address_0_padded = cpu_d_address | 32'b0;
- //nios2_uc_nios2_cpu_nios2_oci_trc_ctrl_td_mode, which is an e_instance
- nios2_uc_nios2_cpu_nios2_oci_td_mode nios2_uc_nios2_cpu_nios2_oci_trc_ctrl_td_mode
- (
- .ctrl (trc_ctrl[8 : 0]),
- .td_mode (td_mode_trc_ctrl)
- );
- assign {record_load_addr, record_store_addr,
- record_load_data, record_store_data} = td_mode_trc_ctrl;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- atm <= 0;
- dtm <= 0;
- end
- else
- begin
- atm <= 0;
- dtm <= 0;
- end
- end
- assign dummy_tie_off = cpu_d_wait|cpu_d_read|cpu_d_write;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_compute_input_tm_cnt (
- // inputs:
- atm_valid,
- dtm_valid,
- itm_valid,
- // outputs:
- compute_input_tm_cnt
- )
- ;
- output [ 1: 0] compute_input_tm_cnt;
- input atm_valid;
- input dtm_valid;
- input itm_valid;
- reg [ 1: 0] compute_input_tm_cnt;
- wire [ 2: 0] switch_for_mux;
- assign switch_for_mux = {itm_valid, atm_valid, dtm_valid};
- always @(switch_for_mux)
- begin
- case (switch_for_mux)
-
- 3'b000: begin
- compute_input_tm_cnt = 0;
- end // 3'b000
-
- 3'b001: begin
- compute_input_tm_cnt = 1;
- end // 3'b001
-
- 3'b010: begin
- compute_input_tm_cnt = 1;
- end // 3'b010
-
- 3'b011: begin
- compute_input_tm_cnt = 2;
- end // 3'b011
-
- 3'b100: begin
- compute_input_tm_cnt = 1;
- end // 3'b100
-
- 3'b101: begin
- compute_input_tm_cnt = 2;
- end // 3'b101
-
- 3'b110: begin
- compute_input_tm_cnt = 2;
- end // 3'b110
-
- 3'b111: begin
- compute_input_tm_cnt = 3;
- end // 3'b111
-
- endcase // switch_for_mux
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_fifo_wrptr_inc (
- // inputs:
- ge2_free,
- ge3_free,
- input_tm_cnt,
- // outputs:
- fifo_wrptr_inc
- )
- ;
- output [ 3: 0] fifo_wrptr_inc;
- input ge2_free;
- input ge3_free;
- input [ 1: 0] input_tm_cnt;
- reg [ 3: 0] fifo_wrptr_inc;
- always @(ge2_free or ge3_free or input_tm_cnt)
- begin
- if (ge3_free & (input_tm_cnt == 3))
- fifo_wrptr_inc = 3;
- else if (ge2_free & (input_tm_cnt >= 2))
- fifo_wrptr_inc = 2;
- else if (input_tm_cnt >= 1)
- fifo_wrptr_inc = 1;
- else
- fifo_wrptr_inc = 0;
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_fifo_cnt_inc (
- // inputs:
- empty,
- ge2_free,
- ge3_free,
- input_tm_cnt,
- // outputs:
- fifo_cnt_inc
- )
- ;
- output [ 4: 0] fifo_cnt_inc;
- input empty;
- input ge2_free;
- input ge3_free;
- input [ 1: 0] input_tm_cnt;
- reg [ 4: 0] fifo_cnt_inc;
- always @(empty or ge2_free or ge3_free or input_tm_cnt)
- begin
- if (empty)
- fifo_cnt_inc = input_tm_cnt[1 : 0];
- else if (ge3_free & (input_tm_cnt == 3))
- fifo_cnt_inc = 2;
- else if (ge2_free & (input_tm_cnt >= 2))
- fifo_cnt_inc = 1;
- else if (input_tm_cnt >= 1)
- fifo_cnt_inc = 0;
- else
- fifo_cnt_inc = {5{1'b1}};
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_fifo (
- // inputs:
- atm,
- clk,
- dbrk_traceme,
- dbrk_traceoff,
- dbrk_traceon,
- dtm,
- itm,
- jrst_n,
- reset_n,
- trc_on,
- // outputs:
- tw
- )
- ;
- output [ 35: 0] tw;
- input [ 35: 0] atm;
- input clk;
- input dbrk_traceme;
- input dbrk_traceoff;
- input dbrk_traceon;
- input [ 35: 0] dtm;
- input [ 35: 0] itm;
- input jrst_n;
- input reset_n;
- input trc_on;
- wire atm_valid;
- wire [ 1: 0] compute_input_tm_cnt;
- wire dtm_valid;
- wire empty;
- reg [ 35: 0] fifo_0;
- wire fifo_0_enable;
- wire [ 35: 0] fifo_0_mux;
- reg [ 35: 0] fifo_1;
- reg [ 35: 0] fifo_10;
- wire fifo_10_enable;
- wire [ 35: 0] fifo_10_mux;
- reg [ 35: 0] fifo_11;
- wire fifo_11_enable;
- wire [ 35: 0] fifo_11_mux;
- reg [ 35: 0] fifo_12;
- wire fifo_12_enable;
- wire [ 35: 0] fifo_12_mux;
- reg [ 35: 0] fifo_13;
- wire fifo_13_enable;
- wire [ 35: 0] fifo_13_mux;
- reg [ 35: 0] fifo_14;
- wire fifo_14_enable;
- wire [ 35: 0] fifo_14_mux;
- reg [ 35: 0] fifo_15;
- wire fifo_15_enable;
- wire [ 35: 0] fifo_15_mux;
- wire fifo_1_enable;
- wire [ 35: 0] fifo_1_mux;
- reg [ 35: 0] fifo_2;
- wire fifo_2_enable;
- wire [ 35: 0] fifo_2_mux;
- reg [ 35: 0] fifo_3;
- wire fifo_3_enable;
- wire [ 35: 0] fifo_3_mux;
- reg [ 35: 0] fifo_4;
- wire fifo_4_enable;
- wire [ 35: 0] fifo_4_mux;
- reg [ 35: 0] fifo_5;
- wire fifo_5_enable;
- wire [ 35: 0] fifo_5_mux;
- reg [ 35: 0] fifo_6;
- wire fifo_6_enable;
- wire [ 35: 0] fifo_6_mux;
- reg [ 35: 0] fifo_7;
- wire fifo_7_enable;
- wire [ 35: 0] fifo_7_mux;
- reg [ 35: 0] fifo_8;
- wire fifo_8_enable;
- wire [ 35: 0] fifo_8_mux;
- reg [ 35: 0] fifo_9;
- wire fifo_9_enable;
- wire [ 35: 0] fifo_9_mux;
- reg [ 4: 0] fifo_cnt /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire [ 4: 0] fifo_cnt_inc;
- wire [ 35: 0] fifo_head;
- reg [ 3: 0] fifo_rdptr /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire [ 35: 0] fifo_read_mux;
- reg [ 3: 0] fifo_wrptr /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire [ 3: 0] fifo_wrptr_inc;
- wire [ 3: 0] fifo_wrptr_plus1;
- wire [ 3: 0] fifo_wrptr_plus2;
- wire ge2_free;
- wire ge3_free;
- wire input_ge1;
- wire input_ge2;
- wire input_ge3;
- wire [ 1: 0] input_tm_cnt;
- wire itm_valid;
- reg overflow_pending /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=R101" */;
- wire [ 35: 0] overflow_pending_atm;
- wire [ 35: 0] overflow_pending_dtm;
- wire trc_this;
- wire [ 35: 0] tw;
- assign trc_this = trc_on | (dbrk_traceon & ~dbrk_traceoff) | dbrk_traceme;
- assign itm_valid = |itm[35 : 32];
- assign atm_valid = |atm[35 : 32] & trc_this;
- assign dtm_valid = |dtm[35 : 32] & trc_this;
- assign ge2_free = ~fifo_cnt[4];
- assign ge3_free = ge2_free & ~&fifo_cnt[3 : 0];
- assign empty = ~|fifo_cnt;
- assign fifo_wrptr_plus1 = fifo_wrptr + 1;
- assign fifo_wrptr_plus2 = fifo_wrptr + 2;
- nios2_uc_nios2_cpu_nios2_oci_compute_input_tm_cnt the_nios2_uc_nios2_cpu_nios2_oci_compute_input_tm_cnt
- (
- .atm_valid (atm_valid),
- .compute_input_tm_cnt (compute_input_tm_cnt),
- .dtm_valid (dtm_valid),
- .itm_valid (itm_valid)
- );
- assign input_tm_cnt = compute_input_tm_cnt;
- nios2_uc_nios2_cpu_nios2_oci_fifo_wrptr_inc the_nios2_uc_nios2_cpu_nios2_oci_fifo_wrptr_inc
- (
- .fifo_wrptr_inc (fifo_wrptr_inc),
- .ge2_free (ge2_free),
- .ge3_free (ge3_free),
- .input_tm_cnt (input_tm_cnt)
- );
- nios2_uc_nios2_cpu_nios2_oci_fifo_cnt_inc the_nios2_uc_nios2_cpu_nios2_oci_fifo_cnt_inc
- (
- .empty (empty),
- .fifo_cnt_inc (fifo_cnt_inc),
- .ge2_free (ge2_free),
- .ge3_free (ge3_free),
- .input_tm_cnt (input_tm_cnt)
- );
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- fifo_rdptr <= 0;
- fifo_wrptr <= 0;
- fifo_cnt <= 0;
- overflow_pending <= 1;
- end
- else
- begin
- fifo_wrptr <= fifo_wrptr + fifo_wrptr_inc;
- fifo_cnt <= fifo_cnt + fifo_cnt_inc;
- if (~empty)
- fifo_rdptr <= fifo_rdptr + 1;
- if (~trc_this || (~ge2_free & input_ge2) || (~ge3_free & input_ge3))
- overflow_pending <= 1;
- else if (atm_valid | dtm_valid)
- overflow_pending <= 0;
- end
- end
- assign fifo_head = fifo_read_mux;
- assign tw = itm;
- assign fifo_0_enable = ((fifo_wrptr == 4'd0) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd0) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd0) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_0 <= 0;
- else if (fifo_0_enable)
- fifo_0 <= fifo_0_mux;
- end
- assign fifo_0_mux = (((fifo_wrptr == 4'd0) && itm_valid))? itm :
- (((fifo_wrptr == 4'd0) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd0) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd0) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd0) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd0) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_1_enable = ((fifo_wrptr == 4'd1) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd1) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd1) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_1 <= 0;
- else if (fifo_1_enable)
- fifo_1 <= fifo_1_mux;
- end
- assign fifo_1_mux = (((fifo_wrptr == 4'd1) && itm_valid))? itm :
- (((fifo_wrptr == 4'd1) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd1) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd1) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd1) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd1) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_2_enable = ((fifo_wrptr == 4'd2) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd2) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd2) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_2 <= 0;
- else if (fifo_2_enable)
- fifo_2 <= fifo_2_mux;
- end
- assign fifo_2_mux = (((fifo_wrptr == 4'd2) && itm_valid))? itm :
- (((fifo_wrptr == 4'd2) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd2) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd2) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd2) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd2) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_3_enable = ((fifo_wrptr == 4'd3) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd3) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd3) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_3 <= 0;
- else if (fifo_3_enable)
- fifo_3 <= fifo_3_mux;
- end
- assign fifo_3_mux = (((fifo_wrptr == 4'd3) && itm_valid))? itm :
- (((fifo_wrptr == 4'd3) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd3) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd3) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd3) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd3) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_4_enable = ((fifo_wrptr == 4'd4) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd4) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd4) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_4 <= 0;
- else if (fifo_4_enable)
- fifo_4 <= fifo_4_mux;
- end
- assign fifo_4_mux = (((fifo_wrptr == 4'd4) && itm_valid))? itm :
- (((fifo_wrptr == 4'd4) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd4) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd4) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd4) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd4) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_5_enable = ((fifo_wrptr == 4'd5) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd5) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd5) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_5 <= 0;
- else if (fifo_5_enable)
- fifo_5 <= fifo_5_mux;
- end
- assign fifo_5_mux = (((fifo_wrptr == 4'd5) && itm_valid))? itm :
- (((fifo_wrptr == 4'd5) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd5) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd5) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd5) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd5) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_6_enable = ((fifo_wrptr == 4'd6) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd6) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd6) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_6 <= 0;
- else if (fifo_6_enable)
- fifo_6 <= fifo_6_mux;
- end
- assign fifo_6_mux = (((fifo_wrptr == 4'd6) && itm_valid))? itm :
- (((fifo_wrptr == 4'd6) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd6) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd6) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd6) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd6) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_7_enable = ((fifo_wrptr == 4'd7) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd7) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd7) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_7 <= 0;
- else if (fifo_7_enable)
- fifo_7 <= fifo_7_mux;
- end
- assign fifo_7_mux = (((fifo_wrptr == 4'd7) && itm_valid))? itm :
- (((fifo_wrptr == 4'd7) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd7) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd7) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd7) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd7) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_8_enable = ((fifo_wrptr == 4'd8) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd8) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd8) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_8 <= 0;
- else if (fifo_8_enable)
- fifo_8 <= fifo_8_mux;
- end
- assign fifo_8_mux = (((fifo_wrptr == 4'd8) && itm_valid))? itm :
- (((fifo_wrptr == 4'd8) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd8) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd8) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd8) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd8) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_9_enable = ((fifo_wrptr == 4'd9) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd9) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd9) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_9 <= 0;
- else if (fifo_9_enable)
- fifo_9 <= fifo_9_mux;
- end
- assign fifo_9_mux = (((fifo_wrptr == 4'd9) && itm_valid))? itm :
- (((fifo_wrptr == 4'd9) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd9) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd9) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd9) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd9) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_10_enable = ((fifo_wrptr == 4'd10) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd10) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd10) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_10 <= 0;
- else if (fifo_10_enable)
- fifo_10 <= fifo_10_mux;
- end
- assign fifo_10_mux = (((fifo_wrptr == 4'd10) && itm_valid))? itm :
- (((fifo_wrptr == 4'd10) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd10) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd10) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd10) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd10) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_11_enable = ((fifo_wrptr == 4'd11) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd11) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd11) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_11 <= 0;
- else if (fifo_11_enable)
- fifo_11 <= fifo_11_mux;
- end
- assign fifo_11_mux = (((fifo_wrptr == 4'd11) && itm_valid))? itm :
- (((fifo_wrptr == 4'd11) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd11) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd11) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd11) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd11) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_12_enable = ((fifo_wrptr == 4'd12) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd12) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd12) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_12 <= 0;
- else if (fifo_12_enable)
- fifo_12 <= fifo_12_mux;
- end
- assign fifo_12_mux = (((fifo_wrptr == 4'd12) && itm_valid))? itm :
- (((fifo_wrptr == 4'd12) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd12) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd12) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd12) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd12) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_13_enable = ((fifo_wrptr == 4'd13) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd13) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd13) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_13 <= 0;
- else if (fifo_13_enable)
- fifo_13 <= fifo_13_mux;
- end
- assign fifo_13_mux = (((fifo_wrptr == 4'd13) && itm_valid))? itm :
- (((fifo_wrptr == 4'd13) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd13) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd13) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd13) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd13) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_14_enable = ((fifo_wrptr == 4'd14) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd14) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd14) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_14 <= 0;
- else if (fifo_14_enable)
- fifo_14 <= fifo_14_mux;
- end
- assign fifo_14_mux = (((fifo_wrptr == 4'd14) && itm_valid))? itm :
- (((fifo_wrptr == 4'd14) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd14) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd14) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd14) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd14) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign fifo_15_enable = ((fifo_wrptr == 4'd15) && input_ge1) || (ge2_free && (fifo_wrptr_plus1== 4'd15) && input_ge2) ||(ge3_free && (fifo_wrptr_plus2== 4'd15) && input_ge3);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- fifo_15 <= 0;
- else if (fifo_15_enable)
- fifo_15 <= fifo_15_mux;
- end
- assign fifo_15_mux = (((fifo_wrptr == 4'd15) && itm_valid))? itm :
- (((fifo_wrptr == 4'd15) && atm_valid))? overflow_pending_atm :
- (((fifo_wrptr == 4'd15) && dtm_valid))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd15) && (ge2_free & itm_valid & atm_valid)))? overflow_pending_atm :
- (((fifo_wrptr_plus1 == 4'd15) && (ge2_free & itm_valid & dtm_valid)))? overflow_pending_dtm :
- (((fifo_wrptr_plus1 == 4'd15) && (ge2_free & atm_valid & dtm_valid)))? overflow_pending_dtm :
- overflow_pending_dtm;
- assign input_ge1 = |input_tm_cnt;
- assign input_ge2 = input_tm_cnt[1];
- assign input_ge3 = &input_tm_cnt;
- assign overflow_pending_atm = {overflow_pending, atm[34 : 0]};
- assign overflow_pending_dtm = {overflow_pending, dtm[34 : 0]};
- assign fifo_read_mux = (fifo_rdptr == 4'd0)? fifo_0 :
- (fifo_rdptr == 4'd1)? fifo_1 :
- (fifo_rdptr == 4'd2)? fifo_2 :
- (fifo_rdptr == 4'd3)? fifo_3 :
- (fifo_rdptr == 4'd4)? fifo_4 :
- (fifo_rdptr == 4'd5)? fifo_5 :
- (fifo_rdptr == 4'd6)? fifo_6 :
- (fifo_rdptr == 4'd7)? fifo_7 :
- (fifo_rdptr == 4'd8)? fifo_8 :
- (fifo_rdptr == 4'd9)? fifo_9 :
- (fifo_rdptr == 4'd10)? fifo_10 :
- (fifo_rdptr == 4'd11)? fifo_11 :
- (fifo_rdptr == 4'd12)? fifo_12 :
- (fifo_rdptr == 4'd13)? fifo_13 :
- (fifo_rdptr == 4'd14)? fifo_14 :
- fifo_15;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_pib (
- // outputs:
- tr_data
- )
- ;
- output [ 35: 0] tr_data;
- wire [ 35: 0] tr_data;
- assign tr_data = 0;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci_im (
- // inputs:
- clk,
- jrst_n,
- trc_ctrl,
- tw,
- // outputs:
- tracemem_on,
- tracemem_trcdata,
- tracemem_tw,
- trc_im_addr,
- trc_wrap,
- xbrk_wrap_traceoff
- )
- ;
- output tracemem_on;
- output [ 35: 0] tracemem_trcdata;
- output tracemem_tw;
- output [ 6: 0] trc_im_addr;
- output trc_wrap;
- output xbrk_wrap_traceoff;
- input clk;
- input jrst_n;
- input [ 15: 0] trc_ctrl;
- input [ 35: 0] tw;
- wire tracemem_on;
- wire [ 35: 0] tracemem_trcdata;
- wire tracemem_tw;
- reg [ 6: 0] trc_im_addr /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire [ 35: 0] trc_im_data;
- wire trc_on_chip;
- reg trc_wrap /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire tw_valid;
- wire xbrk_wrap_traceoff;
- assign trc_im_data = tw;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- trc_im_addr <= 0;
- trc_wrap <= 0;
- end
- else
- begin
- trc_im_addr <= 0;
- trc_wrap <= 0;
- end
- end
- assign trc_on_chip = ~trc_ctrl[8];
- assign tw_valid = |trc_im_data[35 : 32];
- assign xbrk_wrap_traceoff = trc_ctrl[10] & trc_wrap;
- assign tracemem_trcdata = 0;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_performance_monitors
- ;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_avalon_reg (
- // inputs:
- address,
- clk,
- debugaccess,
- monitor_error,
- monitor_go,
- monitor_ready,
- reset_n,
- write,
- writedata,
- // outputs:
- oci_ienable,
- oci_reg_readdata,
- oci_single_step_mode,
- ocireg_ers,
- ocireg_mrs,
- take_action_ocireg
- )
- ;
- output [ 31: 0] oci_ienable;
- output [ 31: 0] oci_reg_readdata;
- output oci_single_step_mode;
- output ocireg_ers;
- output ocireg_mrs;
- output take_action_ocireg;
- input [ 8: 0] address;
- input clk;
- input debugaccess;
- input monitor_error;
- input monitor_go;
- input monitor_ready;
- input reset_n;
- input write;
- input [ 31: 0] writedata;
- reg [ 31: 0] oci_ienable;
- wire oci_reg_00_addressed;
- wire oci_reg_01_addressed;
- wire [ 31: 0] oci_reg_readdata;
- reg oci_single_step_mode;
- wire ocireg_ers;
- wire ocireg_mrs;
- wire ocireg_sstep;
- wire take_action_oci_intr_mask_reg;
- wire take_action_ocireg;
- wire write_strobe;
- assign oci_reg_00_addressed = address == 9'h100;
- assign oci_reg_01_addressed = address == 9'h101;
- assign write_strobe = write & debugaccess;
- assign take_action_ocireg = write_strobe & oci_reg_00_addressed;
- assign take_action_oci_intr_mask_reg = write_strobe & oci_reg_01_addressed;
- assign ocireg_ers = writedata[1];
- assign ocireg_mrs = writedata[0];
- assign ocireg_sstep = writedata[3];
- assign oci_reg_readdata = oci_reg_00_addressed ? {28'b0, oci_single_step_mode, monitor_go,
- monitor_ready, monitor_error} :
- oci_reg_01_addressed ? oci_ienable :
- 32'b0;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- oci_single_step_mode <= 1'b0;
- else if (take_action_ocireg)
- oci_single_step_mode <= ocireg_sstep;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- oci_ienable <= 32'b00000000000000000000000000000001;
- else if (take_action_oci_intr_mask_reg)
- oci_ienable <= writedata | ~(32'b00000000000000000000000000000001);
- end
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_ociram_sp_ram_module (
- // inputs:
- address,
- byteenable,
- clock,
- data,
- reset_req,
- wren,
- // outputs:
- q
- )
- ;
- parameter lpm_file = "UNUSED";
- output [ 31: 0] q;
- input [ 7: 0] address;
- input [ 3: 0] byteenable;
- input clock;
- input [ 31: 0] data;
- input reset_req;
- input wren;
- wire clocken;
- wire [ 31: 0] q;
- wire [ 31: 0] ram_q;
- assign q = ram_q;
- assign clocken = ~reset_req;
- altsyncram the_altsyncram
- (
- .address_a (address),
- .byteena_a (byteenable),
- .clock0 (clock),
- .clocken0 (clocken),
- .data_a (data),
- .q_a (ram_q),
- .wren_a (wren)
- );
- defparam the_altsyncram.init_file = lpm_file,
- the_altsyncram.maximum_depth = 0,
- the_altsyncram.numwords_a = 256,
- the_altsyncram.operation_mode = "SINGLE_PORT",
- the_altsyncram.outdata_reg_a = "UNREGISTERED",
- the_altsyncram.ram_block_type = "AUTO",
- the_altsyncram.read_during_write_mode_port_a = "DONT_CARE",
- the_altsyncram.width_a = 32,
- the_altsyncram.width_byteena_a = 4,
- the_altsyncram.widthad_a = 8;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_ocimem (
- // inputs:
- address,
- byteenable,
- clk,
- debugaccess,
- jdo,
- jrst_n,
- read,
- reset_req,
- take_action_ocimem_a,
- take_action_ocimem_b,
- take_no_action_ocimem_a,
- write,
- writedata,
- // outputs:
- MonDReg,
- ociram_readdata,
- waitrequest
- )
- ;
- output [ 31: 0] MonDReg;
- output [ 31: 0] ociram_readdata;
- output waitrequest;
- input [ 8: 0] address;
- input [ 3: 0] byteenable;
- input clk;
- input debugaccess;
- input [ 37: 0] jdo;
- input jrst_n;
- input read;
- input reset_req;
- input take_action_ocimem_a;
- input take_action_ocimem_b;
- input take_no_action_ocimem_a;
- input write;
- input [ 31: 0] writedata;
- reg [ 10: 0] MonAReg /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire [ 8: 0] MonARegAddrInc;
- wire MonARegAddrIncAccessingRAM;
- reg [ 31: 0] MonDReg /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg avalon_ociram_readdata_ready /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire avalon_ram_wr;
- wire [ 31: 0] cfgrom_readdata;
- reg jtag_ram_access /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg jtag_ram_rd /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg jtag_ram_rd_d1 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg jtag_ram_wr /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg jtag_rd /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- reg jtag_rd_d1 /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- wire [ 7: 0] ociram_addr;
- wire [ 3: 0] ociram_byteenable;
- wire [ 31: 0] ociram_readdata;
- wire ociram_reset_req;
- wire [ 31: 0] ociram_wr_data;
- wire ociram_wr_en;
- reg waitrequest /* synthesis ALTERA_ATTRIBUTE = "SUPPRESS_DA_RULE_INTERNAL=\"D101,D103,R101\"" */;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- begin
- jtag_rd <= 1'b0;
- jtag_rd_d1 <= 1'b0;
- jtag_ram_wr <= 1'b0;
- jtag_ram_rd <= 1'b0;
- jtag_ram_rd_d1 <= 1'b0;
- jtag_ram_access <= 1'b0;
- MonAReg <= 0;
- MonDReg <= 0;
- waitrequest <= 1'b1;
- avalon_ociram_readdata_ready <= 1'b0;
- end
- else
- begin
- if (take_no_action_ocimem_a)
- begin
- MonAReg[10 : 2] <= MonARegAddrInc;
- jtag_rd <= 1'b1;
- jtag_ram_rd <= MonARegAddrIncAccessingRAM;
- jtag_ram_access <= MonARegAddrIncAccessingRAM;
- end
- else if (take_action_ocimem_a)
- begin
- MonAReg[10 : 2] <= { jdo[17],
- jdo[33 : 26] };
- jtag_rd <= 1'b1;
- jtag_ram_rd <= ~jdo[17];
- jtag_ram_access <= ~jdo[17];
- end
- else if (take_action_ocimem_b)
- begin
- MonAReg[10 : 2] <= MonARegAddrInc;
- MonDReg <= jdo[34 : 3];
- jtag_ram_wr <= MonARegAddrIncAccessingRAM;
- jtag_ram_access <= MonARegAddrIncAccessingRAM;
- end
- else
- begin
- jtag_rd <= 0;
- jtag_ram_wr <= 0;
- jtag_ram_rd <= 0;
- jtag_ram_access <= 0;
- if (jtag_rd_d1)
- MonDReg <= jtag_ram_rd_d1 ? ociram_readdata : cfgrom_readdata;
- end
- jtag_rd_d1 <= jtag_rd;
- jtag_ram_rd_d1 <= jtag_ram_rd;
- if (~waitrequest)
- begin
- waitrequest <= 1'b1;
- avalon_ociram_readdata_ready <= 1'b0;
- end
- else if (write)
- waitrequest <= ~address[8] & jtag_ram_access;
- else if (read)
- begin
- avalon_ociram_readdata_ready <= ~(~address[8] & jtag_ram_access);
- waitrequest <= ~avalon_ociram_readdata_ready;
- end
- else
- begin
- waitrequest <= 1'b1;
- avalon_ociram_readdata_ready <= 1'b0;
- end
- end
- end
- assign MonARegAddrInc = MonAReg[10 : 2]+1;
- assign MonARegAddrIncAccessingRAM = ~MonARegAddrInc[8];
- assign avalon_ram_wr = write & ~address[8] & debugaccess;
- assign ociram_addr = jtag_ram_access ? MonAReg[9 : 2] : address[7 : 0];
- assign ociram_wr_data = jtag_ram_access ? MonDReg[31 : 0] : writedata;
- assign ociram_byteenable = jtag_ram_access ? 4'b1111 : byteenable;
- assign ociram_wr_en = jtag_ram_access ? jtag_ram_wr : avalon_ram_wr;
- assign ociram_reset_req = reset_req & ~jtag_ram_access;
- //nios2_uc_nios2_cpu_ociram_sp_ram, which is an nios_sp_ram
- nios2_uc_nios2_cpu_ociram_sp_ram_module nios2_uc_nios2_cpu_ociram_sp_ram
- (
- .address (ociram_addr),
- .byteenable (ociram_byteenable),
- .clock (clk),
- .data (ociram_wr_data),
- .q (ociram_readdata),
- .reset_req (ociram_reset_req),
- .wren (ociram_wr_en)
- );
- //synthesis translate_off
- `ifdef NO_PLI
- defparam nios2_uc_nios2_cpu_ociram_sp_ram.lpm_file = "nios2_uc_nios2_cpu_ociram_default_contents.dat";
- `else
- defparam nios2_uc_nios2_cpu_ociram_sp_ram.lpm_file = "nios2_uc_nios2_cpu_ociram_default_contents.hex";
- `endif
- //synthesis translate_on
- assign cfgrom_readdata = (MonAReg[4 : 2] == 3'd0)? 32'h00040020 :
- (MonAReg[4 : 2] == 3'd1)? 32'h00001414 :
- (MonAReg[4 : 2] == 3'd2)? 32'h00040000 :
- (MonAReg[4 : 2] == 3'd3)? 32'h00000100 :
- (MonAReg[4 : 2] == 3'd4)? 32'h20000000 :
- (MonAReg[4 : 2] == 3'd5)? 32'h00040000 :
- (MonAReg[4 : 2] == 3'd6)? 32'h00000000 :
- 32'h00000000;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu_nios2_oci (
- // inputs:
- D_valid,
- E_st_data,
- E_valid,
- F_pc,
- address_nxt,
- av_ld_data_aligned_filtered,
- byteenable_nxt,
- clk,
- d_address,
- d_read,
- d_waitrequest,
- d_write,
- debugaccess_nxt,
- hbreak_enabled,
- read_nxt,
- reset,
- reset_n,
- reset_req,
- write_nxt,
- writedata_nxt,
- // outputs:
- debug_mem_slave_debugaccess_to_roms,
- oci_hbreak_req,
- oci_ienable,
- oci_single_step_mode,
- readdata,
- resetrequest,
- waitrequest
- )
- ;
- output debug_mem_slave_debugaccess_to_roms;
- output oci_hbreak_req;
- output [ 31: 0] oci_ienable;
- output oci_single_step_mode;
- output [ 31: 0] readdata;
- output resetrequest;
- output waitrequest;
- input D_valid;
- input [ 31: 0] E_st_data;
- input E_valid;
- input [ 17: 0] F_pc;
- input [ 8: 0] address_nxt;
- input [ 31: 0] av_ld_data_aligned_filtered;
- input [ 3: 0] byteenable_nxt;
- input clk;
- input [ 19: 0] d_address;
- input d_read;
- input d_waitrequest;
- input d_write;
- input debugaccess_nxt;
- input hbreak_enabled;
- input read_nxt;
- input reset;
- input reset_n;
- input reset_req;
- input write_nxt;
- input [ 31: 0] writedata_nxt;
- wire [ 31: 0] MonDReg;
- reg [ 8: 0] address;
- wire [ 35: 0] atm;
- wire [ 31: 0] break_readreg;
- reg [ 3: 0] byteenable;
- wire [ 19: 0] cpu_d_address;
- wire cpu_d_read;
- wire [ 31: 0] cpu_d_readdata;
- wire cpu_d_wait;
- wire cpu_d_write;
- wire [ 31: 0] cpu_d_writedata;
- wire dbrk_break;
- wire dbrk_goto0;
- wire dbrk_goto1;
- wire dbrk_hit0_latch;
- wire dbrk_hit1_latch;
- wire dbrk_hit2_latch;
- wire dbrk_hit3_latch;
- wire dbrk_traceme;
- wire dbrk_traceoff;
- wire dbrk_traceon;
- wire dbrk_trigout;
- wire debug_mem_slave_debugaccess_to_roms;
- reg debugaccess;
- wire debugack;
- wire debugreq;
- wire [ 35: 0] dtm;
- wire dummy_sink;
- wire [ 35: 0] itm;
- wire [ 37: 0] jdo;
- wire jrst_n;
- wire monitor_error;
- wire monitor_go;
- wire monitor_ready;
- wire oci_hbreak_req;
- wire [ 31: 0] oci_ienable;
- wire [ 31: 0] oci_reg_readdata;
- wire oci_single_step_mode;
- wire [ 31: 0] ociram_readdata;
- wire ocireg_ers;
- wire ocireg_mrs;
- reg read;
- reg [ 31: 0] readdata;
- wire resetlatch;
- wire resetrequest;
- wire st_ready_test_idle;
- wire take_action_break_a;
- wire take_action_break_b;
- wire take_action_break_c;
- wire take_action_ocimem_a;
- wire take_action_ocimem_b;
- wire take_action_ocireg;
- wire take_action_tracectrl;
- wire take_no_action_break_a;
- wire take_no_action_break_b;
- wire take_no_action_break_c;
- wire take_no_action_ocimem_a;
- wire [ 35: 0] tr_data;
- wire tracemem_on;
- wire [ 35: 0] tracemem_trcdata;
- wire tracemem_tw;
- wire [ 15: 0] trc_ctrl;
- wire [ 6: 0] trc_im_addr;
- wire trc_on;
- wire trc_wrap;
- wire trigbrktype;
- wire trigger_state_0;
- wire trigger_state_1;
- wire trigout;
- wire [ 35: 0] tw;
- wire waitrequest;
- reg write;
- reg [ 31: 0] writedata;
- wire xbrk_break;
- wire [ 7: 0] xbrk_ctrl0;
- wire [ 7: 0] xbrk_ctrl1;
- wire [ 7: 0] xbrk_ctrl2;
- wire [ 7: 0] xbrk_ctrl3;
- wire xbrk_goto0;
- wire xbrk_goto1;
- wire xbrk_traceoff;
- wire xbrk_traceon;
- wire xbrk_trigout;
- wire xbrk_wrap_traceoff;
- nios2_uc_nios2_cpu_nios2_oci_debug the_nios2_uc_nios2_cpu_nios2_oci_debug
- (
- .clk (clk),
- .dbrk_break (dbrk_break),
- .debugack (debugack),
- .debugreq (debugreq),
- .hbreak_enabled (hbreak_enabled),
- .jdo (jdo),
- .jrst_n (jrst_n),
- .monitor_error (monitor_error),
- .monitor_go (monitor_go),
- .monitor_ready (monitor_ready),
- .oci_hbreak_req (oci_hbreak_req),
- .ocireg_ers (ocireg_ers),
- .ocireg_mrs (ocireg_mrs),
- .reset (reset),
- .resetlatch (resetlatch),
- .resetrequest (resetrequest),
- .st_ready_test_idle (st_ready_test_idle),
- .take_action_ocimem_a (take_action_ocimem_a),
- .take_action_ocireg (take_action_ocireg),
- .xbrk_break (xbrk_break)
- );
- nios2_uc_nios2_cpu_nios2_oci_break the_nios2_uc_nios2_cpu_nios2_oci_break
- (
- .break_readreg (break_readreg),
- .clk (clk),
- .dbrk_break (dbrk_break),
- .dbrk_goto0 (dbrk_goto0),
- .dbrk_goto1 (dbrk_goto1),
- .dbrk_hit0_latch (dbrk_hit0_latch),
- .dbrk_hit1_latch (dbrk_hit1_latch),
- .dbrk_hit2_latch (dbrk_hit2_latch),
- .dbrk_hit3_latch (dbrk_hit3_latch),
- .jdo (jdo),
- .jrst_n (jrst_n),
- .take_action_break_a (take_action_break_a),
- .take_action_break_b (take_action_break_b),
- .take_action_break_c (take_action_break_c),
- .take_no_action_break_a (take_no_action_break_a),
- .take_no_action_break_b (take_no_action_break_b),
- .take_no_action_break_c (take_no_action_break_c),
- .trigbrktype (trigbrktype),
- .trigger_state_0 (trigger_state_0),
- .trigger_state_1 (trigger_state_1),
- .xbrk_ctrl0 (xbrk_ctrl0),
- .xbrk_ctrl1 (xbrk_ctrl1),
- .xbrk_ctrl2 (xbrk_ctrl2),
- .xbrk_ctrl3 (xbrk_ctrl3),
- .xbrk_goto0 (xbrk_goto0),
- .xbrk_goto1 (xbrk_goto1)
- );
- nios2_uc_nios2_cpu_nios2_oci_xbrk the_nios2_uc_nios2_cpu_nios2_oci_xbrk
- (
- .D_valid (D_valid),
- .E_valid (E_valid),
- .F_pc (F_pc),
- .clk (clk),
- .reset_n (reset_n),
- .trigger_state_0 (trigger_state_0),
- .trigger_state_1 (trigger_state_1),
- .xbrk_break (xbrk_break),
- .xbrk_ctrl0 (xbrk_ctrl0),
- .xbrk_ctrl1 (xbrk_ctrl1),
- .xbrk_ctrl2 (xbrk_ctrl2),
- .xbrk_ctrl3 (xbrk_ctrl3),
- .xbrk_goto0 (xbrk_goto0),
- .xbrk_goto1 (xbrk_goto1),
- .xbrk_traceoff (xbrk_traceoff),
- .xbrk_traceon (xbrk_traceon),
- .xbrk_trigout (xbrk_trigout)
- );
- nios2_uc_nios2_cpu_nios2_oci_dbrk the_nios2_uc_nios2_cpu_nios2_oci_dbrk
- (
- .E_st_data (E_st_data),
- .av_ld_data_aligned_filtered (av_ld_data_aligned_filtered),
- .clk (clk),
- .cpu_d_address (cpu_d_address),
- .cpu_d_read (cpu_d_read),
- .cpu_d_readdata (cpu_d_readdata),
- .cpu_d_wait (cpu_d_wait),
- .cpu_d_write (cpu_d_write),
- .cpu_d_writedata (cpu_d_writedata),
- .d_address (d_address),
- .d_read (d_read),
- .d_waitrequest (d_waitrequest),
- .d_write (d_write),
- .dbrk_break (dbrk_break),
- .dbrk_goto0 (dbrk_goto0),
- .dbrk_goto1 (dbrk_goto1),
- .dbrk_traceme (dbrk_traceme),
- .dbrk_traceoff (dbrk_traceoff),
- .dbrk_traceon (dbrk_traceon),
- .dbrk_trigout (dbrk_trigout),
- .debugack (debugack),
- .reset_n (reset_n)
- );
- nios2_uc_nios2_cpu_nios2_oci_itrace the_nios2_uc_nios2_cpu_nios2_oci_itrace
- (
- .clk (clk),
- .dbrk_traceoff (dbrk_traceoff),
- .dbrk_traceon (dbrk_traceon),
- .itm (itm),
- .jdo (jdo),
- .jrst_n (jrst_n),
- .take_action_tracectrl (take_action_tracectrl),
- .trc_ctrl (trc_ctrl),
- .trc_on (trc_on),
- .xbrk_traceoff (xbrk_traceoff),
- .xbrk_traceon (xbrk_traceon),
- .xbrk_wrap_traceoff (xbrk_wrap_traceoff)
- );
- nios2_uc_nios2_cpu_nios2_oci_dtrace the_nios2_uc_nios2_cpu_nios2_oci_dtrace
- (
- .atm (atm),
- .clk (clk),
- .cpu_d_address (cpu_d_address),
- .cpu_d_read (cpu_d_read),
- .cpu_d_readdata (cpu_d_readdata),
- .cpu_d_wait (cpu_d_wait),
- .cpu_d_write (cpu_d_write),
- .cpu_d_writedata (cpu_d_writedata),
- .dtm (dtm),
- .jrst_n (jrst_n),
- .trc_ctrl (trc_ctrl)
- );
- nios2_uc_nios2_cpu_nios2_oci_fifo the_nios2_uc_nios2_cpu_nios2_oci_fifo
- (
- .atm (atm),
- .clk (clk),
- .dbrk_traceme (dbrk_traceme),
- .dbrk_traceoff (dbrk_traceoff),
- .dbrk_traceon (dbrk_traceon),
- .dtm (dtm),
- .itm (itm),
- .jrst_n (jrst_n),
- .reset_n (reset_n),
- .trc_on (trc_on),
- .tw (tw)
- );
- nios2_uc_nios2_cpu_nios2_oci_pib the_nios2_uc_nios2_cpu_nios2_oci_pib
- (
- .tr_data (tr_data)
- );
- nios2_uc_nios2_cpu_nios2_oci_im the_nios2_uc_nios2_cpu_nios2_oci_im
- (
- .clk (clk),
- .jrst_n (jrst_n),
- .tracemem_on (tracemem_on),
- .tracemem_trcdata (tracemem_trcdata),
- .tracemem_tw (tracemem_tw),
- .trc_ctrl (trc_ctrl),
- .trc_im_addr (trc_im_addr),
- .trc_wrap (trc_wrap),
- .tw (tw),
- .xbrk_wrap_traceoff (xbrk_wrap_traceoff)
- );
- nios2_uc_nios2_cpu_nios2_avalon_reg the_nios2_uc_nios2_cpu_nios2_avalon_reg
- (
- .address (address),
- .clk (clk),
- .debugaccess (debugaccess),
- .monitor_error (monitor_error),
- .monitor_go (monitor_go),
- .monitor_ready (monitor_ready),
- .oci_ienable (oci_ienable),
- .oci_reg_readdata (oci_reg_readdata),
- .oci_single_step_mode (oci_single_step_mode),
- .ocireg_ers (ocireg_ers),
- .ocireg_mrs (ocireg_mrs),
- .reset_n (reset_n),
- .take_action_ocireg (take_action_ocireg),
- .write (write),
- .writedata (writedata)
- );
- nios2_uc_nios2_cpu_nios2_ocimem the_nios2_uc_nios2_cpu_nios2_ocimem
- (
- .MonDReg (MonDReg),
- .address (address),
- .byteenable (byteenable),
- .clk (clk),
- .debugaccess (debugaccess),
- .jdo (jdo),
- .jrst_n (jrst_n),
- .ociram_readdata (ociram_readdata),
- .read (read),
- .reset_req (reset_req),
- .take_action_ocimem_a (take_action_ocimem_a),
- .take_action_ocimem_b (take_action_ocimem_b),
- .take_no_action_ocimem_a (take_no_action_ocimem_a),
- .waitrequest (waitrequest),
- .write (write),
- .writedata (writedata)
- );
- assign trigout = dbrk_trigout | xbrk_trigout;
- assign debug_mem_slave_debugaccess_to_roms = debugack;
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- address <= 0;
- else
- address <= address_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- byteenable <= 0;
- else
- byteenable <= byteenable_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- writedata <= 0;
- else
- writedata <= writedata_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- debugaccess <= 0;
- else
- debugaccess <= debugaccess_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- read <= 0;
- else
- read <= read ? waitrequest : read_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- write <= 0;
- else
- write <= write ? waitrequest : write_nxt;
- end
- always @(posedge clk or negedge jrst_n)
- begin
- if (jrst_n == 0)
- readdata <= 0;
- else
- readdata <= address[8] ? oci_reg_readdata : ociram_readdata;
- end
- nios2_uc_nios2_cpu_debug_slave_wrapper the_nios2_uc_nios2_cpu_debug_slave_wrapper
- (
- .MonDReg (MonDReg),
- .break_readreg (break_readreg),
- .clk (clk),
- .dbrk_hit0_latch (dbrk_hit0_latch),
- .dbrk_hit1_latch (dbrk_hit1_latch),
- .dbrk_hit2_latch (dbrk_hit2_latch),
- .dbrk_hit3_latch (dbrk_hit3_latch),
- .debugack (debugack),
- .jdo (jdo),
- .jrst_n (jrst_n),
- .monitor_error (monitor_error),
- .monitor_ready (monitor_ready),
- .reset_n (reset_n),
- .resetlatch (resetlatch),
- .st_ready_test_idle (st_ready_test_idle),
- .take_action_break_a (take_action_break_a),
- .take_action_break_b (take_action_break_b),
- .take_action_break_c (take_action_break_c),
- .take_action_ocimem_a (take_action_ocimem_a),
- .take_action_ocimem_b (take_action_ocimem_b),
- .take_action_tracectrl (take_action_tracectrl),
- .take_no_action_break_a (take_no_action_break_a),
- .take_no_action_break_b (take_no_action_break_b),
- .take_no_action_break_c (take_no_action_break_c),
- .take_no_action_ocimem_a (take_no_action_ocimem_a),
- .tracemem_on (tracemem_on),
- .tracemem_trcdata (tracemem_trcdata),
- .tracemem_tw (tracemem_tw),
- .trc_im_addr (trc_im_addr),
- .trc_on (trc_on),
- .trc_wrap (trc_wrap),
- .trigbrktype (trigbrktype),
- .trigger_state_1 (trigger_state_1)
- );
- //dummy sink, which is an e_mux
- assign dummy_sink = tr_data |
- trigout |
- debugack;
- assign debugreq = 0;
- endmodule
- // synthesis translate_off
- `timescale 1ns / 1ps
- // synthesis translate_on
- // turn off superfluous verilog processor warnings
- // altera message_level Level1
- // altera message_off 10034 10035 10036 10037 10230 10240 10030
- module nios2_uc_nios2_cpu (
- // inputs:
- E_ci_multi_done,
- E_ci_result,
- clk,
- d_readdata,
- d_waitrequest,
- debug_mem_slave_address,
- debug_mem_slave_byteenable,
- debug_mem_slave_debugaccess,
- debug_mem_slave_read,
- debug_mem_slave_write,
- debug_mem_slave_writedata,
- i_readdata,
- i_waitrequest,
- irq,
- reset_n,
- reset_req,
- // outputs:
- D_ci_a,
- D_ci_b,
- D_ci_c,
- D_ci_n,
- D_ci_readra,
- D_ci_readrb,
- D_ci_writerc,
- E_ci_dataa,
- E_ci_datab,
- E_ci_multi_clk_en,
- E_ci_multi_clock,
- E_ci_multi_reset,
- E_ci_multi_reset_req,
- E_ci_multi_start,
- W_ci_estatus,
- W_ci_ipending,
- W_ci_status,
- d_address,
- d_byteenable,
- d_read,
- d_write,
- d_writedata,
- debug_mem_slave_debugaccess_to_roms,
- debug_mem_slave_readdata,
- debug_mem_slave_waitrequest,
- debug_reset_request,
- i_address,
- i_read
- )
- ;
- output [ 4: 0] D_ci_a;
- output [ 4: 0] D_ci_b;
- output [ 4: 0] D_ci_c;
- output [ 7: 0] D_ci_n;
- output D_ci_readra;
- output D_ci_readrb;
- output D_ci_writerc;
- output [ 31: 0] E_ci_dataa;
- output [ 31: 0] E_ci_datab;
- output E_ci_multi_clk_en;
- output E_ci_multi_clock;
- output E_ci_multi_reset;
- output E_ci_multi_reset_req;
- output E_ci_multi_start;
- output W_ci_estatus;
- output [ 31: 0] W_ci_ipending;
- output W_ci_status;
- output [ 19: 0] d_address;
- output [ 3: 0] d_byteenable;
- output d_read;
- output d_write;
- output [ 31: 0] d_writedata;
- output debug_mem_slave_debugaccess_to_roms;
- output [ 31: 0] debug_mem_slave_readdata;
- output debug_mem_slave_waitrequest;
- output debug_reset_request;
- output [ 19: 0] i_address;
- output i_read;
- input E_ci_multi_done;
- input [ 31: 0] E_ci_result;
- input clk;
- input [ 31: 0] d_readdata;
- input d_waitrequest;
- input [ 8: 0] debug_mem_slave_address;
- input [ 3: 0] debug_mem_slave_byteenable;
- input debug_mem_slave_debugaccess;
- input debug_mem_slave_read;
- input debug_mem_slave_write;
- input [ 31: 0] debug_mem_slave_writedata;
- input [ 31: 0] i_readdata;
- input i_waitrequest;
- input [ 31: 0] irq;
- input reset_n;
- input reset_req;
- reg A_valid_from_M /* synthesis ALTERA_IP_DEBUG_VISIBLE = 1 */;
- wire [ 4: 0] D_ci_a;
- wire [ 4: 0] D_ci_b;
- wire [ 4: 0] D_ci_c;
- wire [ 7: 0] D_ci_n;
- wire D_ci_readra;
- wire D_ci_readrb;
- wire D_ci_writerc;
- wire [ 1: 0] D_compare_op;
- wire D_ctrl_alu_force_and;
- wire D_ctrl_alu_force_xor;
- wire D_ctrl_alu_signed_comparison;
- wire D_ctrl_alu_subtract;
- wire D_ctrl_b_is_dst;
- wire D_ctrl_br;
- wire D_ctrl_br_cmp;
- wire D_ctrl_br_uncond;
- wire D_ctrl_break;
- wire D_ctrl_crst;
- wire D_ctrl_custom;
- wire D_ctrl_custom_multi;
- wire D_ctrl_exception;
- wire D_ctrl_force_src2_zero;
- wire D_ctrl_hi_imm16;
- wire D_ctrl_ignore_dst;
- wire D_ctrl_implicit_dst_eretaddr;
- wire D_ctrl_implicit_dst_retaddr;
- wire D_ctrl_intr_inst;
- wire D_ctrl_jmp_direct;
- wire D_ctrl_jmp_indirect;
- wire D_ctrl_ld;
- wire D_ctrl_ld_ex;
- wire D_ctrl_ld_io;
- wire D_ctrl_ld_non_io;
- wire D_ctrl_ld_signed;
- wire D_ctrl_ld_st_ex;
- wire D_ctrl_logic;
- wire D_ctrl_mem16;
- wire D_ctrl_mem32;
- wire D_ctrl_mem8;
- wire D_ctrl_rd_ctl_reg;
- wire D_ctrl_retaddr;
- wire D_ctrl_rot_right;
- wire D_ctrl_set_src2_rem_imm;
- wire D_ctrl_shift_logical;
- wire D_ctrl_shift_right_arith;
- wire D_ctrl_shift_rot;
- wire D_ctrl_shift_rot_right;
- wire D_ctrl_signed_imm12;
- wire D_ctrl_src2_choose_imm;
- wire D_ctrl_src_imm5_shift_rot;
- wire D_ctrl_st;
- wire D_ctrl_st_ex;
- wire D_ctrl_uncond_cti_non_br;
- wire D_ctrl_unsigned_lo_imm16;
- wire D_ctrl_wrctl_inst;
- wire [ 4: 0] D_dst_regnum;
- wire [271: 0] D_inst;
- wire D_is_opx_inst;
- reg [ 31: 0] D_iw /* synthesis ALTERA_IP_DEBUG_VISIBLE = 1 */;
- wire [ 4: 0] D_iw_a;
- wire [ 4: 0] D_iw_b;
- wire [ 4: 0] D_iw_c;
- wire [ 4: 0] D_iw_control_regnum;
- wire [ 7: 0] D_iw_custom_n;
- wire D_iw_custom_readra;
- wire D_iw_custom_readrb;
- wire D_iw_custom_writerc;
- wire [ 15: 0] D_iw_imm16;
- wire [ 25: 0] D_iw_imm26;
- wire [ 4: 0] D_iw_imm5;
- wire [ 1: 0] D_iw_memsz;
- wire [ 5: 0] D_iw_op;
- wire [ 5: 0] D_iw_opx;
- wire [ 17: 0] D_jmp_direct_target_waddr;
- wire [ 1: 0] D_logic_op;
- wire [ 1: 0] D_logic_op_raw;
- wire D_mem16;
- wire D_mem32;
- wire D_mem8;
- wire D_op_add;
- wire D_op_addi;
- wire D_op_and;
- wire D_op_andhi;
- wire D_op_andi;
- wire D_op_beq;
- wire D_op_bge;
- wire D_op_bgeu;
- wire D_op_blt;
- wire D_op_bltu;
- wire D_op_bne;
- wire D_op_br;
- wire D_op_break;
- wire D_op_bret;
- wire D_op_call;
- wire D_op_callr;
- wire D_op_cmpeq;
- wire D_op_cmpeqi;
- wire D_op_cmpge;
- wire D_op_cmpgei;
- wire D_op_cmpgeu;
- wire D_op_cmpgeui;
- wire D_op_cmplt;
- wire D_op_cmplti;
- wire D_op_cmpltu;
- wire D_op_cmpltui;
- wire D_op_cmpne;
- wire D_op_cmpnei;
- wire D_op_crst;
- wire D_op_custom;
- wire D_op_div;
- wire D_op_divu;
- wire D_op_eret;
- wire D_op_flushd;
- wire D_op_flushda;
- wire D_op_flushi;
- wire D_op_flushp;
- wire D_op_hbreak;
- wire D_op_initd;
- wire D_op_initda;
- wire D_op_initi;
- wire D_op_intr;
- wire D_op_jmp;
- wire D_op_jmpi;
- wire D_op_ldb;
- wire D_op_ldbio;
- wire D_op_ldbu;
- wire D_op_ldbuio;
- wire D_op_ldh;
- wire D_op_ldhio;
- wire D_op_ldhu;
- wire D_op_ldhuio;
- wire D_op_ldl;
- wire D_op_ldw;
- wire D_op_ldwio;
- wire D_op_mul;
- wire D_op_muli;
- wire D_op_mulxss;
- wire D_op_mulxsu;
- wire D_op_mulxuu;
- wire D_op_nextpc;
- wire D_op_nios_custom_instr_floating_point_0;
- wire D_op_nor;
- wire D_op_op_rsv02;
- wire D_op_op_rsv09;
- wire D_op_op_rsv10;
- wire D_op_op_rsv17;
- wire D_op_op_rsv18;
- wire D_op_op_rsv25;
- wire D_op_op_rsv26;
- wire D_op_op_rsv33;
- wire D_op_op_rsv34;
- wire D_op_op_rsv41;
- wire D_op_op_rsv42;
- wire D_op_op_rsv49;
- wire D_op_op_rsv57;
- wire D_op_op_rsv61;
- wire D_op_op_rsv62;
- wire D_op_op_rsv63;
- wire D_op_opx_rsv00;
- wire D_op_opx_rsv10;
- wire D_op_opx_rsv15;
- wire D_op_opx_rsv17;
- wire D_op_opx_rsv21;
- wire D_op_opx_rsv25;
- wire D_op_opx_rsv33;
- wire D_op_opx_rsv34;
- wire D_op_opx_rsv35;
- wire D_op_opx_rsv42;
- wire D_op_opx_rsv43;
- wire D_op_opx_rsv44;
- wire D_op_opx_rsv47;
- wire D_op_opx_rsv50;
- wire D_op_opx_rsv51;
- wire D_op_opx_rsv55;
- wire D_op_opx_rsv56;
- wire D_op_opx_rsv60;
- wire D_op_opx_rsv63;
- wire D_op_or;
- wire D_op_orhi;
- wire D_op_ori;
- wire D_op_rdctl;
- wire D_op_rdprs;
- wire D_op_ret;
- wire D_op_rol;
- wire D_op_roli;
- wire D_op_ror;
- wire D_op_sll;
- wire D_op_slli;
- wire D_op_sra;
- wire D_op_srai;
- wire D_op_srl;
- wire D_op_srli;
- wire D_op_stb;
- wire D_op_stbio;
- wire D_op_stc;
- wire D_op_sth;
- wire D_op_sthio;
- wire D_op_stw;
- wire D_op_stwio;
- wire D_op_sub;
- wire D_op_sync;
- wire D_op_trap;
- wire D_op_wrctl;
- wire D_op_wrprs;
- wire D_op_xor;
- wire D_op_xorhi;
- wire D_op_xori;
- reg D_valid;
- wire [271: 0] D_vinst;
- wire D_wr_dst_reg;
- wire [ 31: 0] E_alu_result;
- reg E_alu_sub;
- wire [ 32: 0] E_arith_result;
- wire [ 31: 0] E_arith_src1;
- wire [ 31: 0] E_arith_src2;
- wire [ 31: 0] E_ci_dataa;
- wire [ 31: 0] E_ci_datab;
- reg E_ci_multi_clk_en;
- wire E_ci_multi_clock;
- wire E_ci_multi_reset;
- wire E_ci_multi_reset_req;
- wire E_ci_multi_stall;
- reg E_ci_multi_start;
- wire E_cmp_result;
- wire [ 31: 0] E_control_rd_data;
- wire E_eq;
- reg E_invert_arith_src_msb;
- wire E_ld_stall;
- wire [ 31: 0] E_logic_result;
- wire E_logic_result_is_0;
- wire E_lt;
- wire [ 19: 0] E_mem_baddr;
- wire [ 3: 0] E_mem_byte_en;
- reg E_new_inst;
- wire E_rf_ecc_recoverable_valid;
- wire E_rf_ecc_unrecoverable_valid;
- wire E_rf_ecc_valid_any;
- reg [ 4: 0] E_shift_rot_cnt;
- wire [ 4: 0] E_shift_rot_cnt_nxt;
- wire E_shift_rot_done;
- wire E_shift_rot_fill_bit;
- reg [ 31: 0] E_shift_rot_result;
- wire [ 31: 0] E_shift_rot_result_nxt;
- wire [ 4: 0] E_shift_rot_shfcnt;
- wire E_shift_rot_stall;
- reg [ 31: 0] E_src1;
- reg [ 31: 0] E_src2;
- wire [ 31: 0] E_st_data;
- wire E_st_stall;
- wire E_stall;
- wire E_valid;
- reg E_valid_from_R;
- wire [271: 0] E_vinst;
- wire E_wrctl_bstatus;
- wire E_wrctl_estatus;
- wire E_wrctl_ienable;
- wire E_wrctl_status;
- wire [ 31: 0] F_av_iw;
- wire [ 4: 0] F_av_iw_a;
- wire [ 4: 0] F_av_iw_b;
- wire [ 4: 0] F_av_iw_c;
- wire [ 4: 0] F_av_iw_control_regnum;
- wire [ 7: 0] F_av_iw_custom_n;
- wire F_av_iw_custom_readra;
- wire F_av_iw_custom_readrb;
- wire F_av_iw_custom_writerc;
- wire [ 15: 0] F_av_iw_imm16;
- wire [ 25: 0] F_av_iw_imm26;
- wire [ 4: 0] F_av_iw_imm5;
- wire [ 1: 0] F_av_iw_memsz;
- wire [ 5: 0] F_av_iw_op;
- wire [ 5: 0] F_av_iw_opx;
- wire F_av_mem16;
- wire F_av_mem32;
- wire F_av_mem8;
- wire [271: 0] F_inst;
- wire F_is_opx_inst;
- wire [ 31: 0] F_iw;
- wire [ 4: 0] F_iw_a;
- wire [ 4: 0] F_iw_b;
- wire [ 4: 0] F_iw_c;
- wire [ 4: 0] F_iw_control_regnum;
- wire [ 7: 0] F_iw_custom_n;
- wire F_iw_custom_readra;
- wire F_iw_custom_readrb;
- wire F_iw_custom_writerc;
- wire [ 15: 0] F_iw_imm16;
- wire [ 25: 0] F_iw_imm26;
- wire [ 4: 0] F_iw_imm5;
- wire [ 1: 0] F_iw_memsz;
- wire [ 5: 0] F_iw_op;
- wire [ 5: 0] F_iw_opx;
- wire F_mem16;
- wire F_mem32;
- wire F_mem8;
- wire F_op_add;
- wire F_op_addi;
- wire F_op_and;
- wire F_op_andhi;
- wire F_op_andi;
- wire F_op_beq;
- wire F_op_bge;
- wire F_op_bgeu;
- wire F_op_blt;
- wire F_op_bltu;
- wire F_op_bne;
- wire F_op_br;
- wire F_op_break;
- wire F_op_bret;
- wire F_op_call;
- wire F_op_callr;
- wire F_op_cmpeq;
- wire F_op_cmpeqi;
- wire F_op_cmpge;
- wire F_op_cmpgei;
- wire F_op_cmpgeu;
- wire F_op_cmpgeui;
- wire F_op_cmplt;
- wire F_op_cmplti;
- wire F_op_cmpltu;
- wire F_op_cmpltui;
- wire F_op_cmpne;
- wire F_op_cmpnei;
- wire F_op_crst;
- wire F_op_custom;
- wire F_op_div;
- wire F_op_divu;
- wire F_op_eret;
- wire F_op_flushd;
- wire F_op_flushda;
- wire F_op_flushi;
- wire F_op_flushp;
- wire F_op_hbreak;
- wire F_op_initd;
- wire F_op_initda;
- wire F_op_initi;
- wire F_op_intr;
- wire F_op_jmp;
- wire F_op_jmpi;
- wire F_op_ldb;
- wire F_op_ldbio;
- wire F_op_ldbu;
- wire F_op_ldbuio;
- wire F_op_ldh;
- wire F_op_ldhio;
- wire F_op_ldhu;
- wire F_op_ldhuio;
- wire F_op_ldl;
- wire F_op_ldw;
- wire F_op_ldwio;
- wire F_op_mul;
- wire F_op_muli;
- wire F_op_mulxss;
- wire F_op_mulxsu;
- wire F_op_mulxuu;
- wire F_op_nextpc;
- wire F_op_nios_custom_instr_floating_point_0;
- wire F_op_nor;
- wire F_op_op_rsv02;
- wire F_op_op_rsv09;
- wire F_op_op_rsv10;
- wire F_op_op_rsv17;
- wire F_op_op_rsv18;
- wire F_op_op_rsv25;
- wire F_op_op_rsv26;
- wire F_op_op_rsv33;
- wire F_op_op_rsv34;
- wire F_op_op_rsv41;
- wire F_op_op_rsv42;
- wire F_op_op_rsv49;
- wire F_op_op_rsv57;
- wire F_op_op_rsv61;
- wire F_op_op_rsv62;
- wire F_op_op_rsv63;
- wire F_op_opx_rsv00;
- wire F_op_opx_rsv10;
- wire F_op_opx_rsv15;
- wire F_op_opx_rsv17;
- wire F_op_opx_rsv21;
- wire F_op_opx_rsv25;
- wire F_op_opx_rsv33;
- wire F_op_opx_rsv34;
- wire F_op_opx_rsv35;
- wire F_op_opx_rsv42;
- wire F_op_opx_rsv43;
- wire F_op_opx_rsv44;
- wire F_op_opx_rsv47;
- wire F_op_opx_rsv50;
- wire F_op_opx_rsv51;
- wire F_op_opx_rsv55;
- wire F_op_opx_rsv56;
- wire F_op_opx_rsv60;
- wire F_op_opx_rsv63;
- wire F_op_or;
- wire F_op_orhi;
- wire F_op_ori;
- wire F_op_rdctl;
- wire F_op_rdprs;
- wire F_op_ret;
- wire F_op_rol;
- wire F_op_roli;
- wire F_op_ror;
- wire F_op_sll;
- wire F_op_slli;
- wire F_op_sra;
- wire F_op_srai;
- wire F_op_srl;
- wire F_op_srli;
- wire F_op_stb;
- wire F_op_stbio;
- wire F_op_stc;
- wire F_op_sth;
- wire F_op_sthio;
- wire F_op_stw;
- wire F_op_stwio;
- wire F_op_sub;
- wire F_op_sync;
- wire F_op_trap;
- wire F_op_wrctl;
- wire F_op_wrprs;
- wire F_op_xor;
- wire F_op_xorhi;
- wire F_op_xori;
- reg [ 17: 0] F_pc /* synthesis ALTERA_IP_DEBUG_VISIBLE = 1 */;
- wire F_pc_en;
- wire [ 17: 0] F_pc_no_crst_nxt;
- wire [ 17: 0] F_pc_nxt;
- wire [ 17: 0] F_pc_plus_one;
- wire [ 1: 0] F_pc_sel_nxt;
- wire [ 19: 0] F_pcb;
- wire [ 19: 0] F_pcb_nxt;
- wire [ 19: 0] F_pcb_plus_four;
- wire F_valid;
- wire [271: 0] F_vinst;
- reg [ 1: 0] R_compare_op;
- reg R_ctrl_alu_force_and;
- wire R_ctrl_alu_force_and_nxt;
- reg R_ctrl_alu_force_xor;
- wire R_ctrl_alu_force_xor_nxt;
- reg R_ctrl_alu_signed_comparison;
- wire R_ctrl_alu_signed_comparison_nxt;
- reg R_ctrl_alu_subtract;
- wire R_ctrl_alu_subtract_nxt;
- reg R_ctrl_b_is_dst;
- wire R_ctrl_b_is_dst_nxt;
- reg R_ctrl_br;
- reg R_ctrl_br_cmp;
- wire R_ctrl_br_cmp_nxt;
- wire R_ctrl_br_nxt;
- reg R_ctrl_br_uncond;
- wire R_ctrl_br_uncond_nxt;
- reg R_ctrl_break;
- wire R_ctrl_break_nxt;
- reg R_ctrl_crst;
- wire R_ctrl_crst_nxt;
- reg R_ctrl_custom;
- reg R_ctrl_custom_multi;
- wire R_ctrl_custom_multi_nxt;
- wire R_ctrl_custom_nxt;
- reg R_ctrl_exception;
- wire R_ctrl_exception_nxt;
- reg R_ctrl_force_src2_zero;
- wire R_ctrl_force_src2_zero_nxt;
- reg R_ctrl_hi_imm16;
- wire R_ctrl_hi_imm16_nxt;
- reg R_ctrl_ignore_dst;
- wire R_ctrl_ignore_dst_nxt;
- reg R_ctrl_implicit_dst_eretaddr;
- wire R_ctrl_implicit_dst_eretaddr_nxt;
- reg R_ctrl_implicit_dst_retaddr;
- wire R_ctrl_implicit_dst_retaddr_nxt;
- reg R_ctrl_intr_inst;
- wire R_ctrl_intr_inst_nxt;
- reg R_ctrl_jmp_direct;
- wire R_ctrl_jmp_direct_nxt;
- reg R_ctrl_jmp_indirect;
- wire R_ctrl_jmp_indirect_nxt;
- reg R_ctrl_ld;
- reg R_ctrl_ld_ex;
- wire R_ctrl_ld_ex_nxt;
- reg R_ctrl_ld_io;
- wire R_ctrl_ld_io_nxt;
- reg R_ctrl_ld_non_io;
- wire R_ctrl_ld_non_io_nxt;
- wire R_ctrl_ld_nxt;
- reg R_ctrl_ld_signed;
- wire R_ctrl_ld_signed_nxt;
- reg R_ctrl_ld_st_ex;
- wire R_ctrl_ld_st_ex_nxt;
- reg R_ctrl_logic;
- wire R_ctrl_logic_nxt;
- reg R_ctrl_mem16;
- wire R_ctrl_mem16_nxt;
- reg R_ctrl_mem32;
- wire R_ctrl_mem32_nxt;
- reg R_ctrl_mem8;
- wire R_ctrl_mem8_nxt;
- reg R_ctrl_rd_ctl_reg;
- wire R_ctrl_rd_ctl_reg_nxt;
- reg R_ctrl_retaddr;
- wire R_ctrl_retaddr_nxt;
- reg R_ctrl_rot_right;
- wire R_ctrl_rot_right_nxt;
- reg R_ctrl_set_src2_rem_imm;
- wire R_ctrl_set_src2_rem_imm_nxt;
- reg R_ctrl_shift_logical;
- wire R_ctrl_shift_logical_nxt;
- reg R_ctrl_shift_right_arith;
- wire R_ctrl_shift_right_arith_nxt;
- reg R_ctrl_shift_rot;
- wire R_ctrl_shift_rot_nxt;
- reg R_ctrl_shift_rot_right;
- wire R_ctrl_shift_rot_right_nxt;
- reg R_ctrl_signed_imm12;
- wire R_ctrl_signed_imm12_nxt;
- reg R_ctrl_src2_choose_imm;
- wire R_ctrl_src2_choose_imm_nxt;
- reg R_ctrl_src_imm5_shift_rot;
- wire R_ctrl_src_imm5_shift_rot_nxt;
- reg R_ctrl_st;
- reg R_ctrl_st_ex;
- wire R_ctrl_st_ex_nxt;
- wire R_ctrl_st_nxt;
- reg R_ctrl_uncond_cti_non_br;
- wire R_ctrl_uncond_cti_non_br_nxt;
- reg R_ctrl_unsigned_lo_imm16;
- wire R_ctrl_unsigned_lo_imm16_nxt;
- reg R_ctrl_wrctl_inst;
- wire R_ctrl_wrctl_inst_nxt;
- reg [ 4: 0] R_dst_regnum /* synthesis ALTERA_IP_DEBUG_VISIBLE = 1 */;
- wire R_en;
- reg [ 1: 0] R_logic_op;
- wire [ 31: 0] R_rf_a;
- wire [ 31: 0] R_rf_a_q;
- wire [ 31: 0] R_rf_b;
- wire [ 31: 0] R_rf_b_q;
- wire [ 31: 0] R_src1;
- wire [ 31: 0] R_src2;
- wire [ 15: 0] R_src2_hi;
- wire [ 15: 0] R_src2_lo;
- reg R_src2_use_imm;
- wire [ 7: 0] R_stb_data;
- wire [ 15: 0] R_sth_data;
- wire [ 31: 0] R_stw_data;
- reg R_valid;
- wire [271: 0] R_vinst;
- reg R_wr_dst_reg;
- reg W1_rf_ecc_recoverable_valid;
- reg [ 31: 0] W_alu_result;
- wire W_br_taken;
- reg W_bstatus_reg;
- wire W_bstatus_reg_inst_nxt;
- wire W_bstatus_reg_nxt;
- reg [ 31: 0] W_cdsr_reg;
- wire W_ci_estatus;
- wire [ 31: 0] W_ci_ipending;
- wire W_ci_status;
- reg W_cmp_result;
- reg [ 31: 0] W_control_rd_data;
- wire [ 31: 0] W_cpuid_reg;
- wire [ 4: 0] W_dst_regnum;
- reg W_estatus_reg;
- wire W_estatus_reg_inst_nxt;
- wire W_estatus_reg_nxt;
- reg [ 31: 0] W_ienable_reg;
- wire [ 31: 0] W_ienable_reg_nxt;
- reg [ 31: 0] W_ipending_reg;
- wire [ 31: 0] W_ipending_reg_nxt;
- wire [ 19: 0] W_mem_baddr;
- reg W_rf_ecc_recoverable_valid;
- reg W_rf_ecc_unrecoverable_valid;
- wire W_rf_ecc_valid_any;
- wire [ 31: 0] W_rf_wr_data;
- wire W_rf_wren;
- wire W_status_reg;
- reg W_status_reg_pie;
- wire W_status_reg_pie_inst_nxt;
- wire W_status_reg_pie_nxt;
- reg W_up_ex_mon_state;
- reg W_valid /* synthesis ALTERA_IP_DEBUG_VISIBLE = 1 */;
- wire W_valid_from_M;
- wire [271: 0] W_vinst;
- wire [ 31: 0] W_wr_data;
- wire [ 31: 0] W_wr_data_non_zero;
- wire av_fill_bit;
- reg [ 1: 0] av_ld_align_cycle;
- wire [ 1: 0] av_ld_align_cycle_nxt;
- wire av_ld_align_one_more_cycle;
- reg av_ld_aligning_data;
- wire av_ld_aligning_data_nxt;
- reg [ 7: 0] av_ld_byte0_data;
- wire [ 7: 0] av_ld_byte0_data_nxt;
- reg [ 7: 0] av_ld_byte1_data;
- wire av_ld_byte1_data_en;
- wire [ 7: 0] av_ld_byte1_data_nxt;
- reg [ 7: 0] av_ld_byte2_data;
- wire [ 7: 0] av_ld_byte2_data_nxt;
- reg [ 7: 0] av_ld_byte3_data;
- wire [ 7: 0] av_ld_byte3_data_nxt;
- wire [ 31: 0] av_ld_data_aligned_filtered;
- wire [ 31: 0] av_ld_data_aligned_unfiltered;
- wire av_ld_done;
- wire av_ld_extend;
- wire av_ld_getting_data;
- wire av_ld_rshift8;
- reg av_ld_waiting_for_data;
- wire av_ld_waiting_for_data_nxt;
- wire av_sign_bit;
- wire [ 19: 0] d_address;
- reg [ 3: 0] d_byteenable;
- reg d_read;
- wire d_read_nxt;
- reg d_write;
- wire d_write_nxt;
- reg [ 31: 0] d_writedata;
- wire debug_mem_slave_clk;
- wire debug_mem_slave_debugaccess_to_roms;
- wire [ 31: 0] debug_mem_slave_readdata;
- wire debug_mem_slave_reset;
- wire debug_mem_slave_waitrequest;
- wire debug_reset_request;
- reg hbreak_enabled;
- reg hbreak_pending;
- wire hbreak_pending_nxt;
- wire hbreak_req;
- wire [ 19: 0] i_address;
- reg i_read;
- wire i_read_nxt;
- wire [ 31: 0] iactive;
- wire intr_req;
- wire oci_hbreak_req;
- wire [ 31: 0] oci_ienable;
- wire oci_single_step_mode;
- wire oci_tb_hbreak_req;
- wire test_has_ended;
- reg wait_for_one_post_bret_inst;
- //the_nios2_uc_nios2_cpu_test_bench, which is an e_instance
- nios2_uc_nios2_cpu_test_bench the_nios2_uc_nios2_cpu_test_bench
- (
- .D_iw (D_iw),
- .D_iw_op (D_iw_op),
- .D_iw_opx (D_iw_opx),
- .D_valid (D_valid),
- .E_valid (E_valid),
- .F_pcb (F_pcb),
- .F_valid (F_valid),
- .R_ctrl_ld (R_ctrl_ld),
- .R_ctrl_ld_non_io (R_ctrl_ld_non_io),
- .R_dst_regnum (R_dst_regnum),
- .R_wr_dst_reg (R_wr_dst_reg),
- .W_valid (W_valid),
- .W_vinst (W_vinst),
- .W_wr_data (W_wr_data),
- .av_ld_data_aligned_filtered (av_ld_data_aligned_filtered),
- .av_ld_data_aligned_unfiltered (av_ld_data_aligned_unfiltered),
- .clk (clk),
- .d_address (d_address),
- .d_byteenable (d_byteenable),
- .d_read (d_read),
- .d_write (d_write),
- .i_address (i_address),
- .i_read (i_read),
- .i_readdata (i_readdata),
- .i_waitrequest (i_waitrequest),
- .reset_n (reset_n),
- .test_has_ended (test_has_ended)
- );
- assign F_av_iw_a = F_av_iw[31 : 27];
- assign F_av_iw_b = F_av_iw[26 : 22];
- assign F_av_iw_c = F_av_iw[21 : 17];
- assign F_av_iw_custom_n = F_av_iw[13 : 6];
- assign F_av_iw_custom_readra = F_av_iw[16];
- assign F_av_iw_custom_readrb = F_av_iw[15];
- assign F_av_iw_custom_writerc = F_av_iw[14];
- assign F_av_iw_opx = F_av_iw[16 : 11];
- assign F_av_iw_op = F_av_iw[5 : 0];
- assign F_av_iw_imm5 = F_av_iw[10 : 6];
- assign F_av_iw_imm16 = F_av_iw[21 : 6];
- assign F_av_iw_imm26 = F_av_iw[31 : 6];
- assign F_av_iw_memsz = F_av_iw[4 : 3];
- assign F_av_iw_control_regnum = F_av_iw[10 : 6];
- assign F_av_mem8 = F_av_iw_memsz == 2'b00;
- assign F_av_mem16 = F_av_iw_memsz == 2'b01;
- assign F_av_mem32 = F_av_iw_memsz[1] == 1'b1;
- assign F_iw_a = F_iw[31 : 27];
- assign F_iw_b = F_iw[26 : 22];
- assign F_iw_c = F_iw[21 : 17];
- assign F_iw_custom_n = F_iw[13 : 6];
- assign F_iw_custom_readra = F_iw[16];
- assign F_iw_custom_readrb = F_iw[15];
- assign F_iw_custom_writerc = F_iw[14];
- assign F_iw_opx = F_iw[16 : 11];
- assign F_iw_op = F_iw[5 : 0];
- assign F_iw_imm5 = F_iw[10 : 6];
- assign F_iw_imm16 = F_iw[21 : 6];
- assign F_iw_imm26 = F_iw[31 : 6];
- assign F_iw_memsz = F_iw[4 : 3];
- assign F_iw_control_regnum = F_iw[10 : 6];
- assign F_mem8 = F_iw_memsz == 2'b00;
- assign F_mem16 = F_iw_memsz == 2'b01;
- assign F_mem32 = F_iw_memsz[1] == 1'b1;
- assign D_iw_a = D_iw[31 : 27];
- assign D_iw_b = D_iw[26 : 22];
- assign D_iw_c = D_iw[21 : 17];
- assign D_iw_custom_n = D_iw[13 : 6];
- assign D_iw_custom_readra = D_iw[16];
- assign D_iw_custom_readrb = D_iw[15];
- assign D_iw_custom_writerc = D_iw[14];
- assign D_iw_opx = D_iw[16 : 11];
- assign D_iw_op = D_iw[5 : 0];
- assign D_iw_imm5 = D_iw[10 : 6];
- assign D_iw_imm16 = D_iw[21 : 6];
- assign D_iw_imm26 = D_iw[31 : 6];
- assign D_iw_memsz = D_iw[4 : 3];
- assign D_iw_control_regnum = D_iw[10 : 6];
- assign D_mem8 = D_iw_memsz == 2'b00;
- assign D_mem16 = D_iw_memsz == 2'b01;
- assign D_mem32 = D_iw_memsz[1] == 1'b1;
- assign F_op_call = F_iw_op == 0;
- assign F_op_jmpi = F_iw_op == 1;
- assign F_op_op_rsv02 = F_iw_op == 2;
- assign F_op_ldbu = F_iw_op == 3;
- assign F_op_addi = F_iw_op == 4;
- assign F_op_stb = F_iw_op == 5;
- assign F_op_br = F_iw_op == 6;
- assign F_op_ldb = F_iw_op == 7;
- assign F_op_cmpgei = F_iw_op == 8;
- assign F_op_op_rsv09 = F_iw_op == 9;
- assign F_op_op_rsv10 = F_iw_op == 10;
- assign F_op_ldhu = F_iw_op == 11;
- assign F_op_andi = F_iw_op == 12;
- assign F_op_sth = F_iw_op == 13;
- assign F_op_bge = F_iw_op == 14;
- assign F_op_ldh = F_iw_op == 15;
- assign F_op_cmplti = F_iw_op == 16;
- assign F_op_op_rsv17 = F_iw_op == 17;
- assign F_op_op_rsv18 = F_iw_op == 18;
- assign F_op_initda = F_iw_op == 19;
- assign F_op_ori = F_iw_op == 20;
- assign F_op_stw = F_iw_op == 21;
- assign F_op_blt = F_iw_op == 22;
- assign F_op_ldw = F_iw_op == 23;
- assign F_op_cmpnei = F_iw_op == 24;
- assign F_op_op_rsv25 = F_iw_op == 25;
- assign F_op_op_rsv26 = F_iw_op == 26;
- assign F_op_flushda = F_iw_op == 27;
- assign F_op_xori = F_iw_op == 28;
- assign F_op_stc = F_iw_op == 29;
- assign F_op_bne = F_iw_op == 30;
- assign F_op_ldl = F_iw_op == 31;
- assign F_op_cmpeqi = F_iw_op == 32;
- assign F_op_op_rsv33 = F_iw_op == 33;
- assign F_op_op_rsv34 = F_iw_op == 34;
- assign F_op_ldbuio = F_iw_op == 35;
- assign F_op_muli = F_iw_op == 36;
- assign F_op_stbio = F_iw_op == 37;
- assign F_op_beq = F_iw_op == 38;
- assign F_op_ldbio = F_iw_op == 39;
- assign F_op_cmpgeui = F_iw_op == 40;
- assign F_op_op_rsv41 = F_iw_op == 41;
- assign F_op_op_rsv42 = F_iw_op == 42;
- assign F_op_ldhuio = F_iw_op == 43;
- assign F_op_andhi = F_iw_op == 44;
- assign F_op_sthio = F_iw_op == 45;
- assign F_op_bgeu = F_iw_op == 46;
- assign F_op_ldhio = F_iw_op == 47;
- assign F_op_cmpltui = F_iw_op == 48;
- assign F_op_op_rsv49 = F_iw_op == 49;
- assign F_op_custom = F_iw_op == 50;
- assign F_op_initd = F_iw_op == 51;
- assign F_op_orhi = F_iw_op == 52;
- assign F_op_stwio = F_iw_op == 53;
- assign F_op_bltu = F_iw_op == 54;
- assign F_op_ldwio = F_iw_op == 55;
- assign F_op_rdprs = F_iw_op == 56;
- assign F_op_op_rsv57 = F_iw_op == 57;
- assign F_op_flushd = F_iw_op == 59;
- assign F_op_xorhi = F_iw_op == 60;
- assign F_op_op_rsv61 = F_iw_op == 61;
- assign F_op_op_rsv62 = F_iw_op == 62;
- assign F_op_op_rsv63 = F_iw_op == 63;
- assign F_op_opx_rsv00 = (F_iw_opx == 0) & F_is_opx_inst;
- assign F_op_eret = (F_iw_opx == 1) & F_is_opx_inst;
- assign F_op_roli = (F_iw_opx == 2) & F_is_opx_inst;
- assign F_op_rol = (F_iw_opx == 3) & F_is_opx_inst;
- assign F_op_flushp = (F_iw_opx == 4) & F_is_opx_inst;
- assign F_op_ret = (F_iw_opx == 5) & F_is_opx_inst;
- assign F_op_nor = (F_iw_opx == 6) & F_is_opx_inst;
- assign F_op_mulxuu = (F_iw_opx == 7) & F_is_opx_inst;
- assign F_op_cmpge = (F_iw_opx == 8) & F_is_opx_inst;
- assign F_op_bret = (F_iw_opx == 9) & F_is_opx_inst;
- assign F_op_opx_rsv10 = (F_iw_opx == 10) & F_is_opx_inst;
- assign F_op_ror = (F_iw_opx == 11) & F_is_opx_inst;
- assign F_op_flushi = (F_iw_opx == 12) & F_is_opx_inst;
- assign F_op_jmp = (F_iw_opx == 13) & F_is_opx_inst;
- assign F_op_and = (F_iw_opx == 14) & F_is_opx_inst;
- assign F_op_opx_rsv15 = (F_iw_opx == 15) & F_is_opx_inst;
- assign F_op_cmplt = (F_iw_opx == 16) & F_is_opx_inst;
- assign F_op_opx_rsv17 = (F_iw_opx == 17) & F_is_opx_inst;
- assign F_op_slli = (F_iw_opx == 18) & F_is_opx_inst;
- assign F_op_sll = (F_iw_opx == 19) & F_is_opx_inst;
- assign F_op_wrprs = (F_iw_opx == 20) & F_is_opx_inst;
- assign F_op_opx_rsv21 = (F_iw_opx == 21) & F_is_opx_inst;
- assign F_op_or = (F_iw_opx == 22) & F_is_opx_inst;
- assign F_op_mulxsu = (F_iw_opx == 23) & F_is_opx_inst;
- assign F_op_cmpne = (F_iw_opx == 24) & F_is_opx_inst;
- assign F_op_opx_rsv25 = (F_iw_opx == 25) & F_is_opx_inst;
- assign F_op_srli = (F_iw_opx == 26) & F_is_opx_inst;
- assign F_op_srl = (F_iw_opx == 27) & F_is_opx_inst;
- assign F_op_nextpc = (F_iw_opx == 28) & F_is_opx_inst;
- assign F_op_callr = (F_iw_opx == 29) & F_is_opx_inst;
- assign F_op_xor = (F_iw_opx == 30) & F_is_opx_inst;
- assign F_op_mulxss = (F_iw_opx == 31) & F_is_opx_inst;
- assign F_op_cmpeq = (F_iw_opx == 32) & F_is_opx_inst;
- assign F_op_opx_rsv33 = (F_iw_opx == 33) & F_is_opx_inst;
- assign F_op_opx_rsv34 = (F_iw_opx == 34) & F_is_opx_inst;
- assign F_op_opx_rsv35 = (F_iw_opx == 35) & F_is_opx_inst;
- assign F_op_divu = (F_iw_opx == 36) & F_is_opx_inst;
- assign F_op_div = (F_iw_opx == 37) & F_is_opx_inst;
- assign F_op_rdctl = (F_iw_opx == 38) & F_is_opx_inst;
- assign F_op_mul = (F_iw_opx == 39) & F_is_opx_inst;
- assign F_op_cmpgeu = (F_iw_opx == 40) & F_is_opx_inst;
- assign F_op_initi = (F_iw_opx == 41) & F_is_opx_inst;
- assign F_op_opx_rsv42 = (F_iw_opx == 42) & F_is_opx_inst;
- assign F_op_opx_rsv43 = (F_iw_opx == 43) & F_is_opx_inst;
- assign F_op_opx_rsv44 = (F_iw_opx == 44) & F_is_opx_inst;
- assign F_op_trap = (F_iw_opx == 45) & F_is_opx_inst;
- assign F_op_wrctl = (F_iw_opx == 46) & F_is_opx_inst;
- assign F_op_opx_rsv47 = (F_iw_opx == 47) & F_is_opx_inst;
- assign F_op_cmpltu = (F_iw_opx == 48) & F_is_opx_inst;
- assign F_op_add = (F_iw_opx == 49) & F_is_opx_inst;
- assign F_op_opx_rsv50 = (F_iw_opx == 50) & F_is_opx_inst;
- assign F_op_opx_rsv51 = (F_iw_opx == 51) & F_is_opx_inst;
- assign F_op_break = (F_iw_opx == 52) & F_is_opx_inst;
- assign F_op_hbreak = (F_iw_opx == 53) & F_is_opx_inst;
- assign F_op_sync = (F_iw_opx == 54) & F_is_opx_inst;
- assign F_op_opx_rsv55 = (F_iw_opx == 55) & F_is_opx_inst;
- assign F_op_opx_rsv56 = (F_iw_opx == 56) & F_is_opx_inst;
- assign F_op_sub = (F_iw_opx == 57) & F_is_opx_inst;
- assign F_op_srai = (F_iw_opx == 58) & F_is_opx_inst;
- assign F_op_sra = (F_iw_opx == 59) & F_is_opx_inst;
- assign F_op_opx_rsv60 = (F_iw_opx == 60) & F_is_opx_inst;
- assign F_op_intr = (F_iw_opx == 61) & F_is_opx_inst;
- assign F_op_crst = (F_iw_opx == 62) & F_is_opx_inst;
- assign F_op_opx_rsv63 = (F_iw_opx == 63) & F_is_opx_inst;
- assign F_op_nios_custom_instr_floating_point_0 = F_op_custom & 1'b1;
- assign F_is_opx_inst = F_iw_op == 58;
- assign D_op_call = D_iw_op == 0;
- assign D_op_jmpi = D_iw_op == 1;
- assign D_op_op_rsv02 = D_iw_op == 2;
- assign D_op_ldbu = D_iw_op == 3;
- assign D_op_addi = D_iw_op == 4;
- assign D_op_stb = D_iw_op == 5;
- assign D_op_br = D_iw_op == 6;
- assign D_op_ldb = D_iw_op == 7;
- assign D_op_cmpgei = D_iw_op == 8;
- assign D_op_op_rsv09 = D_iw_op == 9;
- assign D_op_op_rsv10 = D_iw_op == 10;
- assign D_op_ldhu = D_iw_op == 11;
- assign D_op_andi = D_iw_op == 12;
- assign D_op_sth = D_iw_op == 13;
- assign D_op_bge = D_iw_op == 14;
- assign D_op_ldh = D_iw_op == 15;
- assign D_op_cmplti = D_iw_op == 16;
- assign D_op_op_rsv17 = D_iw_op == 17;
- assign D_op_op_rsv18 = D_iw_op == 18;
- assign D_op_initda = D_iw_op == 19;
- assign D_op_ori = D_iw_op == 20;
- assign D_op_stw = D_iw_op == 21;
- assign D_op_blt = D_iw_op == 22;
- assign D_op_ldw = D_iw_op == 23;
- assign D_op_cmpnei = D_iw_op == 24;
- assign D_op_op_rsv25 = D_iw_op == 25;
- assign D_op_op_rsv26 = D_iw_op == 26;
- assign D_op_flushda = D_iw_op == 27;
- assign D_op_xori = D_iw_op == 28;
- assign D_op_stc = D_iw_op == 29;
- assign D_op_bne = D_iw_op == 30;
- assign D_op_ldl = D_iw_op == 31;
- assign D_op_cmpeqi = D_iw_op == 32;
- assign D_op_op_rsv33 = D_iw_op == 33;
- assign D_op_op_rsv34 = D_iw_op == 34;
- assign D_op_ldbuio = D_iw_op == 35;
- assign D_op_muli = D_iw_op == 36;
- assign D_op_stbio = D_iw_op == 37;
- assign D_op_beq = D_iw_op == 38;
- assign D_op_ldbio = D_iw_op == 39;
- assign D_op_cmpgeui = D_iw_op == 40;
- assign D_op_op_rsv41 = D_iw_op == 41;
- assign D_op_op_rsv42 = D_iw_op == 42;
- assign D_op_ldhuio = D_iw_op == 43;
- assign D_op_andhi = D_iw_op == 44;
- assign D_op_sthio = D_iw_op == 45;
- assign D_op_bgeu = D_iw_op == 46;
- assign D_op_ldhio = D_iw_op == 47;
- assign D_op_cmpltui = D_iw_op == 48;
- assign D_op_op_rsv49 = D_iw_op == 49;
- assign D_op_custom = D_iw_op == 50;
- assign D_op_initd = D_iw_op == 51;
- assign D_op_orhi = D_iw_op == 52;
- assign D_op_stwio = D_iw_op == 53;
- assign D_op_bltu = D_iw_op == 54;
- assign D_op_ldwio = D_iw_op == 55;
- assign D_op_rdprs = D_iw_op == 56;
- assign D_op_op_rsv57 = D_iw_op == 57;
- assign D_op_flushd = D_iw_op == 59;
- assign D_op_xorhi = D_iw_op == 60;
- assign D_op_op_rsv61 = D_iw_op == 61;
- assign D_op_op_rsv62 = D_iw_op == 62;
- assign D_op_op_rsv63 = D_iw_op == 63;
- assign D_op_opx_rsv00 = (D_iw_opx == 0) & D_is_opx_inst;
- assign D_op_eret = (D_iw_opx == 1) & D_is_opx_inst;
- assign D_op_roli = (D_iw_opx == 2) & D_is_opx_inst;
- assign D_op_rol = (D_iw_opx == 3) & D_is_opx_inst;
- assign D_op_flushp = (D_iw_opx == 4) & D_is_opx_inst;
- assign D_op_ret = (D_iw_opx == 5) & D_is_opx_inst;
- assign D_op_nor = (D_iw_opx == 6) & D_is_opx_inst;
- assign D_op_mulxuu = (D_iw_opx == 7) & D_is_opx_inst;
- assign D_op_cmpge = (D_iw_opx == 8) & D_is_opx_inst;
- assign D_op_bret = (D_iw_opx == 9) & D_is_opx_inst;
- assign D_op_opx_rsv10 = (D_iw_opx == 10) & D_is_opx_inst;
- assign D_op_ror = (D_iw_opx == 11) & D_is_opx_inst;
- assign D_op_flushi = (D_iw_opx == 12) & D_is_opx_inst;
- assign D_op_jmp = (D_iw_opx == 13) & D_is_opx_inst;
- assign D_op_and = (D_iw_opx == 14) & D_is_opx_inst;
- assign D_op_opx_rsv15 = (D_iw_opx == 15) & D_is_opx_inst;
- assign D_op_cmplt = (D_iw_opx == 16) & D_is_opx_inst;
- assign D_op_opx_rsv17 = (D_iw_opx == 17) & D_is_opx_inst;
- assign D_op_slli = (D_iw_opx == 18) & D_is_opx_inst;
- assign D_op_sll = (D_iw_opx == 19) & D_is_opx_inst;
- assign D_op_wrprs = (D_iw_opx == 20) & D_is_opx_inst;
- assign D_op_opx_rsv21 = (D_iw_opx == 21) & D_is_opx_inst;
- assign D_op_or = (D_iw_opx == 22) & D_is_opx_inst;
- assign D_op_mulxsu = (D_iw_opx == 23) & D_is_opx_inst;
- assign D_op_cmpne = (D_iw_opx == 24) & D_is_opx_inst;
- assign D_op_opx_rsv25 = (D_iw_opx == 25) & D_is_opx_inst;
- assign D_op_srli = (D_iw_opx == 26) & D_is_opx_inst;
- assign D_op_srl = (D_iw_opx == 27) & D_is_opx_inst;
- assign D_op_nextpc = (D_iw_opx == 28) & D_is_opx_inst;
- assign D_op_callr = (D_iw_opx == 29) & D_is_opx_inst;
- assign D_op_xor = (D_iw_opx == 30) & D_is_opx_inst;
- assign D_op_mulxss = (D_iw_opx == 31) & D_is_opx_inst;
- assign D_op_cmpeq = (D_iw_opx == 32) & D_is_opx_inst;
- assign D_op_opx_rsv33 = (D_iw_opx == 33) & D_is_opx_inst;
- assign D_op_opx_rsv34 = (D_iw_opx == 34) & D_is_opx_inst;
- assign D_op_opx_rsv35 = (D_iw_opx == 35) & D_is_opx_inst;
- assign D_op_divu = (D_iw_opx == 36) & D_is_opx_inst;
- assign D_op_div = (D_iw_opx == 37) & D_is_opx_inst;
- assign D_op_rdctl = (D_iw_opx == 38) & D_is_opx_inst;
- assign D_op_mul = (D_iw_opx == 39) & D_is_opx_inst;
- assign D_op_cmpgeu = (D_iw_opx == 40) & D_is_opx_inst;
- assign D_op_initi = (D_iw_opx == 41) & D_is_opx_inst;
- assign D_op_opx_rsv42 = (D_iw_opx == 42) & D_is_opx_inst;
- assign D_op_opx_rsv43 = (D_iw_opx == 43) & D_is_opx_inst;
- assign D_op_opx_rsv44 = (D_iw_opx == 44) & D_is_opx_inst;
- assign D_op_trap = (D_iw_opx == 45) & D_is_opx_inst;
- assign D_op_wrctl = (D_iw_opx == 46) & D_is_opx_inst;
- assign D_op_opx_rsv47 = (D_iw_opx == 47) & D_is_opx_inst;
- assign D_op_cmpltu = (D_iw_opx == 48) & D_is_opx_inst;
- assign D_op_add = (D_iw_opx == 49) & D_is_opx_inst;
- assign D_op_opx_rsv50 = (D_iw_opx == 50) & D_is_opx_inst;
- assign D_op_opx_rsv51 = (D_iw_opx == 51) & D_is_opx_inst;
- assign D_op_break = (D_iw_opx == 52) & D_is_opx_inst;
- assign D_op_hbreak = (D_iw_opx == 53) & D_is_opx_inst;
- assign D_op_sync = (D_iw_opx == 54) & D_is_opx_inst;
- assign D_op_opx_rsv55 = (D_iw_opx == 55) & D_is_opx_inst;
- assign D_op_opx_rsv56 = (D_iw_opx == 56) & D_is_opx_inst;
- assign D_op_sub = (D_iw_opx == 57) & D_is_opx_inst;
- assign D_op_srai = (D_iw_opx == 58) & D_is_opx_inst;
- assign D_op_sra = (D_iw_opx == 59) & D_is_opx_inst;
- assign D_op_opx_rsv60 = (D_iw_opx == 60) & D_is_opx_inst;
- assign D_op_intr = (D_iw_opx == 61) & D_is_opx_inst;
- assign D_op_crst = (D_iw_opx == 62) & D_is_opx_inst;
- assign D_op_opx_rsv63 = (D_iw_opx == 63) & D_is_opx_inst;
- assign D_op_nios_custom_instr_floating_point_0 = D_op_custom & 1'b1;
- assign D_is_opx_inst = D_iw_op == 58;
- assign R_en = 1'b1;
- assign E_ci_dataa = E_src1;
- assign E_ci_datab = E_src2;
- assign W_ci_ipending = W_ipending_reg;
- assign W_ci_status = W_status_reg;
- assign W_ci_estatus = W_estatus_reg;
- assign D_ci_n = D_iw_custom_n;
- assign D_ci_a = D_iw_a;
- assign D_ci_b = D_iw_b;
- assign D_ci_c = D_iw_c;
- assign D_ci_readra = D_iw_custom_readra;
- assign D_ci_readrb = D_iw_custom_readrb;
- assign D_ci_writerc = D_iw_custom_writerc;
- assign E_ci_multi_clock = clk;
- assign E_ci_multi_reset = ~reset_n;
- assign E_ci_multi_reset_req = reset_req;
- //custom_instruction_master, which is an e_custom_instruction_master
- assign iactive = irq[31 : 0] & 32'b00000000000000000000000000000001;
- assign F_pc_sel_nxt = (R_ctrl_exception | W_rf_ecc_unrecoverable_valid) ? 2'b00 :
- R_ctrl_break ? 2'b01 :
- (W_br_taken | R_ctrl_uncond_cti_non_br) ? 2'b10 :
- 2'b11;
- assign F_pc_no_crst_nxt = (F_pc_sel_nxt == 2'b00)? 65544 :
- (F_pc_sel_nxt == 2'b01)? 131592 :
- (F_pc_sel_nxt == 2'b10)? E_arith_result[19 : 2] :
- F_pc_plus_one;
- assign F_pc_nxt = F_pc_no_crst_nxt;
- assign F_pcb_nxt = {F_pc_nxt, 2'b00};
- assign F_pc_en = W_valid | W_rf_ecc_unrecoverable_valid;
- assign F_pc_plus_one = F_pc + 1;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- F_pc <= 65536;
- else if (F_pc_en)
- F_pc <= F_pc_nxt;
- end
- assign F_pcb = {F_pc, 2'b00};
- assign F_pcb_plus_four = {F_pc_plus_one, 2'b00};
- assign F_valid = i_read & ~i_waitrequest;
- assign i_read_nxt = W_valid | W_rf_ecc_unrecoverable_valid | (i_read & i_waitrequest);
- assign i_address = {F_pc, 2'b00};
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- i_read <= 1'b1;
- else
- i_read <= i_read_nxt;
- end
- assign oci_tb_hbreak_req = oci_hbreak_req;
- assign hbreak_req = (oci_tb_hbreak_req | hbreak_pending) & hbreak_enabled & ~(wait_for_one_post_bret_inst & ~W_valid);
- assign hbreak_pending_nxt = hbreak_pending ? hbreak_enabled
- : hbreak_req;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- wait_for_one_post_bret_inst <= 1'b0;
- else
- wait_for_one_post_bret_inst <= (~hbreak_enabled & oci_single_step_mode) ? 1'b1 : (F_valid | ~oci_single_step_mode) ? 1'b0 : wait_for_one_post_bret_inst;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- hbreak_pending <= 1'b0;
- else
- hbreak_pending <= hbreak_pending_nxt;
- end
- assign intr_req = W_status_reg_pie & (W_ipending_reg != 0);
- assign F_av_iw = i_readdata;
- assign F_iw = hbreak_req ? 4040762 :
- 1'b0 ? 127034 :
- intr_req ? 3926074 :
- F_av_iw;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- D_iw <= 0;
- else if (F_valid)
- D_iw <= F_iw;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- D_valid <= 0;
- else
- D_valid <= F_valid | W1_rf_ecc_recoverable_valid;
- end
- assign D_dst_regnum = D_ctrl_implicit_dst_retaddr ? 5'd31 :
- D_ctrl_implicit_dst_eretaddr ? 5'd29 :
- D_ctrl_b_is_dst ? D_iw_b :
- D_iw_c;
- assign D_wr_dst_reg = (D_dst_regnum != 0) & ~D_ctrl_ignore_dst;
- assign D_logic_op_raw = D_is_opx_inst ? D_iw_opx[4 : 3] :
- D_iw_op[4 : 3];
- assign D_logic_op = D_ctrl_alu_force_xor ? 2'b11 :
- D_ctrl_alu_force_and ? 2'b01 :
- D_logic_op_raw;
- assign D_compare_op = D_is_opx_inst ? D_iw_opx[4 : 3] :
- D_iw_op[4 : 3];
- assign D_jmp_direct_target_waddr = D_iw[31 : 6];
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_valid <= 0;
- else
- R_valid <= D_valid;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_wr_dst_reg <= 0;
- else
- R_wr_dst_reg <= D_wr_dst_reg;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_dst_regnum <= 0;
- else
- R_dst_regnum <= D_dst_regnum;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_logic_op <= 0;
- else
- R_logic_op <= D_logic_op;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_compare_op <= 0;
- else
- R_compare_op <= D_compare_op;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_src2_use_imm <= 0;
- else
- R_src2_use_imm <= D_ctrl_src2_choose_imm | (D_ctrl_br & R_valid);
- end
- assign E_rf_ecc_valid_any = E_rf_ecc_recoverable_valid|E_rf_ecc_unrecoverable_valid;
- assign W_rf_ecc_valid_any = W_rf_ecc_recoverable_valid|W_rf_ecc_unrecoverable_valid;
- assign E_rf_ecc_recoverable_valid = 1'b0;
- assign E_rf_ecc_unrecoverable_valid = 1'b0;
- assign W_dst_regnum = R_dst_regnum;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_rf_ecc_recoverable_valid <= 0;
- else
- W_rf_ecc_recoverable_valid <= E_rf_ecc_recoverable_valid;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W1_rf_ecc_recoverable_valid <= 0;
- else
- W1_rf_ecc_recoverable_valid <= W_rf_ecc_recoverable_valid;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_rf_ecc_unrecoverable_valid <= 0;
- else
- W_rf_ecc_unrecoverable_valid <= E_rf_ecc_unrecoverable_valid & ~E_rf_ecc_recoverable_valid;
- end
- assign R_rf_a = R_rf_a_q;
- assign R_rf_b = R_rf_b_q;
- assign W_rf_wren = (R_wr_dst_reg & W_valid) | W_rf_ecc_valid_any | ~reset_n;
- assign W_rf_wr_data = R_ctrl_ld ? av_ld_data_aligned_filtered : W_wr_data;
- //nios2_uc_nios2_cpu_register_bank_a, which is an nios_sdp_ram
- nios2_uc_nios2_cpu_register_bank_a_module nios2_uc_nios2_cpu_register_bank_a
- (
- .clock (clk),
- .data (W_rf_wr_data),
- .q (R_rf_a_q),
- .rdaddress (D_iw_a),
- .wraddress (W_dst_regnum),
- .wren (W_rf_wren)
- );
- //synthesis translate_off
- `ifdef NO_PLI
- defparam nios2_uc_nios2_cpu_register_bank_a.lpm_file = "nios2_uc_nios2_cpu_rf_ram_a.dat";
- `else
- defparam nios2_uc_nios2_cpu_register_bank_a.lpm_file = "nios2_uc_nios2_cpu_rf_ram_a.hex";
- `endif
- //synthesis translate_on
- //nios2_uc_nios2_cpu_register_bank_b, which is an nios_sdp_ram
- nios2_uc_nios2_cpu_register_bank_b_module nios2_uc_nios2_cpu_register_bank_b
- (
- .clock (clk),
- .data (W_rf_wr_data),
- .q (R_rf_b_q),
- .rdaddress (D_iw_b),
- .wraddress (W_dst_regnum),
- .wren (W_rf_wren)
- );
- //synthesis translate_off
- `ifdef NO_PLI
- defparam nios2_uc_nios2_cpu_register_bank_b.lpm_file = "nios2_uc_nios2_cpu_rf_ram_b.dat";
- `else
- defparam nios2_uc_nios2_cpu_register_bank_b.lpm_file = "nios2_uc_nios2_cpu_rf_ram_b.hex";
- `endif
- //synthesis translate_on
- assign R_src1 = (((R_ctrl_br & E_valid_from_R) | (R_ctrl_retaddr & R_valid)))? {F_pc_plus_one, 2'b00} :
- ((R_ctrl_jmp_direct & E_valid_from_R))? {D_jmp_direct_target_waddr, 2'b00} :
- R_rf_a;
- assign R_src2_lo = ((R_ctrl_force_src2_zero|R_ctrl_hi_imm16))? {16 {D_ctrl_set_src2_rem_imm}} :
- (R_ctrl_src_imm5_shift_rot)? {{11 {1'b0}},D_iw_imm5} :
- (R_src2_use_imm)? D_iw_imm16 :
- R_rf_b[15 : 0];
- assign R_src2_hi = ((R_ctrl_force_src2_zero|R_ctrl_unsigned_lo_imm16))? {16 {D_ctrl_set_src2_rem_imm}} :
- (R_ctrl_hi_imm16)? D_iw_imm16 :
- (R_src2_use_imm)? {16 {D_iw_imm16[15]}} :
- R_rf_b[31 : 16];
- assign R_src2 = {R_src2_hi, R_src2_lo};
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_valid_from_R <= 0;
- else
- E_valid_from_R <= R_valid | E_stall;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_new_inst <= 0;
- else
- E_new_inst <= R_valid;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_src1 <= 0;
- else
- E_src1 <= R_src1;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_src2 <= 0;
- else
- E_src2 <= R_src2;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_invert_arith_src_msb <= 0;
- else
- E_invert_arith_src_msb <= D_ctrl_alu_signed_comparison & R_valid;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_alu_sub <= 0;
- else
- E_alu_sub <= D_ctrl_alu_subtract & R_valid;
- end
- assign E_valid = E_valid_from_R & ~E_rf_ecc_valid_any;
- assign E_stall = (E_shift_rot_stall | E_ld_stall | E_st_stall | E_ci_multi_stall) & ~(E_rf_ecc_valid_any|W_rf_ecc_valid_any|W1_rf_ecc_recoverable_valid);
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_ci_multi_start <= 0;
- else
- E_ci_multi_start <= E_ci_multi_start ? 1'b0 :
- (R_ctrl_custom_multi & R_valid);
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_ci_multi_clk_en <= 0;
- else
- E_ci_multi_clk_en <= E_ci_multi_clk_en ? ~E_ci_multi_done :
- (R_ctrl_custom_multi & R_valid);
- end
- assign E_ci_multi_stall = R_ctrl_custom_multi & E_valid & ~E_ci_multi_done;
- assign E_arith_src1 = { E_src1[31] ^ E_invert_arith_src_msb,
- E_src1[30 : 0]};
- assign E_arith_src2 = { E_src2[31] ^ E_invert_arith_src_msb,
- E_src2[30 : 0]};
- assign E_arith_result = E_alu_sub ?
- E_arith_src1 - E_arith_src2 :
- E_arith_src1 + E_arith_src2;
- assign E_mem_baddr = E_arith_result[19 : 0];
- assign E_logic_result = (R_logic_op == 2'b00)? (~(E_src1 | E_src2)) :
- (R_logic_op == 2'b01)? (E_src1 & E_src2) :
- (R_logic_op == 2'b10)? (E_src1 | E_src2) :
- (E_src1 ^ E_src2);
- assign E_logic_result_is_0 = E_logic_result == 0;
- assign E_eq = E_logic_result_is_0;
- assign E_lt = E_arith_result[32];
- assign E_cmp_result = (R_compare_op == 2'b00)? E_eq :
- (R_compare_op == 2'b01)? ~E_lt :
- (R_compare_op == 2'b10)? E_lt :
- ~E_eq;
- assign E_shift_rot_shfcnt = E_src2[4 : 0];
- assign E_shift_rot_cnt_nxt = E_new_inst ? E_shift_rot_shfcnt : E_shift_rot_cnt-1;
- assign E_shift_rot_done = (E_shift_rot_cnt == 0) & ~E_new_inst;
- assign E_shift_rot_stall = R_ctrl_shift_rot & E_valid & ~E_shift_rot_done;
- assign E_shift_rot_fill_bit = R_ctrl_shift_logical ? 1'b0 :
- (R_ctrl_rot_right ? E_shift_rot_result[0] :
- E_shift_rot_result[31]);
- assign E_shift_rot_result_nxt = (E_new_inst)? E_src1 :
- (R_ctrl_shift_rot_right)? {E_shift_rot_fill_bit, E_shift_rot_result[31 : 1]} :
- {E_shift_rot_result[30 : 0], E_shift_rot_fill_bit};
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_shift_rot_result <= 0;
- else
- E_shift_rot_result <= E_shift_rot_result_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- E_shift_rot_cnt <= 0;
- else
- E_shift_rot_cnt <= E_shift_rot_cnt_nxt;
- end
- assign E_control_rd_data = (D_iw_control_regnum == 5'd0)? W_status_reg :
- (D_iw_control_regnum == 5'd1)? W_estatus_reg :
- (D_iw_control_regnum == 5'd2)? W_bstatus_reg :
- (D_iw_control_regnum == 5'd3)? W_ienable_reg :
- (D_iw_control_regnum == 5'd4)? W_ipending_reg :
- (D_iw_control_regnum == 5'd5)? W_cpuid_reg :
- W_cdsr_reg;
- assign E_alu_result = ((R_ctrl_br_cmp | R_ctrl_rd_ctl_reg))? 0 :
- (R_ctrl_shift_rot)? E_shift_rot_result :
- (R_ctrl_logic)? E_logic_result :
- (R_ctrl_custom)? E_ci_result :
- E_arith_result;
- assign R_sth_data = R_rf_b[15 : 0];
- assign R_stw_data = R_rf_b[31 : 0];
- assign R_stb_data = R_rf_b[7 : 0];
- assign E_st_data = (D_ctrl_mem8)? {R_stb_data, R_stb_data, R_stb_data, R_stb_data} :
- (D_ctrl_mem16)? {R_sth_data, R_sth_data} :
- R_stw_data;
- assign E_mem_byte_en = ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b01, 2'b00})? 4'b0001 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b01, 2'b01})? 4'b0010 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b01, 2'b10})? 4'b0100 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b01, 2'b11})? 4'b1000 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b10, 2'b00})? 4'b0011 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b10, 2'b01})? 4'b0011 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b10, 2'b10})? 4'b1100 :
- ({D_ctrl_mem16, D_ctrl_mem8, E_mem_baddr[1 : 0]} == {2'b10, 2'b11})? 4'b1100 :
- 4'b1111;
- assign d_read_nxt = (R_ctrl_ld & E_new_inst & ~E_rf_ecc_valid_any) | (d_read & d_waitrequest);
- assign E_ld_stall = R_ctrl_ld & ((E_valid & ~av_ld_done) | E_new_inst);
- assign d_write_nxt = ((R_ctrl_st & (~R_ctrl_st_ex | W_up_ex_mon_state)) & E_new_inst & ~E_rf_ecc_valid_any) | (d_write & d_waitrequest);
- assign E_st_stall = d_write_nxt;
- assign d_address = W_mem_baddr;
- assign av_ld_getting_data = d_read & ~d_waitrequest;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- d_read <= 0;
- else
- d_read <= d_read_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- d_writedata <= 0;
- else
- d_writedata <= E_st_data;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- d_byteenable <= 0;
- else
- d_byteenable <= E_mem_byte_en;
- end
- assign av_ld_align_cycle_nxt = av_ld_getting_data ? 0 : (av_ld_align_cycle+1);
- assign av_ld_align_one_more_cycle = av_ld_align_cycle == (D_ctrl_mem16 ? 2 : 3);
- assign av_ld_aligning_data_nxt = av_ld_aligning_data ?
- ~av_ld_align_one_more_cycle :
- (~D_ctrl_mem32 & av_ld_getting_data);
- assign av_ld_waiting_for_data_nxt = av_ld_waiting_for_data ?
- ~av_ld_getting_data :
- (R_ctrl_ld & E_new_inst);
- assign av_ld_done = ~av_ld_waiting_for_data_nxt & (D_ctrl_mem32 | ~av_ld_aligning_data_nxt);
- assign av_ld_rshift8 = av_ld_aligning_data &
- (av_ld_align_cycle < (W_mem_baddr[1 : 0]));
- assign av_ld_extend = av_ld_aligning_data;
- assign av_ld_byte0_data_nxt = av_ld_rshift8 ? av_ld_byte1_data :
- av_ld_extend ? av_ld_byte0_data :d_readdata[7 : 0];
- assign av_ld_byte1_data_nxt = av_ld_rshift8 ? av_ld_byte2_data :
- av_ld_extend ? {8 {av_fill_bit}} :d_readdata[15 : 8];
- assign av_ld_byte2_data_nxt = av_ld_rshift8 ? av_ld_byte3_data :
- av_ld_extend ? {8 {av_fill_bit}} :d_readdata[23 : 16];
- assign av_ld_byte3_data_nxt = av_ld_rshift8 ? av_ld_byte3_data :
- av_ld_extend ? {8 {av_fill_bit}} :d_readdata[31 : 24];
- assign av_ld_byte1_data_en = ~(av_ld_extend & D_ctrl_mem16 & ~av_ld_rshift8);
- assign av_ld_data_aligned_unfiltered = {av_ld_byte3_data, av_ld_byte2_data,
- av_ld_byte1_data, av_ld_byte0_data};
- assign av_sign_bit = D_ctrl_mem16 ? av_ld_byte1_data[7] : av_ld_byte0_data[7];
- assign av_fill_bit = av_sign_bit & R_ctrl_ld_signed;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_align_cycle <= 0;
- else
- av_ld_align_cycle <= av_ld_align_cycle_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_waiting_for_data <= 0;
- else
- av_ld_waiting_for_data <= av_ld_waiting_for_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_aligning_data <= 0;
- else
- av_ld_aligning_data <= av_ld_aligning_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_byte0_data <= 0;
- else
- av_ld_byte0_data <= av_ld_byte0_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_byte1_data <= 0;
- else if (av_ld_byte1_data_en)
- av_ld_byte1_data <= av_ld_byte1_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_byte2_data <= 0;
- else
- av_ld_byte2_data <= av_ld_byte2_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- av_ld_byte3_data <= 0;
- else
- av_ld_byte3_data <= av_ld_byte3_data_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_up_ex_mon_state <= 0;
- else if (R_en)
- W_up_ex_mon_state <= (R_ctrl_ld_ex & W_valid) ? 1'b1 :
- ((D_op_eret & W_valid) | (R_ctrl_st_ex & W_valid)) ? 1'b0 :
- W_up_ex_mon_state;
- end
- assign W_valid_from_M = W_valid;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_valid <= 0;
- else
- W_valid <= E_valid & ~E_stall;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- A_valid_from_M <= 0;
- else
- A_valid_from_M <= E_valid & ~E_stall;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_control_rd_data <= 0;
- else
- W_control_rd_data <= D_ctrl_intr_inst ? W_status_reg : E_control_rd_data;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_cmp_result <= 0;
- else
- W_cmp_result <= E_cmp_result;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_alu_result <= 0;
- else
- W_alu_result <= E_alu_result;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_status_reg_pie <= 0;
- else
- W_status_reg_pie <= W_status_reg_pie_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_estatus_reg <= 0;
- else
- W_estatus_reg <= W_estatus_reg_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_bstatus_reg <= 0;
- else
- W_bstatus_reg <= W_bstatus_reg_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_ienable_reg <= 0;
- else
- W_ienable_reg <= W_ienable_reg_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_ipending_reg <= 0;
- else
- W_ipending_reg <= W_ipending_reg_nxt;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- W_cdsr_reg <= 0;
- else
- W_cdsr_reg <= 0;
- end
- assign W_cpuid_reg = 0;
- assign W_wr_data_non_zero = R_ctrl_br_cmp ? W_cmp_result :
- R_ctrl_rd_ctl_reg ? W_control_rd_data :
- W_alu_result[31 : 0];
- assign W_wr_data = W_wr_data_non_zero;
- assign W_br_taken = R_ctrl_br_uncond | (R_ctrl_br & W_cmp_result);
- assign W_mem_baddr = W_alu_result[19 : 0];
- assign W_status_reg = W_status_reg_pie;
- assign E_wrctl_status = R_ctrl_wrctl_inst &
- (D_iw_control_regnum == 5'd0);
- assign E_wrctl_estatus = R_ctrl_wrctl_inst &
- (D_iw_control_regnum == 5'd1);
- assign E_wrctl_bstatus = R_ctrl_wrctl_inst &
- (D_iw_control_regnum == 5'd2);
- assign E_wrctl_ienable = R_ctrl_wrctl_inst &
- (D_iw_control_regnum == 5'd3);
- assign W_status_reg_pie_inst_nxt = (R_ctrl_exception | R_ctrl_break | R_ctrl_crst | W_rf_ecc_unrecoverable_valid) ? 1'b0 :
- (D_op_eret) ? W_estatus_reg :
- (D_op_bret) ? W_bstatus_reg :
- (E_wrctl_status) ? E_src1[0] :
- W_status_reg_pie;
- assign W_status_reg_pie_nxt = E_valid ? W_status_reg_pie_inst_nxt : W_status_reg_pie;
- assign W_estatus_reg_inst_nxt = (R_ctrl_crst) ? 0 :
- (R_ctrl_exception|W_rf_ecc_unrecoverable_valid) ? W_status_reg :
- (E_wrctl_estatus) ? E_src1[0] :
- W_estatus_reg;
- assign W_estatus_reg_nxt = E_valid ? W_estatus_reg_inst_nxt : W_estatus_reg;
- assign W_bstatus_reg_inst_nxt = (R_ctrl_break) ? W_status_reg :
- (E_wrctl_bstatus) ? E_src1[0] :
- W_bstatus_reg;
- assign W_bstatus_reg_nxt = E_valid ? W_bstatus_reg_inst_nxt : W_bstatus_reg;
- assign W_ienable_reg_nxt = ((E_wrctl_ienable & E_valid) ?
- E_src1[31 : 0] : W_ienable_reg) & 32'b00000000000000000000000000000001;
- assign W_ipending_reg_nxt = iactive & W_ienable_reg & oci_ienable & 32'b00000000000000000000000000000001;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- hbreak_enabled <= 1'b1;
- else if (E_valid)
- hbreak_enabled <= R_ctrl_break ? 1'b0 : D_op_bret ? 1'b1 : hbreak_enabled;
- end
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- d_write <= 0;
- else
- d_write <= d_write_nxt;
- end
- nios2_uc_nios2_cpu_nios2_oci the_nios2_uc_nios2_cpu_nios2_oci
- (
- .D_valid (D_valid),
- .E_st_data (E_st_data),
- .E_valid (E_valid),
- .F_pc (F_pc),
- .address_nxt (debug_mem_slave_address),
- .av_ld_data_aligned_filtered (av_ld_data_aligned_filtered),
- .byteenable_nxt (debug_mem_slave_byteenable),
- .clk (debug_mem_slave_clk),
- .d_address (d_address),
- .d_read (d_read),
- .d_waitrequest (d_waitrequest),
- .d_write (d_write),
- .debug_mem_slave_debugaccess_to_roms (debug_mem_slave_debugaccess_to_roms),
- .debugaccess_nxt (debug_mem_slave_debugaccess),
- .hbreak_enabled (hbreak_enabled),
- .oci_hbreak_req (oci_hbreak_req),
- .oci_ienable (oci_ienable),
- .oci_single_step_mode (oci_single_step_mode),
- .read_nxt (debug_mem_slave_read),
- .readdata (debug_mem_slave_readdata),
- .reset (debug_mem_slave_reset),
- .reset_n (reset_n),
- .reset_req (reset_req),
- .resetrequest (debug_reset_request),
- .waitrequest (debug_mem_slave_waitrequest),
- .write_nxt (debug_mem_slave_write),
- .writedata_nxt (debug_mem_slave_writedata)
- );
- //debug_mem_slave, which is an e_avalon_slave
- assign debug_mem_slave_clk = clk;
- assign debug_mem_slave_reset = ~reset_n;
- assign D_ctrl_custom = D_op_nios_custom_instr_floating_point_0;
- assign R_ctrl_custom_nxt = D_ctrl_custom;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_custom <= 0;
- else if (R_en)
- R_ctrl_custom <= R_ctrl_custom_nxt;
- end
- assign D_ctrl_custom_multi = D_op_nios_custom_instr_floating_point_0;
- assign R_ctrl_custom_multi_nxt = D_ctrl_custom_multi;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_custom_multi <= 0;
- else if (R_en)
- R_ctrl_custom_multi <= R_ctrl_custom_multi_nxt;
- end
- assign D_ctrl_jmp_indirect = D_op_eret|D_op_bret|D_op_ret|D_op_jmp|D_op_callr;
- assign R_ctrl_jmp_indirect_nxt = D_ctrl_jmp_indirect;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_jmp_indirect <= 0;
- else if (R_en)
- R_ctrl_jmp_indirect <= R_ctrl_jmp_indirect_nxt;
- end
- assign D_ctrl_jmp_direct = D_op_call|D_op_jmpi;
- assign R_ctrl_jmp_direct_nxt = D_ctrl_jmp_direct;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_jmp_direct <= 0;
- else if (R_en)
- R_ctrl_jmp_direct <= R_ctrl_jmp_direct_nxt;
- end
- assign D_ctrl_implicit_dst_retaddr = D_op_call;
- assign R_ctrl_implicit_dst_retaddr_nxt = D_ctrl_implicit_dst_retaddr;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_implicit_dst_retaddr <= 0;
- else if (R_en)
- R_ctrl_implicit_dst_retaddr <= R_ctrl_implicit_dst_retaddr_nxt;
- end
- assign D_ctrl_implicit_dst_eretaddr = D_op_div|
- D_op_divu|
- D_op_mul|
- D_op_muli|
- D_op_mulxss|
- D_op_mulxsu|
- D_op_mulxuu|
- D_op_crst|
- D_op_ldl|
- D_op_op_rsv02|
- D_op_op_rsv09|
- D_op_op_rsv10|
- D_op_op_rsv17|
- D_op_op_rsv18|
- D_op_op_rsv25|
- D_op_op_rsv26|
- D_op_op_rsv33|
- D_op_op_rsv34|
- D_op_op_rsv41|
- D_op_op_rsv42|
- D_op_op_rsv49|
- D_op_op_rsv57|
- D_op_op_rsv61|
- D_op_op_rsv62|
- D_op_op_rsv63|
- D_op_opx_rsv00|
- D_op_opx_rsv10|
- D_op_opx_rsv15|
- D_op_opx_rsv17|
- D_op_opx_rsv21|
- D_op_opx_rsv25|
- D_op_opx_rsv33|
- D_op_opx_rsv34|
- D_op_opx_rsv35|
- D_op_opx_rsv42|
- D_op_opx_rsv43|
- D_op_opx_rsv44|
- D_op_opx_rsv47|
- D_op_opx_rsv50|
- D_op_opx_rsv51|
- D_op_opx_rsv55|
- D_op_opx_rsv56|
- D_op_opx_rsv60|
- D_op_opx_rsv63|
- D_op_rdprs|
- D_op_stc|
- D_op_wrprs;
- assign R_ctrl_implicit_dst_eretaddr_nxt = D_ctrl_implicit_dst_eretaddr;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_implicit_dst_eretaddr <= 0;
- else if (R_en)
- R_ctrl_implicit_dst_eretaddr <= R_ctrl_implicit_dst_eretaddr_nxt;
- end
- assign D_ctrl_exception = D_op_trap|
- D_op_opx_rsv44|
- D_op_div|
- D_op_divu|
- D_op_mul|
- D_op_muli|
- D_op_mulxss|
- D_op_mulxsu|
- D_op_mulxuu|
- D_op_crst|
- D_op_ldl|
- D_op_op_rsv02|
- D_op_op_rsv09|
- D_op_op_rsv10|
- D_op_op_rsv17|
- D_op_op_rsv18|
- D_op_op_rsv25|
- D_op_op_rsv26|
- D_op_op_rsv33|
- D_op_op_rsv34|
- D_op_op_rsv41|
- D_op_op_rsv42|
- D_op_op_rsv49|
- D_op_op_rsv57|
- D_op_op_rsv61|
- D_op_op_rsv62|
- D_op_op_rsv63|
- D_op_opx_rsv00|
- D_op_opx_rsv10|
- D_op_opx_rsv15|
- D_op_opx_rsv17|
- D_op_opx_rsv21|
- D_op_opx_rsv25|
- D_op_opx_rsv33|
- D_op_opx_rsv34|
- D_op_opx_rsv35|
- D_op_opx_rsv42|
- D_op_opx_rsv43|
- D_op_opx_rsv47|
- D_op_opx_rsv50|
- D_op_opx_rsv51|
- D_op_opx_rsv55|
- D_op_opx_rsv56|
- D_op_opx_rsv60|
- D_op_opx_rsv63|
- D_op_rdprs|
- D_op_stc|
- D_op_wrprs|
- D_op_intr;
- assign R_ctrl_exception_nxt = D_ctrl_exception;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_exception <= 0;
- else if (R_en)
- R_ctrl_exception <= R_ctrl_exception_nxt;
- end
- assign D_ctrl_break = D_op_break|D_op_hbreak;
- assign R_ctrl_break_nxt = D_ctrl_break;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_break <= 0;
- else if (R_en)
- R_ctrl_break <= R_ctrl_break_nxt;
- end
- assign D_ctrl_crst = 1'b0;
- assign R_ctrl_crst_nxt = D_ctrl_crst;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_crst <= 0;
- else if (R_en)
- R_ctrl_crst <= R_ctrl_crst_nxt;
- end
- assign D_ctrl_rd_ctl_reg = D_op_rdctl;
- assign R_ctrl_rd_ctl_reg_nxt = D_ctrl_rd_ctl_reg;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_rd_ctl_reg <= 0;
- else if (R_en)
- R_ctrl_rd_ctl_reg <= R_ctrl_rd_ctl_reg_nxt;
- end
- assign D_ctrl_uncond_cti_non_br = D_op_call|D_op_jmpi|D_op_eret|D_op_bret|D_op_ret|D_op_jmp|D_op_callr;
- assign R_ctrl_uncond_cti_non_br_nxt = D_ctrl_uncond_cti_non_br;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_uncond_cti_non_br <= 0;
- else if (R_en)
- R_ctrl_uncond_cti_non_br <= R_ctrl_uncond_cti_non_br_nxt;
- end
- assign D_ctrl_retaddr = D_op_call|
- D_op_op_rsv02|
- D_op_nextpc|
- D_op_callr|
- D_op_trap|
- D_op_opx_rsv44|
- D_op_div|
- D_op_divu|
- D_op_mul|
- D_op_muli|
- D_op_mulxss|
- D_op_mulxsu|
- D_op_mulxuu|
- D_op_crst|
- D_op_ldl|
- D_op_op_rsv09|
- D_op_op_rsv10|
- D_op_op_rsv17|
- D_op_op_rsv18|
- D_op_op_rsv25|
- D_op_op_rsv26|
- D_op_op_rsv33|
- D_op_op_rsv34|
- D_op_op_rsv41|
- D_op_op_rsv42|
- D_op_op_rsv49|
- D_op_op_rsv57|
- D_op_op_rsv61|
- D_op_op_rsv62|
- D_op_op_rsv63|
- D_op_opx_rsv00|
- D_op_opx_rsv10|
- D_op_opx_rsv15|
- D_op_opx_rsv17|
- D_op_opx_rsv21|
- D_op_opx_rsv25|
- D_op_opx_rsv33|
- D_op_opx_rsv34|
- D_op_opx_rsv35|
- D_op_opx_rsv42|
- D_op_opx_rsv43|
- D_op_opx_rsv47|
- D_op_opx_rsv50|
- D_op_opx_rsv51|
- D_op_opx_rsv55|
- D_op_opx_rsv56|
- D_op_opx_rsv60|
- D_op_opx_rsv63|
- D_op_rdprs|
- D_op_stc|
- D_op_wrprs|
- D_op_intr|
- D_op_break|
- D_op_hbreak;
- assign R_ctrl_retaddr_nxt = D_ctrl_retaddr;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_retaddr <= 0;
- else if (R_en)
- R_ctrl_retaddr <= R_ctrl_retaddr_nxt;
- end
- assign D_ctrl_shift_logical = D_op_slli|D_op_sll|D_op_srli|D_op_srl;
- assign R_ctrl_shift_logical_nxt = D_ctrl_shift_logical;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_shift_logical <= 0;
- else if (R_en)
- R_ctrl_shift_logical <= R_ctrl_shift_logical_nxt;
- end
- assign D_ctrl_shift_right_arith = D_op_srai|D_op_sra;
- assign R_ctrl_shift_right_arith_nxt = D_ctrl_shift_right_arith;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_shift_right_arith <= 0;
- else if (R_en)
- R_ctrl_shift_right_arith <= R_ctrl_shift_right_arith_nxt;
- end
- assign D_ctrl_rot_right = D_op_ror;
- assign R_ctrl_rot_right_nxt = D_ctrl_rot_right;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_rot_right <= 0;
- else if (R_en)
- R_ctrl_rot_right <= R_ctrl_rot_right_nxt;
- end
- assign D_ctrl_shift_rot_right = D_op_srli|D_op_srl|D_op_srai|D_op_sra|D_op_ror;
- assign R_ctrl_shift_rot_right_nxt = D_ctrl_shift_rot_right;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_shift_rot_right <= 0;
- else if (R_en)
- R_ctrl_shift_rot_right <= R_ctrl_shift_rot_right_nxt;
- end
- assign D_ctrl_shift_rot = D_op_slli|
- D_op_sll|
- D_op_roli|
- D_op_rol|
- D_op_srli|
- D_op_srl|
- D_op_srai|
- D_op_sra|
- D_op_ror;
- assign R_ctrl_shift_rot_nxt = D_ctrl_shift_rot;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_shift_rot <= 0;
- else if (R_en)
- R_ctrl_shift_rot <= R_ctrl_shift_rot_nxt;
- end
- assign D_ctrl_logic = D_op_and|
- D_op_or|
- D_op_xor|
- D_op_nor|
- D_op_andhi|
- D_op_orhi|
- D_op_xorhi|
- D_op_andi|
- D_op_ori|
- D_op_xori;
- assign R_ctrl_logic_nxt = D_ctrl_logic;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_logic <= 0;
- else if (R_en)
- R_ctrl_logic <= R_ctrl_logic_nxt;
- end
- assign D_ctrl_hi_imm16 = D_op_andhi|D_op_orhi|D_op_xorhi;
- assign R_ctrl_hi_imm16_nxt = D_ctrl_hi_imm16;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_hi_imm16 <= 0;
- else if (R_en)
- R_ctrl_hi_imm16 <= R_ctrl_hi_imm16_nxt;
- end
- assign D_ctrl_set_src2_rem_imm = 1'b0;
- assign R_ctrl_set_src2_rem_imm_nxt = D_ctrl_set_src2_rem_imm;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_set_src2_rem_imm <= 0;
- else if (R_en)
- R_ctrl_set_src2_rem_imm <= R_ctrl_set_src2_rem_imm_nxt;
- end
- assign D_ctrl_unsigned_lo_imm16 = D_op_cmpgeui|
- D_op_cmpltui|
- D_op_andi|
- D_op_ori|
- D_op_xori|
- D_op_roli|
- D_op_slli|
- D_op_srli|
- D_op_srai;
- assign R_ctrl_unsigned_lo_imm16_nxt = D_ctrl_unsigned_lo_imm16;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_unsigned_lo_imm16 <= 0;
- else if (R_en)
- R_ctrl_unsigned_lo_imm16 <= R_ctrl_unsigned_lo_imm16_nxt;
- end
- assign D_ctrl_signed_imm12 = 1'b0;
- assign R_ctrl_signed_imm12_nxt = D_ctrl_signed_imm12;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_signed_imm12 <= 0;
- else if (R_en)
- R_ctrl_signed_imm12 <= R_ctrl_signed_imm12_nxt;
- end
- assign D_ctrl_src_imm5_shift_rot = D_op_roli|D_op_slli|D_op_srli|D_op_srai;
- assign R_ctrl_src_imm5_shift_rot_nxt = D_ctrl_src_imm5_shift_rot;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_src_imm5_shift_rot <= 0;
- else if (R_en)
- R_ctrl_src_imm5_shift_rot <= R_ctrl_src_imm5_shift_rot_nxt;
- end
- assign D_ctrl_br_uncond = D_op_br;
- assign R_ctrl_br_uncond_nxt = D_ctrl_br_uncond;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_br_uncond <= 0;
- else if (R_en)
- R_ctrl_br_uncond <= R_ctrl_br_uncond_nxt;
- end
- assign D_ctrl_br = D_op_br|D_op_bge|D_op_blt|D_op_bne|D_op_beq|D_op_bgeu|D_op_bltu;
- assign R_ctrl_br_nxt = D_ctrl_br;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_br <= 0;
- else if (R_en)
- R_ctrl_br <= R_ctrl_br_nxt;
- end
- assign D_ctrl_alu_subtract = D_op_sub|
- D_op_cmplti|
- D_op_cmpltui|
- D_op_cmplt|
- D_op_cmpltu|
- D_op_blt|
- D_op_bltu|
- D_op_cmpgei|
- D_op_cmpgeui|
- D_op_cmpge|
- D_op_cmpgeu|
- D_op_bge|
- D_op_bgeu;
- assign R_ctrl_alu_subtract_nxt = D_ctrl_alu_subtract;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_alu_subtract <= 0;
- else if (R_en)
- R_ctrl_alu_subtract <= R_ctrl_alu_subtract_nxt;
- end
- assign D_ctrl_alu_signed_comparison = D_op_cmpge|D_op_cmpgei|D_op_cmplt|D_op_cmplti|D_op_bge|D_op_blt;
- assign R_ctrl_alu_signed_comparison_nxt = D_ctrl_alu_signed_comparison;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_alu_signed_comparison <= 0;
- else if (R_en)
- R_ctrl_alu_signed_comparison <= R_ctrl_alu_signed_comparison_nxt;
- end
- assign D_ctrl_br_cmp = D_op_br|
- D_op_bge|
- D_op_blt|
- D_op_bne|
- D_op_beq|
- D_op_bgeu|
- D_op_bltu|
- D_op_cmpgei|
- D_op_cmplti|
- D_op_cmpnei|
- D_op_cmpgeui|
- D_op_cmpltui|
- D_op_cmpeqi|
- D_op_cmpge|
- D_op_cmplt|
- D_op_cmpne|
- D_op_cmpgeu|
- D_op_cmpltu|
- D_op_cmpeq;
- assign R_ctrl_br_cmp_nxt = D_ctrl_br_cmp;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_br_cmp <= 0;
- else if (R_en)
- R_ctrl_br_cmp <= R_ctrl_br_cmp_nxt;
- end
- assign D_ctrl_ld_signed = D_op_ldb|D_op_ldh|D_op_ldw|D_op_ldbio|D_op_ldhio|D_op_ldwio;
- assign R_ctrl_ld_signed_nxt = D_ctrl_ld_signed;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld_signed <= 0;
- else if (R_en)
- R_ctrl_ld_signed <= R_ctrl_ld_signed_nxt;
- end
- assign D_ctrl_ld = D_op_ldb|
- D_op_ldh|
- D_op_ldw|
- D_op_ldbio|
- D_op_ldhio|
- D_op_ldwio|
- D_op_ldbu|
- D_op_ldhu|
- D_op_ldbuio|
- D_op_ldhuio;
- assign R_ctrl_ld_nxt = D_ctrl_ld;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld <= 0;
- else if (R_en)
- R_ctrl_ld <= R_ctrl_ld_nxt;
- end
- assign D_ctrl_ld_ex = 1'b0;
- assign R_ctrl_ld_ex_nxt = D_ctrl_ld_ex;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld_ex <= 0;
- else if (R_en)
- R_ctrl_ld_ex <= R_ctrl_ld_ex_nxt;
- end
- assign D_ctrl_ld_non_io = D_op_ldbu|D_op_ldhu|D_op_ldb|D_op_ldh|D_op_ldw;
- assign R_ctrl_ld_non_io_nxt = D_ctrl_ld_non_io;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld_non_io <= 0;
- else if (R_en)
- R_ctrl_ld_non_io <= R_ctrl_ld_non_io_nxt;
- end
- assign D_ctrl_st_ex = 1'b0;
- assign R_ctrl_st_ex_nxt = D_ctrl_st_ex;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_st_ex <= 0;
- else if (R_en)
- R_ctrl_st_ex <= R_ctrl_st_ex_nxt;
- end
- assign D_ctrl_st = D_op_stb|D_op_sth|D_op_stw|D_op_stbio|D_op_sthio|D_op_stwio;
- assign R_ctrl_st_nxt = D_ctrl_st;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_st <= 0;
- else if (R_en)
- R_ctrl_st <= R_ctrl_st_nxt;
- end
- assign D_ctrl_ld_st_ex = 1'b0;
- assign R_ctrl_ld_st_ex_nxt = D_ctrl_ld_st_ex;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld_st_ex <= 0;
- else if (R_en)
- R_ctrl_ld_st_ex <= R_ctrl_ld_st_ex_nxt;
- end
- assign D_ctrl_mem8 = D_op_ldb|D_op_ldbu|D_op_ldbio|D_op_ldbuio|D_op_stb|D_op_stbio;
- assign R_ctrl_mem8_nxt = D_ctrl_mem8;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_mem8 <= 0;
- else if (R_en)
- R_ctrl_mem8 <= R_ctrl_mem8_nxt;
- end
- assign D_ctrl_mem16 = D_op_ldhu|D_op_ldh|D_op_ldhio|D_op_ldhuio|D_op_sth|D_op_sthio;
- assign R_ctrl_mem16_nxt = D_ctrl_mem16;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_mem16 <= 0;
- else if (R_en)
- R_ctrl_mem16 <= R_ctrl_mem16_nxt;
- end
- assign D_ctrl_mem32 = D_op_ldw|D_op_ldwio|D_op_stw|D_op_stwio;
- assign R_ctrl_mem32_nxt = D_ctrl_mem32;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_mem32 <= 0;
- else if (R_en)
- R_ctrl_mem32 <= R_ctrl_mem32_nxt;
- end
- assign D_ctrl_ld_io = D_op_ldbuio|D_op_ldhuio|D_op_ldbio|D_op_ldhio|D_op_ldwio;
- assign R_ctrl_ld_io_nxt = D_ctrl_ld_io;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ld_io <= 0;
- else if (R_en)
- R_ctrl_ld_io <= R_ctrl_ld_io_nxt;
- end
- assign D_ctrl_b_is_dst = (D_op_addi|
- D_op_andhi|
- D_op_orhi|
- D_op_xorhi|
- D_op_andi|
- D_op_ori|
- D_op_xori|
- D_op_call|
- D_op_cmpgei|
- D_op_cmplti|
- D_op_cmpnei|
- D_op_cmpgeui|
- D_op_cmpltui|
- D_op_cmpeqi|
- D_op_jmpi|
- D_op_ldb|
- D_op_ldh|
- D_op_ldw|
- D_op_ldbio|
- D_op_ldhio|
- D_op_ldwio|
- D_op_ldbu|
- D_op_ldhu|
- D_op_ldbuio|
- D_op_ldhuio|
- D_op_initd|
- D_op_initda|
- D_op_flushd|
- D_op_flushda) & ~D_op_custom;
- assign R_ctrl_b_is_dst_nxt = D_ctrl_b_is_dst;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_b_is_dst <= 0;
- else if (R_en)
- R_ctrl_b_is_dst <= R_ctrl_b_is_dst_nxt;
- end
- assign D_ctrl_ignore_dst = (D_op_br|
- D_op_bge|
- D_op_blt|
- D_op_bne|
- D_op_beq|
- D_op_bgeu|
- D_op_bltu|
- D_op_stb|
- D_op_sth|
- D_op_stw|
- D_op_stbio|
- D_op_sthio|
- D_op_stwio|
- D_op_jmpi) | (D_op_custom & ~D_iw_custom_writerc);
- assign R_ctrl_ignore_dst_nxt = D_ctrl_ignore_dst;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_ignore_dst <= 0;
- else if (R_en)
- R_ctrl_ignore_dst <= R_ctrl_ignore_dst_nxt;
- end
- assign D_ctrl_src2_choose_imm = D_op_addi|
- D_op_andhi|
- D_op_orhi|
- D_op_xorhi|
- D_op_andi|
- D_op_ori|
- D_op_xori|
- D_op_call|
- D_op_cmpgei|
- D_op_cmplti|
- D_op_cmpnei|
- D_op_cmpgeui|
- D_op_cmpltui|
- D_op_cmpeqi|
- D_op_jmpi|
- D_op_ldb|
- D_op_ldh|
- D_op_ldw|
- D_op_ldbio|
- D_op_ldhio|
- D_op_ldwio|
- D_op_ldbu|
- D_op_ldhu|
- D_op_ldbuio|
- D_op_ldhuio|
- D_op_initd|
- D_op_initda|
- D_op_flushd|
- D_op_flushda|
- D_op_stb|
- D_op_sth|
- D_op_stw|
- D_op_stbio|
- D_op_sthio|
- D_op_stwio|
- D_op_roli|
- D_op_slli|
- D_op_srli|
- D_op_srai;
- assign R_ctrl_src2_choose_imm_nxt = D_ctrl_src2_choose_imm;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_src2_choose_imm <= 0;
- else if (R_en)
- R_ctrl_src2_choose_imm <= R_ctrl_src2_choose_imm_nxt;
- end
- assign D_ctrl_wrctl_inst = D_op_wrctl;
- assign R_ctrl_wrctl_inst_nxt = D_ctrl_wrctl_inst;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_wrctl_inst <= 0;
- else if (R_en)
- R_ctrl_wrctl_inst <= R_ctrl_wrctl_inst_nxt;
- end
- assign D_ctrl_intr_inst = 1'b0;
- assign R_ctrl_intr_inst_nxt = D_ctrl_intr_inst;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_intr_inst <= 0;
- else if (R_en)
- R_ctrl_intr_inst <= R_ctrl_intr_inst_nxt;
- end
- assign D_ctrl_force_src2_zero = D_op_call|
- D_op_op_rsv02|
- D_op_nextpc|
- D_op_callr|
- D_op_trap|
- D_op_opx_rsv44|
- D_op_crst|
- D_op_ldl|
- D_op_op_rsv09|
- D_op_op_rsv10|
- D_op_op_rsv17|
- D_op_op_rsv18|
- D_op_op_rsv25|
- D_op_op_rsv26|
- D_op_op_rsv33|
- D_op_op_rsv34|
- D_op_op_rsv41|
- D_op_op_rsv42|
- D_op_op_rsv49|
- D_op_op_rsv57|
- D_op_op_rsv61|
- D_op_op_rsv62|
- D_op_op_rsv63|
- D_op_opx_rsv00|
- D_op_opx_rsv10|
- D_op_opx_rsv15|
- D_op_opx_rsv17|
- D_op_opx_rsv21|
- D_op_opx_rsv25|
- D_op_opx_rsv33|
- D_op_opx_rsv34|
- D_op_opx_rsv35|
- D_op_opx_rsv42|
- D_op_opx_rsv43|
- D_op_opx_rsv47|
- D_op_opx_rsv50|
- D_op_opx_rsv51|
- D_op_opx_rsv55|
- D_op_opx_rsv56|
- D_op_opx_rsv60|
- D_op_opx_rsv63|
- D_op_rdprs|
- D_op_stc|
- D_op_wrprs|
- D_op_intr|
- D_op_break|
- D_op_hbreak|
- D_op_eret|
- D_op_bret|
- D_op_ret|
- D_op_jmp|
- D_op_jmpi;
- assign R_ctrl_force_src2_zero_nxt = D_ctrl_force_src2_zero;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_force_src2_zero <= 0;
- else if (R_en)
- R_ctrl_force_src2_zero <= R_ctrl_force_src2_zero_nxt;
- end
- assign D_ctrl_alu_force_xor = D_op_cmpgei|
- D_op_cmpgeui|
- D_op_cmpeqi|
- D_op_cmpge|
- D_op_cmpgeu|
- D_op_cmpeq|
- D_op_cmpnei|
- D_op_cmpne|
- D_op_bge|
- D_op_bgeu|
- D_op_beq|
- D_op_bne|
- D_op_br;
- assign R_ctrl_alu_force_xor_nxt = D_ctrl_alu_force_xor;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_alu_force_xor <= 0;
- else if (R_en)
- R_ctrl_alu_force_xor <= R_ctrl_alu_force_xor_nxt;
- end
- assign D_ctrl_alu_force_and = 1'b0;
- assign R_ctrl_alu_force_and_nxt = D_ctrl_alu_force_and;
- always @(posedge clk or negedge reset_n)
- begin
- if (reset_n == 0)
- R_ctrl_alu_force_and <= 0;
- else if (R_en)
- R_ctrl_alu_force_and <= R_ctrl_alu_force_and_nxt;
- end
- //data_master, which is an e_avalon_master
- //instruction_master, which is an e_avalon_master
- //synthesis translate_off
- //////////////// SIMULATION-ONLY CONTENTS
- assign F_inst = (F_op_call)? 272'h20202020202020202020202020202020202020202020202020202020202063616c6c :
- (F_op_jmpi)? 272'h2020202020202020202020202020202020202020202020202020202020206a6d7069 :
- (F_op_ldbu)? 272'h2020202020202020202020202020202020202020202020202020202020206c646275 :
- (F_op_addi)? 272'h20202020202020202020202020202020202020202020202020202020202061646469 :
- (F_op_stb)? 272'h20202020202020202020202020202020202020202020202020202020202020737462 :
- (F_op_br)? 272'h20202020202020202020202020202020202020202020202020202020202020206272 :
- (F_op_ldb)? 272'h202020202020202020202020202020202020202020202020202020202020206c6462 :
- (F_op_cmpgei)? 272'h20202020202020202020202020202020202020202020202020202020636d70676569 :
- (F_op_ldhu)? 272'h2020202020202020202020202020202020202020202020202020202020206c646875 :
- (F_op_andi)? 272'h202020202020202020202020202020202020202020202020202020202020616e6469 :
- (F_op_sth)? 272'h20202020202020202020202020202020202020202020202020202020202020737468 :
- (F_op_bge)? 272'h20202020202020202020202020202020202020202020202020202020202020626765 :
- (F_op_ldh)? 272'h202020202020202020202020202020202020202020202020202020202020206c6468 :
- (F_op_cmplti)? 272'h20202020202020202020202020202020202020202020202020202020636d706c7469 :
- (F_op_initda)? 272'h20202020202020202020202020202020202020202020202020202020696e69746461 :
- (F_op_ori)? 272'h202020202020202020202020202020202020202020202020202020202020206f7269 :
- (F_op_stw)? 272'h20202020202020202020202020202020202020202020202020202020202020737477 :
- (F_op_blt)? 272'h20202020202020202020202020202020202020202020202020202020202020626c74 :
- (F_op_ldw)? 272'h202020202020202020202020202020202020202020202020202020202020206c6477 :
- (F_op_cmpnei)? 272'h20202020202020202020202020202020202020202020202020202020636d706e6569 :
- (F_op_flushda)? 272'h202020202020202020202020202020202020202020202020202020666c7573686461 :
- (F_op_xori)? 272'h202020202020202020202020202020202020202020202020202020202020786f7269 :
- (F_op_bne)? 272'h20202020202020202020202020202020202020202020202020202020202020626e65 :
- (F_op_cmpeqi)? 272'h20202020202020202020202020202020202020202020202020202020636d70657169 :
- (F_op_ldbuio)? 272'h202020202020202020202020202020202020202020202020202020206c646275696f :
- (F_op_muli)? 272'h2020202020202020202020202020202020202020202020202020202020206d756c69 :
- (F_op_stbio)? 272'h2020202020202020202020202020202020202020202020202020202020737462696f :
- (F_op_beq)? 272'h20202020202020202020202020202020202020202020202020202020202020626571 :
- (F_op_ldbio)? 272'h20202020202020202020202020202020202020202020202020202020206c6462696f :
- (F_op_cmpgeui)? 272'h202020202020202020202020202020202020202020202020202020636d7067657569 :
- (F_op_ldhuio)? 272'h202020202020202020202020202020202020202020202020202020206c646875696f :
- (F_op_andhi)? 272'h2020202020202020202020202020202020202020202020202020202020616e646869 :
- (F_op_sthio)? 272'h2020202020202020202020202020202020202020202020202020202020737468696f :
- (F_op_bgeu)? 272'h20202020202020202020202020202020202020202020202020202020202062676575 :
- (F_op_ldhio)? 272'h20202020202020202020202020202020202020202020202020202020206c6468696f :
- (F_op_cmpltui)? 272'h202020202020202020202020202020202020202020202020202020636d706c747569 :
- (F_op_custom)? 272'h20202020202020202020202020202020202020202020202020202020637573746f6d :
- (F_op_initd)? 272'h2020202020202020202020202020202020202020202020202020202020696e697464 :
- (F_op_orhi)? 272'h2020202020202020202020202020202020202020202020202020202020206f726869 :
- (F_op_stwio)? 272'h2020202020202020202020202020202020202020202020202020202020737477696f :
- (F_op_bltu)? 272'h202020202020202020202020202020202020202020202020202020202020626c7475 :
- (F_op_ldwio)? 272'h20202020202020202020202020202020202020202020202020202020206c6477696f :
- (F_op_flushd)? 272'h20202020202020202020202020202020202020202020202020202020666c75736864 :
- (F_op_xorhi)? 272'h2020202020202020202020202020202020202020202020202020202020786f726869 :
- (F_op_eret)? 272'h20202020202020202020202020202020202020202020202020202020202065726574 :
- (F_op_roli)? 272'h202020202020202020202020202020202020202020202020202020202020726f6c69 :
- (F_op_rol)? 272'h20202020202020202020202020202020202020202020202020202020202020726f6c :
- (F_op_flushp)? 272'h20202020202020202020202020202020202020202020202020202020666c75736870 :
- (F_op_ret)? 272'h20202020202020202020202020202020202020202020202020202020202020726574 :
- (F_op_nor)? 272'h202020202020202020202020202020202020202020202020202020202020206e6f72 :
- (F_op_mulxuu)? 272'h202020202020202020202020202020202020202020202020202020206d756c787575 :
- (F_op_cmpge)? 272'h2020202020202020202020202020202020202020202020202020202020636d706765 :
- (F_op_bret)? 272'h20202020202020202020202020202020202020202020202020202020202062726574 :
- (F_op_ror)? 272'h20202020202020202020202020202020202020202020202020202020202020726f72 :
- (F_op_flushi)? 272'h20202020202020202020202020202020202020202020202020202020666c75736869 :
- (F_op_jmp)? 272'h202020202020202020202020202020202020202020202020202020202020206a6d70 :
- (F_op_and)? 272'h20202020202020202020202020202020202020202020202020202020202020616e64 :
- (F_op_cmplt)? 272'h2020202020202020202020202020202020202020202020202020202020636d706c74 :
- (F_op_slli)? 272'h202020202020202020202020202020202020202020202020202020202020736c6c69 :
- (F_op_sll)? 272'h20202020202020202020202020202020202020202020202020202020202020736c6c :
- (F_op_or)? 272'h20202020202020202020202020202020202020202020202020202020202020206f72 :
- (F_op_mulxsu)? 272'h202020202020202020202020202020202020202020202020202020206d756c787375 :
- (F_op_cmpne)? 272'h2020202020202020202020202020202020202020202020202020202020636d706e65 :
- (F_op_srli)? 272'h20202020202020202020202020202020202020202020202020202020202073726c69 :
- (F_op_srl)? 272'h2020202020202020202020202020202020202020202020202020202020202073726c :
- (F_op_nextpc)? 272'h202020202020202020202020202020202020202020202020202020206e6578747063 :
- (F_op_callr)? 272'h202020202020202020202020202020202020202020202020202020202063616c6c72 :
- (F_op_xor)? 272'h20202020202020202020202020202020202020202020202020202020202020786f72 :
- (F_op_mulxss)? 272'h202020202020202020202020202020202020202020202020202020206d756c787373 :
- (F_op_cmpeq)? 272'h2020202020202020202020202020202020202020202020202020202020636d706571 :
- (F_op_divu)? 272'h20202020202020202020202020202020202020202020202020202020202064697675 :
- (F_op_div)? 272'h20202020202020202020202020202020202020202020202020202020202020646976 :
- (F_op_rdctl)? 272'h2020202020202020202020202020202020202020202020202020202020726463746c :
- (F_op_mul)? 272'h202020202020202020202020202020202020202020202020202020202020206d756c :
- (F_op_cmpgeu)? 272'h20202020202020202020202020202020202020202020202020202020636d70676575 :
- (F_op_initi)? 272'h2020202020202020202020202020202020202020202020202020202020696e697469 :
- (F_op_trap)? 272'h20202020202020202020202020202020202020202020202020202020202074726170 :
- (F_op_wrctl)? 272'h2020202020202020202020202020202020202020202020202020202020777263746c :
- (F_op_cmpltu)? 272'h20202020202020202020202020202020202020202020202020202020636d706c7475 :
- (F_op_add)? 272'h20202020202020202020202020202020202020202020202020202020202020616464 :
- (F_op_break)? 272'h2020202020202020202020202020202020202020202020202020202020627265616b :
- (F_op_hbreak)? 272'h2020202020202020202020202020202020202020202020202020202068627265616b :
- (F_op_sync)? 272'h20202020202020202020202020202020202020202020202020202020202073796e63 :
- (F_op_sub)? 272'h20202020202020202020202020202020202020202020202020202020202020737562 :
- (F_op_srai)? 272'h20202020202020202020202020202020202020202020202020202020202073726169 :
- (F_op_sra)? 272'h20202020202020202020202020202020202020202020202020202020202020737261 :
- (F_op_intr)? 272'h202020202020202020202020202020202020202020202020202020202020696e7472 :
- (F_op_nios_custom_instr_floating_point_0)? 272'h6e696f735f637573746f6d5f696e7374725f666c6f6174696e675f706f696e745f30 :
- 272'h20202020202020202020202020202020202020202020202020202020202020424144;
- assign D_inst = (D_op_call)? 272'h20202020202020202020202020202020202020202020202020202020202063616c6c :
- (D_op_jmpi)? 272'h2020202020202020202020202020202020202020202020202020202020206a6d7069 :
- (D_op_ldbu)? 272'h2020202020202020202020202020202020202020202020202020202020206c646275 :
- (D_op_addi)? 272'h20202020202020202020202020202020202020202020202020202020202061646469 :
- (D_op_stb)? 272'h20202020202020202020202020202020202020202020202020202020202020737462 :
- (D_op_br)? 272'h20202020202020202020202020202020202020202020202020202020202020206272 :
- (D_op_ldb)? 272'h202020202020202020202020202020202020202020202020202020202020206c6462 :
- (D_op_cmpgei)? 272'h20202020202020202020202020202020202020202020202020202020636d70676569 :
- (D_op_ldhu)? 272'h2020202020202020202020202020202020202020202020202020202020206c646875 :
- (D_op_andi)? 272'h202020202020202020202020202020202020202020202020202020202020616e6469 :
- (D_op_sth)? 272'h20202020202020202020202020202020202020202020202020202020202020737468 :
- (D_op_bge)? 272'h20202020202020202020202020202020202020202020202020202020202020626765 :
- (D_op_ldh)? 272'h202020202020202020202020202020202020202020202020202020202020206c6468 :
- (D_op_cmplti)? 272'h20202020202020202020202020202020202020202020202020202020636d706c7469 :
- (D_op_initda)? 272'h20202020202020202020202020202020202020202020202020202020696e69746461 :
- (D_op_ori)? 272'h202020202020202020202020202020202020202020202020202020202020206f7269 :
- (D_op_stw)? 272'h20202020202020202020202020202020202020202020202020202020202020737477 :
- (D_op_blt)? 272'h20202020202020202020202020202020202020202020202020202020202020626c74 :
- (D_op_ldw)? 272'h202020202020202020202020202020202020202020202020202020202020206c6477 :
- (D_op_cmpnei)? 272'h20202020202020202020202020202020202020202020202020202020636d706e6569 :
- (D_op_flushda)? 272'h202020202020202020202020202020202020202020202020202020666c7573686461 :
- (D_op_xori)? 272'h202020202020202020202020202020202020202020202020202020202020786f7269 :
- (D_op_bne)? 272'h20202020202020202020202020202020202020202020202020202020202020626e65 :
- (D_op_cmpeqi)? 272'h20202020202020202020202020202020202020202020202020202020636d70657169 :
- (D_op_ldbuio)? 272'h202020202020202020202020202020202020202020202020202020206c646275696f :
- (D_op_muli)? 272'h2020202020202020202020202020202020202020202020202020202020206d756c69 :
- (D_op_stbio)? 272'h2020202020202020202020202020202020202020202020202020202020737462696f :
- (D_op_beq)? 272'h20202020202020202020202020202020202020202020202020202020202020626571 :
- (D_op_ldbio)? 272'h20202020202020202020202020202020202020202020202020202020206c6462696f :
- (D_op_cmpgeui)? 272'h202020202020202020202020202020202020202020202020202020636d7067657569 :
- (D_op_ldhuio)? 272'h202020202020202020202020202020202020202020202020202020206c646875696f :
- (D_op_andhi)? 272'h2020202020202020202020202020202020202020202020202020202020616e646869 :
- (D_op_sthio)? 272'h2020202020202020202020202020202020202020202020202020202020737468696f :
- (D_op_bgeu)? 272'h20202020202020202020202020202020202020202020202020202020202062676575 :
- (D_op_ldhio)? 272'h20202020202020202020202020202020202020202020202020202020206c6468696f :
- (D_op_cmpltui)? 272'h202020202020202020202020202020202020202020202020202020636d706c747569 :
- (D_op_custom)? 272'h20202020202020202020202020202020202020202020202020202020637573746f6d :
- (D_op_initd)? 272'h2020202020202020202020202020202020202020202020202020202020696e697464 :
- (D_op_orhi)? 272'h2020202020202020202020202020202020202020202020202020202020206f726869 :
- (D_op_stwio)? 272'h2020202020202020202020202020202020202020202020202020202020737477696f :
- (D_op_bltu)? 272'h202020202020202020202020202020202020202020202020202020202020626c7475 :
- (D_op_ldwio)? 272'h20202020202020202020202020202020202020202020202020202020206c6477696f :
- (D_op_flushd)? 272'h20202020202020202020202020202020202020202020202020202020666c75736864 :
- (D_op_xorhi)? 272'h2020202020202020202020202020202020202020202020202020202020786f726869 :
- (D_op_eret)? 272'h20202020202020202020202020202020202020202020202020202020202065726574 :
- (D_op_roli)? 272'h202020202020202020202020202020202020202020202020202020202020726f6c69 :
- (D_op_rol)? 272'h20202020202020202020202020202020202020202020202020202020202020726f6c :
- (D_op_flushp)? 272'h20202020202020202020202020202020202020202020202020202020666c75736870 :
- (D_op_ret)? 272'h20202020202020202020202020202020202020202020202020202020202020726574 :
- (D_op_nor)? 272'h202020202020202020202020202020202020202020202020202020202020206e6f72 :
- (D_op_mulxuu)? 272'h202020202020202020202020202020202020202020202020202020206d756c787575 :
- (D_op_cmpge)? 272'h2020202020202020202020202020202020202020202020202020202020636d706765 :
- (D_op_bret)? 272'h20202020202020202020202020202020202020202020202020202020202062726574 :
- (D_op_ror)? 272'h20202020202020202020202020202020202020202020202020202020202020726f72 :
- (D_op_flushi)? 272'h20202020202020202020202020202020202020202020202020202020666c75736869 :
- (D_op_jmp)? 272'h202020202020202020202020202020202020202020202020202020202020206a6d70 :
- (D_op_and)? 272'h20202020202020202020202020202020202020202020202020202020202020616e64 :
- (D_op_cmplt)? 272'h2020202020202020202020202020202020202020202020202020202020636d706c74 :
- (D_op_slli)? 272'h202020202020202020202020202020202020202020202020202020202020736c6c69 :
- (D_op_sll)? 272'h20202020202020202020202020202020202020202020202020202020202020736c6c :
- (D_op_or)? 272'h20202020202020202020202020202020202020202020202020202020202020206f72 :
- (D_op_mulxsu)? 272'h202020202020202020202020202020202020202020202020202020206d756c787375 :
- (D_op_cmpne)? 272'h2020202020202020202020202020202020202020202020202020202020636d706e65 :
- (D_op_srli)? 272'h20202020202020202020202020202020202020202020202020202020202073726c69 :
- (D_op_srl)? 272'h2020202020202020202020202020202020202020202020202020202020202073726c :
- (D_op_nextpc)? 272'h202020202020202020202020202020202020202020202020202020206e6578747063 :
- (D_op_callr)? 272'h202020202020202020202020202020202020202020202020202020202063616c6c72 :
- (D_op_xor)? 272'h20202020202020202020202020202020202020202020202020202020202020786f72 :
- (D_op_mulxss)? 272'h202020202020202020202020202020202020202020202020202020206d756c787373 :
- (D_op_cmpeq)? 272'h2020202020202020202020202020202020202020202020202020202020636d706571 :
- (D_op_divu)? 272'h20202020202020202020202020202020202020202020202020202020202064697675 :
- (D_op_div)? 272'h20202020202020202020202020202020202020202020202020202020202020646976 :
- (D_op_rdctl)? 272'h2020202020202020202020202020202020202020202020202020202020726463746c :
- (D_op_mul)? 272'h202020202020202020202020202020202020202020202020202020202020206d756c :
- (D_op_cmpgeu)? 272'h20202020202020202020202020202020202020202020202020202020636d70676575 :
- (D_op_initi)? 272'h2020202020202020202020202020202020202020202020202020202020696e697469 :
- (D_op_trap)? 272'h20202020202020202020202020202020202020202020202020202020202074726170 :
- (D_op_wrctl)? 272'h2020202020202020202020202020202020202020202020202020202020777263746c :
- (D_op_cmpltu)? 272'h20202020202020202020202020202020202020202020202020202020636d706c7475 :
- (D_op_add)? 272'h20202020202020202020202020202020202020202020202020202020202020616464 :
- (D_op_break)? 272'h2020202020202020202020202020202020202020202020202020202020627265616b :
- (D_op_hbreak)? 272'h2020202020202020202020202020202020202020202020202020202068627265616b :
- (D_op_sync)? 272'h20202020202020202020202020202020202020202020202020202020202073796e63 :
- (D_op_sub)? 272'h20202020202020202020202020202020202020202020202020202020202020737562 :
- (D_op_srai)? 272'h20202020202020202020202020202020202020202020202020202020202073726169 :
- (D_op_sra)? 272'h20202020202020202020202020202020202020202020202020202020202020737261 :
- (D_op_intr)? 272'h202020202020202020202020202020202020202020202020202020202020696e7472 :
- (D_op_nios_custom_instr_floating_point_0)? 272'h6e696f735f637573746f6d5f696e7374725f666c6f6174696e675f706f696e745f30 :
- 272'h20202020202020202020202020202020202020202020202020202020202020424144;
- assign F_vinst = F_valid ? F_inst : {34{8'h2d}};
- assign D_vinst = D_valid ? D_inst : {34{8'h2d}};
- assign R_vinst = R_valid ? D_inst : {34{8'h2d}};
- assign E_vinst = E_valid ? D_inst : {34{8'h2d}};
- assign W_vinst = W_valid ? D_inst : {34{8'h2d}};
- //////////////// END SIMULATION-ONLY CONTENTS
- //synthesis translate_on
- endmodule
|