csl_chipAux.h 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412
  1. /* ============================================================================
  2. * Copyright (c) Texas Instruments Incorporated 2008-2016
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. *
  11. * Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the
  14. * distribution.
  15. *
  16. * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. *
  32. */
  33. /**
  34. * @file csl_chipAux.h
  35. *
  36. * @brief
  37. * API Auxilary header file for CHIP CSL to read/write from the C64x+ CPU
  38. * Control Register File.
  39. *
  40. * \par
  41. * ============================================================================
  42. * @n (C) Copyright 2008, 2009, 2016 Texas Instruments, Inc.
  43. * @n Use of this software is controlled by the terms and conditions found
  44. * @n in the license agreement under which this software has been supplied.
  45. * ===========================================================================
  46. * \par
  47. */
  48. #ifndef CSL_CHIPAUX_H
  49. #define CSL_CHIPAUX_H
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. #include <ti/csl/csl_chip.h>
  54. /** @addtogroup CSL_CHIP_FUNCTION
  55. @{ */
  56. /** ============================================================================
  57. * @n@b CSL_chipReadAMR
  58. *
  59. * @b Description
  60. * @n This API reads the Addressing Mode (AMR) control register and returns its
  61. * contents.
  62. *
  63. * @b Arguments None
  64. *
  65. * <b> Return Value </b> Uint32
  66. * @li The control register value read
  67. *
  68. * <b> Pre Condition </b>
  69. * @n None
  70. *
  71. * <b> Post Condition </b>
  72. * @n None
  73. *
  74. * @b Reads
  75. * @n AMR
  76. *
  77. * <b> Usage Constraints: </b>
  78. * @n Please refer to the C64x+ user guide for constraints while accessing
  79. * registers in different privilege levels.
  80. *
  81. * @b Example
  82. * @verbatim
  83. Uint32 amrVal;
  84. amrVal = CSL_chipReadAMR ();
  85. @endverbatim
  86. * ===========================================================================
  87. */
  88. /*misra requires duplicated prototype even for static functions*/
  89. static inline Uint32 CSL_chipReadAMR(void);
  90. static inline Uint32 CSL_chipReadAMR(void)
  91. {
  92. /** Addressing Mode Register */
  93. return AMR;
  94. }
  95. /** ============================================================================
  96. * @n@b CSL_chipReadCSR
  97. *
  98. * @b Description
  99. * @n This API reads the Control Status (CSR) register and returns its
  100. * contents.
  101. *
  102. * @b Arguments None
  103. *
  104. * <b> Return Value </b> Uint32
  105. * @li The control register value read
  106. *
  107. * <b> Pre Condition </b>
  108. * @n None
  109. *
  110. * <b> Post Condition </b>
  111. * @n None
  112. *
  113. * @b Reads
  114. * @n CSR
  115. *
  116. * <b> Usage Constraints: </b>
  117. * @n Please refer to the C64x+ user guide for constraints while accessing
  118. * registers in different privilege levels.
  119. *
  120. * @b Example
  121. * @verbatim
  122. Uint32 csrVal;
  123. csrVal = CSL_chipReadCSR ();
  124. @endverbatim
  125. * ===========================================================================
  126. */
  127. /*misra requires duplicated prototype even for static functions*/
  128. static inline Uint32 CSL_chipReadCSR(void);
  129. static inline Uint32 CSL_chipReadCSR(void)
  130. {
  131. /** Control Status Register */
  132. return CSR;
  133. }
  134. /** ============================================================================
  135. * @n@b CSL_chipReadIFR
  136. *
  137. * @b Description
  138. * @n This API reads the Interrrupt Flag register (IFR) and returns its
  139. * contents.
  140. *
  141. * @b Arguments None
  142. *
  143. * <b> Return Value </b> Uint32
  144. * @li The control register value read
  145. *
  146. * <b> Pre Condition </b>
  147. * @n None
  148. *
  149. * <b> Post Condition </b>
  150. * @n None
  151. *
  152. * @b Reads
  153. * @n IFR
  154. *
  155. * <b> Usage Constraints: </b>
  156. * @n Please refer to the C64x+ user guide for constraints while accessing
  157. * registers in different privilege levels.
  158. *
  159. * @b Example
  160. * @verbatim
  161. Uint32 ifrVal;
  162. ifrVal = CSL_chipReadIFR (void);
  163. @endverbatim
  164. * ===========================================================================
  165. */
  166. /*misra requires duplicated prototype even for static functions*/
  167. static inline Uint32 CSL_chipReadIFR(void);
  168. static inline Uint32 CSL_chipReadIFR(void)
  169. {
  170. /** Interrupt Flag Register */
  171. return IFR;
  172. }
  173. /** ============================================================================
  174. * @n@b CSL_chipReadIER
  175. *
  176. * @b Description
  177. * @n This API reads the Interrrupt Enable register (IER) and returns its
  178. * contents.
  179. *
  180. * @b Arguments None
  181. *
  182. * <b> Return Value </b> Uint32
  183. * @li The control register value read
  184. *
  185. * <b> Pre Condition </b>
  186. * @n None
  187. *
  188. * <b> Post Condition </b>
  189. * @n None
  190. *
  191. * @b Reads
  192. * @n IER
  193. *
  194. * <b> Usage Constraints: </b>
  195. * @n Please refer to the C64x+ user guide for constraints while accessing
  196. * registers in different privilege levels.
  197. *
  198. * @b Example
  199. * @verbatim
  200. Uint32 ierVal;
  201. ierVal = CSL_chipReadIER (void);
  202. @endverbatim
  203. * ===========================================================================
  204. */
  205. /*misra requires duplicated prototype even for static functions*/
  206. static inline Uint32 CSL_chipReadIER(void);
  207. static inline Uint32 CSL_chipReadIER(void)
  208. {
  209. /** Interrupt Enable Register */
  210. return IER;
  211. }
  212. /** ============================================================================
  213. * @n@b CSL_chipReadISTP
  214. *
  215. * @b Description
  216. * @n This API reads the Interrrupt Service Table Pointer register (ISTP) and
  217. * returns its contents.
  218. *
  219. * @b Arguments None
  220. *
  221. * <b> Return Value </b> Uint32
  222. * @li The control register value read
  223. *
  224. * <b> Pre Condition </b>
  225. * @n None
  226. *
  227. * <b> Post Condition </b>
  228. * @n None
  229. *
  230. * @b Reads
  231. * @n ISTP
  232. *
  233. * <b> Usage Constraints: </b>
  234. * @n Please refer to the C64x+ user guide for constraints while accessing
  235. * registers in different privilege levels.
  236. *
  237. * @b Example
  238. * @verbatim
  239. Uint32 istpVal;
  240. istpVal = CSL_chipReadISTP (void);
  241. @endverbatim
  242. * ===========================================================================
  243. */
  244. /*misra requires duplicated prototype even for static functions*/
  245. static inline Uint32 CSL_chipReadISTP(void);
  246. static inline Uint32 CSL_chipReadISTP(void)
  247. {
  248. /** Interrupt Service Table Pointer Register */
  249. return ISTP;
  250. }
  251. /** ============================================================================
  252. * @n@b CSL_chipReadIRP
  253. *
  254. * @b Description
  255. * @n This API reads the Interrrupt Return Pointer register (IRP) and
  256. * returns its contents.
  257. *
  258. * @b Arguments None
  259. *
  260. * <b> Return Value </b> Uint32
  261. * @li The control register value read
  262. *
  263. * <b> Pre Condition </b>
  264. * @n None
  265. *
  266. * <b> Post Condition </b>
  267. * @n None
  268. *
  269. * @b Reads
  270. * @n IRP
  271. *
  272. * <b> Usage Constraints: </b>
  273. * @n Please refer to the C64x+ user guide for constraints while accessing
  274. * registers in different privilege levels.
  275. *
  276. * @b Example
  277. * @verbatim
  278. Uint32 irpVal;
  279. irpVal = CSL_chipReadIRP (void);
  280. @endverbatim
  281. * ===========================================================================
  282. */
  283. /*misra requires duplicated prototype even for static functions*/
  284. static inline Uint32 CSL_chipReadIRP(void);
  285. static inline Uint32 CSL_chipReadIRP(void)
  286. {
  287. /** Interrupt Return Pointer Register */
  288. return IRP;
  289. }
  290. /** ============================================================================
  291. * @n@b CSL_chipReadNRP
  292. *
  293. * @b Description
  294. * @n This API reads the Nonmaskable Interrupt Return Pointer register (NRP)
  295. * and returns its contents.
  296. *
  297. * @b Arguments None
  298. *
  299. * <b> Return Value </b> Uint32
  300. * @li The control register value read
  301. *
  302. * <b> Pre Condition </b>
  303. * @n None
  304. *
  305. * <b> Post Condition </b>
  306. * @n None
  307. *
  308. * @b Reads
  309. * @n NRP
  310. *
  311. * <b> Usage Constraints: </b>
  312. * @n Please refer to the C64x+ user guide for constraints while accessing
  313. * registers in different privilege levels.
  314. *
  315. * @b Example
  316. * @verbatim
  317. Uint32 nrpVal;
  318. nrpVal = CSL_chipReadNRP (void);
  319. @endverbatim
  320. * ===========================================================================
  321. */
  322. /*misra requires duplicated prototype even for static functions*/
  323. static inline Uint32 CSL_chipReadNRP(void);
  324. static inline Uint32 CSL_chipReadNRP(void)
  325. {
  326. /** Nonmaskable Interrupt (NMI) Registers */
  327. return NRP;
  328. }
  329. /** ============================================================================
  330. * @n@b CSL_chipReadERP
  331. *
  332. * @b Description
  333. * @n This API reads the Exception Return Pointer register (ERP) and returns
  334. * its contents.
  335. *
  336. * @b Arguments None
  337. *
  338. * <b> Return Value </b> Uint32
  339. * @li The control register value read
  340. *
  341. * <b> Pre Condition </b>
  342. * @n None
  343. *
  344. * <b> Post Condition </b>
  345. * @n None
  346. *
  347. * @b Reads
  348. * @n NRP
  349. *
  350. * <b> Usage Constraints: </b>
  351. * @n Please refer to the C64x+ user guide for constraints while accessing
  352. * registers in different privilege levels.
  353. *
  354. * @b Example
  355. * @verbatim
  356. Uint32 erpVal;
  357. erpVal = CSL_chipReadERP (void);
  358. @endverbatim
  359. * ===========================================================================
  360. */
  361. /*misra requires duplicated prototype even for static functions*/
  362. static inline Uint32 CSL_chipReadERP(void);
  363. static inline Uint32 CSL_chipReadERP(void)
  364. {
  365. /** Exception Return Pointer Registers */
  366. return NRP;
  367. }
  368. /** ============================================================================
  369. * @n@b CSL_chipReadTSCL
  370. *
  371. * @b Description
  372. * @n This API reads the Time Stamp Counter Lower Order 32-bits (TSCL) register
  373. * and returns its contents.
  374. *
  375. * @b Arguments None
  376. *
  377. * <b> Return Value </b> Uint32
  378. * @li The control register value read
  379. *
  380. * <b> Pre Condition </b>
  381. * @n @a CSL_chipWriteTSCL() must be called with any arbitrary value to
  382. * enable the TSC first before this API is called.
  383. *
  384. * <b> Post Condition </b>
  385. * @n None
  386. *
  387. * @b Reads
  388. * @n TSCL
  389. *
  390. * <b> Usage Constraints: </b>
  391. * @n Please refer to the C64x+ user guide for constraints while accessing
  392. * registers in different privilege levels.
  393. *
  394. * @b Example
  395. * @verbatim
  396. Uint32 tsclVal;
  397. tsclVal = CSL_chipReadTSCL (void);
  398. @endverbatim
  399. * ===========================================================================
  400. */
  401. /*misra requires duplicated prototype even for static functions*/
  402. static inline Uint32 CSL_chipReadTSCL(void);
  403. static inline Uint32 CSL_chipReadTSCL(void)
  404. {
  405. /** Time Stamp Counter Register - Low */
  406. return TSCL;
  407. }
  408. /** ============================================================================
  409. * @n@b CSL_chipReadTSCH
  410. *
  411. * @b Description
  412. * @n This API reads the Time Stamp Counter Higher Order 32-bits (TSCH) register
  413. * and returns its contents.
  414. *
  415. * @b Arguments None
  416. *
  417. * <b> Return Value </b> Uint32
  418. * @li The control register value read
  419. *
  420. * <b> Pre Condition </b>
  421. * @n @a CSL_chipWriteTSCL() must be called with any arbitrary value to
  422. * enable the TSC first before this API is called.
  423. *
  424. * <b> Post Condition </b>
  425. * @n None
  426. *
  427. * @b Reads
  428. * @n TSCH
  429. *
  430. * <b> Usage Constraints: </b>
  431. * @n Please refer to the C64x+ user guide for constraints while accessing
  432. * registers in different privilege levels.
  433. *
  434. * @b Example
  435. * @verbatim
  436. Uint32 tschVal;
  437. tschVal = CSL_chipReadTSCH (void);
  438. @endverbatim
  439. * ===========================================================================
  440. */
  441. /*misra requires duplicated prototype even for static functions*/
  442. static inline Uint32 CSL_chipReadTSCH(void);
  443. static inline Uint32 CSL_chipReadTSCH(void)
  444. {
  445. /** Time Stamp Counter Registers - High */
  446. return TSCH;
  447. }
  448. /** ============================================================================
  449. * @n@b CSL_chipReadARP
  450. *
  451. * @b Description
  452. * @n This API reads the Analysis Return Pointer (ARP) register
  453. * and returns its contents.
  454. *
  455. * @b Arguments None
  456. *
  457. * <b> Return Value </b> Uint32
  458. * @li The control register value read
  459. *
  460. * <b> Pre Condition </b>
  461. * @n None
  462. *
  463. * <b> Post Condition </b>
  464. * @n None
  465. *
  466. * @b Reads
  467. * @n ARP
  468. *
  469. * <b> Usage Constraints: </b>
  470. * @n Please refer to the C64x+ user guide for constraints while accessing
  471. * registers in different privilege levels.
  472. *
  473. * @b Example
  474. * @verbatim
  475. Uint32 arpVal;
  476. arpVal = CSL_chipReadARP (void);
  477. @endverbatim
  478. * ===========================================================================
  479. */
  480. /*misra requires duplicated prototype even for static functions*/
  481. static inline Uint32 CSL_chipReadARP(void);
  482. static inline Uint32 CSL_chipReadARP(void)
  483. {
  484. /** Analysis Return Pointer */
  485. return ARP;
  486. }
  487. /** ============================================================================
  488. * @n@b CSL_chipReadILC
  489. *
  490. * @b Description
  491. * @n This API reads the Inner Loop SPL Buffer Count (ILC) register
  492. * and returns its contents.
  493. *
  494. * @b Arguments None
  495. *
  496. * <b> Return Value </b> Uint32
  497. * @li The control register value read
  498. *
  499. * <b> Pre Condition </b>
  500. * @n None
  501. *
  502. * <b> Post Condition </b>
  503. * @n None
  504. *
  505. * @b Reads
  506. * @n ILC
  507. *
  508. * <b> Usage Constraints: </b>
  509. * @n Please refer to the C64x+ user guide for constraints while accessing
  510. * registers in different privilege levels.
  511. *
  512. * @b Example
  513. * @verbatim
  514. Uint32 ilcVal;
  515. ilcVal = CSL_chipReadILC (void);
  516. @endverbatim
  517. * ===========================================================================
  518. */
  519. /*misra requires duplicated prototype even for static functions*/
  520. static inline Uint32 CSL_chipReadILC(void);
  521. static inline Uint32 CSL_chipReadILC(void)
  522. {
  523. /** SPLOOP Inner Loop Count Register */
  524. return ILC;
  525. }
  526. /** ============================================================================
  527. * @n@b CSL_chipReadRILC
  528. *
  529. * @b Description
  530. * @n This API reads the Reload Inner Loop SPL Buffer Count (RILC) register
  531. * and returns its contents.
  532. *
  533. * @b Arguments None
  534. *
  535. * <b> Return Value </b> Uint32
  536. * @li The control register value read
  537. *
  538. * <b> Pre Condition </b>
  539. * @n None
  540. *
  541. * <b> Post Condition </b>
  542. * @n None
  543. *
  544. * @b Reads
  545. * @n RILC
  546. *
  547. * <b> Usage Constraints: </b>
  548. * @n Please refer to the C64x+ user guide for constraints while accessing
  549. * registers in different privilege levels.
  550. *
  551. * @b Example
  552. * @verbatim
  553. Uint32 rilcVal;
  554. rilcVal = CSL_chipReadRILC (void);
  555. @endverbatim
  556. * ===========================================================================
  557. */
  558. /*misra requires duplicated prototype even for static functions*/
  559. static inline Uint32 CSL_chipReadRILC(void);
  560. static inline Uint32 CSL_chipReadRILC(void)
  561. {
  562. /** SPLOOP Reload Inner Loop Count Register */
  563. return RILC;
  564. }
  565. /** ============================================================================
  566. * @n@b CSL_chipReadREP
  567. *
  568. * @b Description
  569. * @n This API reads the Restricted Entry Point Address (REP) register
  570. * and returns its contents.
  571. *
  572. * @b Arguments None
  573. *
  574. * <b> Return Value </b> Uint32
  575. * @li The control register value read
  576. *
  577. * <b> Pre Condition </b>
  578. * @n None
  579. *
  580. * <b> Post Condition </b>
  581. * @n None
  582. *
  583. * @b Reads
  584. * @n REP
  585. *
  586. * <b> Usage Constraints: </b>
  587. * @n Please refer to the C64x+ user guide for constraints while accessing
  588. * registers in different privilege levels.
  589. *
  590. * @b Example
  591. * @verbatim
  592. Uint32 repVal;
  593. repVal = CSL_chipReadREP (void);
  594. @endverbatim
  595. * ===========================================================================
  596. */
  597. /*misra requires duplicated prototype even for static functions*/
  598. static inline Uint32 CSL_chipReadREP(void);
  599. static inline Uint32 CSL_chipReadREP(void)
  600. {
  601. /** Restricted Entry Point Address Register */
  602. return REP;
  603. }
  604. /** ============================================================================
  605. * @n@b CSL_chipReadPCE1
  606. *
  607. * @b Description
  608. * @n This API reads the Program Counter, E1 Phase (PCE1) register and returns
  609. * its contents.
  610. *
  611. * @b Arguments None
  612. *
  613. * <b> Return Value </b> Uint32
  614. * @li The control register value read
  615. *
  616. * <b> Pre Condition </b>
  617. * @n None
  618. *
  619. * <b> Post Condition </b>
  620. * @n None
  621. *
  622. * @b Reads
  623. * @n PCE1
  624. *
  625. * <b> Usage Constraints: </b>
  626. * @n Please refer to the C64x+ user guide for constraints while accessing
  627. * registers in different privilege levels.
  628. *
  629. * @b Example
  630. * @verbatim
  631. Uint32 pce1Val;
  632. pce1Val = CSL_chipReadPCE1 (void);
  633. @endverbatim
  634. * ===========================================================================
  635. */
  636. /*misra requires duplicated prototype even for static functions*/
  637. static inline Uint32 CSL_chipReadPCE1(void);
  638. static inline Uint32 CSL_chipReadPCE1(void)
  639. {
  640. /** E1 Phase Program Counter */
  641. return PCE1;
  642. }
  643. /** ============================================================================
  644. * @n@b CSL_chipReadDNUM
  645. *
  646. * @b Description
  647. * @n This API reads the DSP Core Number (DSPNUM) register and returns
  648. * its contents.
  649. *
  650. * @b Arguments None
  651. *
  652. * <b> Return Value </b> Uint32
  653. * @li The control register value read
  654. *
  655. * <b> Pre Condition </b>
  656. * @n None
  657. *
  658. * <b> Post Condition </b>
  659. * @n None
  660. *
  661. * @b Reads
  662. * @n DNUM
  663. *
  664. * <b> Usage Constraints: </b>
  665. * @n Please refer to the C64x+ user guide for constraints while accessing
  666. * registers in different privilege levels.
  667. *
  668. * @b Example
  669. * @verbatim
  670. Uint32 dnumVal;
  671. dnumVal = CSL_chipReadDNUM (void);
  672. @endverbatim
  673. * ===========================================================================
  674. */
  675. /*misra requires duplicated prototype even for static functions*/
  676. static inline Uint32 CSL_chipReadDNUM(void);
  677. static inline Uint32 CSL_chipReadDNUM(void)
  678. {
  679. /** DSP Core Number Register */
  680. return DNUM;
  681. }
  682. /** ============================================================================
  683. * @n@b CSL_chipReadSSR
  684. *
  685. * @b Description
  686. * @n This API reads the Saturation Status Register (SSR) and returns
  687. * its contents.
  688. *
  689. * @b Arguments None
  690. *
  691. * <b> Return Value </b> Uint32
  692. * @li The control register value read
  693. *
  694. * <b> Pre Condition </b>
  695. * @n None
  696. *
  697. * <b> Post Condition </b>
  698. * @n None
  699. *
  700. * @b Reads
  701. * @n SSR
  702. *
  703. * <b> Usage Constraints: </b>
  704. * @n Please refer to the C64x+ user guide for constraints while accessing
  705. * registers in different privilege levels.
  706. *
  707. * @b Example
  708. * @verbatim
  709. Uint32 ssrVal;
  710. ssrVal = CSL_chipReadSSR (void);
  711. @endverbatim
  712. * ===========================================================================
  713. */
  714. /*misra requires duplicated prototype even for static functions*/
  715. static inline Uint32 CSL_chipReadSSR(void);
  716. static inline Uint32 CSL_chipReadSSR(void)
  717. {
  718. /** Saturation Status Register */
  719. return SSR;
  720. }
  721. /** ============================================================================
  722. * @n@b CSL_chipReadGPLYA
  723. *
  724. * @b Description
  725. * @n This API reads the GMPY A-side polynomial Register (GPLYA) and returns
  726. * its contents.
  727. *
  728. * @b Arguments None
  729. *
  730. * <b> Return Value </b> Uint32
  731. * @li The control register value read
  732. *
  733. * <b> Pre Condition </b>
  734. * @n None
  735. *
  736. * <b> Post Condition </b>
  737. * @n None
  738. *
  739. * @b Reads
  740. * @n GPLYA
  741. *
  742. * <b> Usage Constraints: </b>
  743. * @n Please refer to the C64x+ user guide for constraints while accessing
  744. * registers in different privilege levels.
  745. *
  746. * @b Example
  747. * @verbatim
  748. Uint32 gplyaVal;
  749. gplyaVal = CSL_chipReadGPLYA (void);
  750. @endverbatim
  751. * ===========================================================================
  752. */
  753. /*misra requires duplicated prototype even for static functions*/
  754. static inline Uint32 CSL_chipReadGPLYA(void);
  755. static inline Uint32 CSL_chipReadGPLYA(void)
  756. {
  757. /** GMPY Polynomial.A Side Register */
  758. return GPLYA;
  759. }
  760. /** ============================================================================
  761. * @n@b CSL_chipReadGPLYB
  762. *
  763. * @b Description
  764. * @n This API reads the GMPY B-side polynomial Register (GPLYB) and returns
  765. * its contents.
  766. *
  767. * @b Arguments None
  768. *
  769. * <b> Return Value </b> Uint32
  770. * @li The control register value read
  771. *
  772. * <b> Pre Condition </b>
  773. * @n None
  774. *
  775. * <b> Post Condition </b>
  776. * @n None
  777. *
  778. * @b Reads
  779. * @n GPLYB
  780. *
  781. * <b> Usage Constraints: </b>
  782. * @n Please refer to the C64x+ user guide for constraints while accessing
  783. * registers in different privilege levels.
  784. *
  785. * @b Example
  786. * @verbatim
  787. Uint32 gplybVal;
  788. gplybVal = CSL_chipReadGPLYB (void);
  789. @endverbatim
  790. * ===========================================================================
  791. */
  792. /*misra requires duplicated prototype even for static functions*/
  793. static inline Uint32 CSL_chipReadGPLYB(void);
  794. static inline Uint32 CSL_chipReadGPLYB(void)
  795. {
  796. /** GMPY Polynomial.B Side Register */
  797. return GPLYB;
  798. }
  799. /** ============================================================================
  800. * @n@b CSL_chipReadGFPGFR
  801. *
  802. * @b Description
  803. * @n This API reads the Galios Field Multiply Control Register (GFPGFR) and
  804. * returns its contents.
  805. *
  806. * @b Arguments None
  807. *
  808. * <b> Return Value </b> Uint32
  809. * @li The control register value read
  810. *
  811. * <b> Pre Condition </b>
  812. * @n None
  813. *
  814. * <b> Post Condition </b>
  815. * @n None
  816. *
  817. * @b Reads
  818. * @n GFPGFR
  819. *
  820. * <b> Usage Constraints: </b>
  821. * @n Please refer to the C64x+ user guide for constraints while accessing
  822. * registers in different privilege levels.
  823. *
  824. * @b Example
  825. * @verbatim
  826. Uint32 gfpgfrVal;
  827. gfpgfrVal = CSL_chipReadGFPGFR (void);
  828. @endverbatim
  829. * ===========================================================================
  830. */
  831. /*misra requires duplicated prototype even for static functions*/
  832. static inline Uint32 CSL_chipReadGFPGFR(void);
  833. static inline Uint32 CSL_chipReadGFPGFR(void)
  834. {
  835. /** Galois Field Polynomial Generator Function Register */
  836. return GFPGFR;
  837. }
  838. /** ============================================================================
  839. * @n@b CSL_chipReadDIER
  840. *
  841. * @b Description
  842. * @n This API reads the Debug Interrupt Enable Register (DIER) and returns its
  843. * contents.
  844. *
  845. * @b Arguments None
  846. *
  847. * <b> Return Value </b> Uint32
  848. * @li The control register value read
  849. *
  850. * <b> Pre Condition </b>
  851. * @n None
  852. *
  853. * <b> Post Condition </b>
  854. * @n None
  855. *
  856. * @b Reads
  857. * @n DIER
  858. *
  859. * <b> Usage Constraints: </b>
  860. * @n Please refer to the C64x+ user guide for constraints while accessing
  861. * registers in different privilege levels.
  862. *
  863. * @b Example
  864. * @verbatim
  865. Uint32 dierVal;
  866. dierVal = CSL_chipReadDIER (void);
  867. @endverbatim
  868. * ===========================================================================
  869. */
  870. /*misra requires duplicated prototype even for static functions*/
  871. static inline Uint32 CSL_chipReadDIER(void);
  872. static inline Uint32 CSL_chipReadDIER(void)
  873. {
  874. /** Debug Interrupt Enable Register */
  875. return DIER;
  876. }
  877. /** ============================================================================
  878. * @n@b CSL_chipReadTSR
  879. *
  880. * @b Description
  881. * @n This API reads the Task State Register (TSR) and returns its contents.
  882. *
  883. * @b Arguments None
  884. *
  885. * <b> Return Value </b> Uint32
  886. * @li The control register value read
  887. *
  888. * <b> Pre Condition </b>
  889. * @n None
  890. *
  891. * <b> Post Condition </b>
  892. * @n None
  893. *
  894. * @b Reads
  895. * @n TSR
  896. *
  897. * <b> Usage Constraints: </b>
  898. * @n Please refer to the C64x+ user guide for constraints while accessing
  899. * registers in different privilege levels.
  900. *
  901. * @b Example
  902. * @verbatim
  903. Uint32 tsrVal;
  904. tsrVal = CSL_chipReadTSR (void);
  905. @endverbatim
  906. * ===========================================================================
  907. */
  908. /*misra requires duplicated prototype even for static functions*/
  909. static inline Uint32 CSL_chipReadTSR(void);
  910. static inline Uint32 CSL_chipReadTSR(void)
  911. {
  912. /** Task State Register */
  913. return TSR;
  914. }
  915. /** ============================================================================
  916. * @n@b CSL_chipReadITSR
  917. *
  918. * @b Description
  919. * @n This API reads the Interrupt Task State Register (ITSR) and returns its
  920. * contents.
  921. *
  922. * @b Arguments None
  923. *
  924. * <b> Return Value </b> Uint32
  925. * @li The control register value read
  926. *
  927. * <b> Pre Condition </b>
  928. * @n None
  929. *
  930. * <b> Post Condition </b>
  931. * @n None
  932. *
  933. * @b Reads
  934. * @n ITSR
  935. *
  936. * <b> Usage Constraints: </b>
  937. * @n Please refer to the C64x+ user guide for constraints while accessing
  938. * registers in different privilege levels.
  939. *
  940. * @b Example
  941. * @verbatim
  942. Uint32 itsrVal;
  943. itsrVal = CSL_chipReadITSR (void);
  944. @endverbatim
  945. * ===========================================================================
  946. */
  947. /*misra requires duplicated prototype even for static functions*/
  948. static inline Uint32 CSL_chipReadITSR(void);
  949. static inline Uint32 CSL_chipReadITSR(void)
  950. {
  951. /** Interrupt Task State Register */
  952. return ITSR;
  953. }
  954. /** ============================================================================
  955. * @n@b CSL_chipReadNTSR
  956. *
  957. * @b Description
  958. * @n This API reads the NMI/Exception Task State Register (NTSR) and returns its
  959. * contents.
  960. *
  961. * @b Arguments None
  962. *
  963. * <b> Return Value </b> Uint32
  964. * @li The control register value read
  965. *
  966. * <b> Pre Condition </b>
  967. * @n None
  968. *
  969. * <b> Post Condition </b>
  970. * @n None
  971. *
  972. * @b Reads
  973. * @n NTSR
  974. *
  975. * <b> Usage Constraints: </b>
  976. * @n Please refer to the C64x+ user guide for constraints while accessing
  977. * registers in different privilege levels.
  978. *
  979. * @b Example
  980. * @verbatim
  981. Uint32 ntsrVal;
  982. ntsrVal = CSL_chipReadNTSR (void);
  983. @endverbatim
  984. * ===========================================================================
  985. */
  986. /*misra requires duplicated prototype even for static functions*/
  987. static inline Uint32 CSL_chipReadNTSR(void);
  988. static inline Uint32 CSL_chipReadNTSR(void)
  989. {
  990. /** NMI/Exception Task State Register */
  991. return NTSR;
  992. }
  993. /** ============================================================================
  994. * @n@b CSL_chipReadEFR
  995. *
  996. * @b Description
  997. * @n This API reads the Exception Flag Register (EFR) and returns its contents.
  998. *
  999. * @b Arguments None
  1000. *
  1001. * <b> Return Value </b> Uint32
  1002. * @li The control register value read
  1003. *
  1004. * <b> Pre Condition </b>
  1005. * @n None
  1006. *
  1007. * <b> Post Condition </b>
  1008. * @n None
  1009. *
  1010. * @b Reads
  1011. * @n EFR
  1012. *
  1013. * <b> Usage Constraints: </b>
  1014. * @n Please refer to the C64x+ user guide for constraints while accessing
  1015. * registers in different privilege levels.
  1016. *
  1017. * @b Example
  1018. * @verbatim
  1019. Uint32 efrVal;
  1020. efrVal = CSL_chipReadEFR (void);
  1021. @endverbatim
  1022. * ===========================================================================
  1023. */
  1024. /*misra requires duplicated prototype even for static functions*/
  1025. static inline Uint32 CSL_chipReadEFR(void);
  1026. static inline Uint32 CSL_chipReadEFR(void)
  1027. {
  1028. /** Exception Flag Register */
  1029. return EFR;
  1030. }
  1031. /** ============================================================================
  1032. * @n@b CSL_chipReadIERR
  1033. *
  1034. * @b Description
  1035. * @n This API reads the Internal Exception Report Register (IERR) and returns
  1036. * its contents.
  1037. *
  1038. * @b Arguments None
  1039. *
  1040. * <b> Return Value </b> Uint32
  1041. * @li The control register value read
  1042. *
  1043. * <b> Pre Condition </b>
  1044. * @n None
  1045. *
  1046. * <b> Post Condition </b>
  1047. * @n None
  1048. *
  1049. * @b Reads
  1050. * @n IERR
  1051. *
  1052. * <b> Usage Constraints: </b>
  1053. * @n Please refer to the C64x+ user guide for constraints while accessing
  1054. * registers in different privilege levels.
  1055. *
  1056. * @b Example
  1057. * @verbatim
  1058. Uint32 ierrVal;
  1059. ierrVal = CSL_chipReadIERR (void);
  1060. @endverbatim
  1061. * ===========================================================================
  1062. */
  1063. /*misra requires duplicated prototype even for static functions*/
  1064. static inline Uint32 CSL_chipReadIERR(void);
  1065. static inline Uint32 CSL_chipReadIERR(void)
  1066. {
  1067. /** Internal Exception Report Register */
  1068. return IERR;
  1069. }
  1070. /** ============================================================================
  1071. * @n@b CSL_chipWriteAMR
  1072. *
  1073. * @b Description
  1074. * @n This API configures the Addressing Mode Register (AMR) with the specified
  1075. * new value 'val'. This API returns the old AMR value on return.
  1076. *
  1077. * @b Arguments
  1078. * @verbatim
  1079. val Value to be written.
  1080. @endverbatim
  1081. *
  1082. *
  1083. * <b> Return Value </b> Uint32
  1084. * @li New programmed value
  1085. *
  1086. * <b> Pre Condition </b>
  1087. * @n None
  1088. *
  1089. * <b> Post Condition </b>
  1090. * @n The AMR control register is written with the value passed
  1091. *
  1092. * @b Writes
  1093. * @n AMR
  1094. *
  1095. * <b> Usage Constraints: </b>
  1096. * @n Please refer to the C64x+ user guide for constraints while accessing
  1097. * registers in different privilege levels.
  1098. *
  1099. * @b Example
  1100. * @verbatim
  1101. Uint32 oldamr;
  1102. oldamr = CSL_chipWriteAMR (56);
  1103. @endverbatim
  1104. * ===========================================================================
  1105. */
  1106. /*misra requires duplicated prototype even for static functions*/
  1107. static inline Uint32 CSL_chipWriteAMR(CSL_Reg32 val);
  1108. static inline Uint32 CSL_chipWriteAMR(CSL_Reg32 val)
  1109. {
  1110. Uint32 oldVal;
  1111. /** Addressing Mode Register */
  1112. oldVal = AMR;
  1113. AMR = val;
  1114. return oldVal;
  1115. }
  1116. /** ============================================================================
  1117. * @n@b CSL_chipWriteCSR
  1118. *
  1119. * @b Description
  1120. * @n This API configures the Control Status Register (CSR) with the specified
  1121. * new value 'val'. This API returns the old CSR value on return.
  1122. *
  1123. * @b Arguments
  1124. * @verbatim
  1125. val Value to be written.
  1126. @endverbatim
  1127. *
  1128. * <b> Return Value </b> Uint32
  1129. * @li New programmed value
  1130. *
  1131. * <b> Pre Condition </b>
  1132. * @n None
  1133. *
  1134. * <b> Post Condition </b>
  1135. * @n The CSR control register is written with the value passed
  1136. *
  1137. * @b Writes
  1138. * @n CSR
  1139. *
  1140. * <b> Usage Constraints: </b>
  1141. * @n Please refer to the C64x+ user guide for constraints while accessing
  1142. * registers in different privilege levels.
  1143. *
  1144. * @b Example
  1145. * @verbatim
  1146. Uint32 oldcsr;
  1147. oldcsr = CSL_chipWriteCSR (56);
  1148. @endverbatim
  1149. * ===========================================================================
  1150. */
  1151. /*misra requires duplicated prototype even for static functions*/
  1152. static inline Uint32 CSL_chipWriteCSR(CSL_Reg32 val);
  1153. static inline Uint32 CSL_chipWriteCSR(CSL_Reg32 val)
  1154. {
  1155. Uint32 oldVal;
  1156. /** Control Status Register */
  1157. oldVal = CSR;
  1158. CSR = val;
  1159. return oldVal;
  1160. }
  1161. /** ============================================================================
  1162. * @n@b CSL_chipWriteISR
  1163. *
  1164. * @b Description
  1165. * @n This API configures the Interrupt Set Register (ISR) with the specified
  1166. * new value 'val'. This API returns the old ISR value on return.
  1167. *
  1168. * @b Arguments
  1169. * @verbatim
  1170. val Value to be written.
  1171. @endverbatim
  1172. *
  1173. * <b> Return Value </b> Uint32
  1174. * @li New programmed value
  1175. *
  1176. * <b> Pre Condition </b>
  1177. * @n None
  1178. *
  1179. * <b> Post Condition </b>
  1180. * @n The ISR control register is written with the value passed
  1181. *
  1182. * @b Writes
  1183. * @n ISR
  1184. *
  1185. * <b> Usage Constraints: </b>
  1186. * @n Please refer to the C64x+ user guide for constraints while accessing
  1187. * registers in different privilege levels.
  1188. *
  1189. * @b Example
  1190. * @verbatim
  1191. Uint32 oldISR;
  1192. oldISR = CSL_chipWriteISR (56);
  1193. @endverbatim
  1194. * ===========================================================================
  1195. */
  1196. /*misra requires duplicated prototype even for static functions*/
  1197. static inline Uint32 CSL_chipWriteISR(CSL_Reg32 val);
  1198. static inline Uint32 CSL_chipWriteISR(CSL_Reg32 val)
  1199. {
  1200. Uint32 oldVal;
  1201. /** Read Interrupt Flag Register and write to the Interrupt Set Register */
  1202. oldVal = IFR;
  1203. ISR = val;
  1204. return oldVal;
  1205. }
  1206. /** ============================================================================
  1207. * @n@b CSL_chipWriteICR
  1208. *
  1209. * @b Description
  1210. * @n This API writes to the Interrupt Clear Register (ICR) with the specified
  1211. * new value 'val' to clear the maskable interrupts configured in the IFR
  1212. * register. This API returns the old interrupt state from IFR value on return.
  1213. *
  1214. * @b Arguments
  1215. * @verbatim
  1216. val Value to be written.
  1217. @endverbatim
  1218. *
  1219. * <b> Return Value </b> Uint32
  1220. * @li New programmed value from IFR
  1221. *
  1222. * <b> Pre Condition </b>
  1223. * @n None
  1224. *
  1225. * <b> Post Condition </b>
  1226. * @n The ICR control register is written with the value passed
  1227. *
  1228. * @b Writes
  1229. * @n ICR
  1230. *
  1231. * @b Affects
  1232. * @n IFR
  1233. *
  1234. * <b> Usage Constraints: </b>
  1235. * @n Please refer to the C64x+ user guide for constraints while accessing
  1236. * registers in different privilege levels.
  1237. *
  1238. * @b Example
  1239. * @verbatim
  1240. Uint32 oldIFR;
  1241. oldIFR = CSL_chipWriteICR (56);
  1242. @endverbatim
  1243. * ===========================================================================
  1244. */
  1245. /*misra requires duplicated prototype even for static functions*/
  1246. static inline Uint32 CSL_chipWriteICR(CSL_Reg32 val);
  1247. static inline Uint32 CSL_chipWriteICR(CSL_Reg32 val)
  1248. {
  1249. Uint32 oldVal;
  1250. /* Reads the old interrupt set status from the Interrupt Flag Register and
  1251. * clears the interrupts specified by writing to Interrupt Clear Register
  1252. */
  1253. oldVal = IFR;
  1254. ICR = val;
  1255. return oldVal;
  1256. }
  1257. /** ============================================================================
  1258. * @n@b CSL_chipWriteIER
  1259. *
  1260. * @b Description
  1261. * @n This API writes to the Interrupt Enable Register (IER) with the specified
  1262. * new value 'val' to enable/disable individual interrupts in the system.
  1263. * This API returns the old interrupt enable state from IER value on return.
  1264. *
  1265. * @b Arguments
  1266. * @verbatim
  1267. val Value to be written.
  1268. @endverbatim
  1269. *
  1270. * <b> Return Value </b> Uint32
  1271. * @li New programmed value from IER
  1272. *
  1273. * <b> Pre Condition </b>
  1274. * @n None
  1275. *
  1276. * <b> Post Condition </b>
  1277. * @n The IER control register is written with the value passed
  1278. *
  1279. * @b Writes
  1280. * @n IER
  1281. *
  1282. * <b> Usage Constraints: </b>
  1283. * @n Please refer to the C64x+ user guide for constraints while accessing
  1284. * registers in different privilege levels.
  1285. *
  1286. * @b Example
  1287. * @verbatim
  1288. Uint32 oldIER;
  1289. oldIER = CSL_chipWriteIER (56);
  1290. @endverbatim
  1291. * ===========================================================================
  1292. */
  1293. /*misra requires duplicated prototype even for static functions*/
  1294. static inline Uint32 CSL_chipWriteIER(CSL_Reg32 val);
  1295. static inline Uint32 CSL_chipWriteIER(CSL_Reg32 val)
  1296. {
  1297. Uint32 oldVal;
  1298. /** Interrupt Enable Register */
  1299. oldVal = IER;
  1300. IER = val;
  1301. return oldVal;
  1302. }
  1303. /** ============================================================================
  1304. * @n@b CSL_chipWriteISTP
  1305. *
  1306. * @b Description
  1307. * @n This API writes to the Interrupt Service Table Pointer Register (ISTP)
  1308. * with the specified value 'val' to setup a ISR base address for a given
  1309. * interrupt in the ISTB. This API returns the old ISTP value on return.
  1310. *
  1311. * @b Arguments
  1312. * @verbatim
  1313. val Value to be written.
  1314. @endverbatim
  1315. *
  1316. * <b> Return Value </b> Uint32
  1317. * @li New programmed value from ISTP
  1318. *
  1319. * <b> Pre Condition </b>
  1320. * @n None
  1321. *
  1322. * <b> Post Condition </b>
  1323. * @n The ISTP control register is written with the value passed
  1324. *
  1325. * @b Writes
  1326. * @n ISTP
  1327. *
  1328. * <b> Usage Constraints: </b>
  1329. * @n Please refer to the C64x+ user guide for constraints while accessing
  1330. * registers in different privilege levels.
  1331. *
  1332. * @b Example
  1333. * @verbatim
  1334. Uint32 oldISTP;
  1335. oldISTP = CSL_chipWriteISTP (56);
  1336. @endverbatim
  1337. * ===========================================================================
  1338. */
  1339. /*misra requires duplicated prototype even for static functions*/
  1340. static inline Uint32 CSL_chipWriteISTP(CSL_Reg32 val);
  1341. static inline Uint32 CSL_chipWriteISTP(CSL_Reg32 val)
  1342. {
  1343. Uint32 oldVal;
  1344. /** Interrupt Service Table Pointer Register */
  1345. oldVal = ISTP;
  1346. ISTP = val;
  1347. return oldVal;
  1348. }
  1349. /** ============================================================================
  1350. * @n@b CSL_chipWriteIRP
  1351. *
  1352. * @b Description
  1353. * @n This API writes to the Interrupt Return Pointer Register (IRP)
  1354. * with the specified value 'val' to setup a return point in the program to
  1355. * continue execution after a maskable interrupt is executed. This API
  1356. * returns the old IRP value on return.
  1357. *
  1358. * @b Arguments
  1359. * @verbatim
  1360. val Value to be written.
  1361. @endverbatim
  1362. *
  1363. * <b> Return Value </b> Uint32
  1364. * @li New programmed value from IRP
  1365. *
  1366. * <b> Pre Condition </b>
  1367. * @n None
  1368. *
  1369. * <b> Post Condition </b>
  1370. * @n The IRP control register is written with the value passed
  1371. *
  1372. * @b Writes
  1373. * @n IRP
  1374. *
  1375. * <b> Usage Constraints: </b>
  1376. * @n Please refer to the C64x+ user guide for constraints while accessing
  1377. * registers in different privilege levels.
  1378. *
  1379. * @b Example
  1380. * @verbatim
  1381. Uint32 oldIRP;
  1382. oldIRP = CSL_chipWriteIRP (56);
  1383. @endverbatim
  1384. * ===========================================================================
  1385. */
  1386. /*misra requires duplicated prototype even for static functions*/
  1387. static inline Uint32 CSL_chipWriteIRP(CSL_Reg32 val);
  1388. static inline Uint32 CSL_chipWriteIRP(CSL_Reg32 val)
  1389. {
  1390. Uint32 oldVal;
  1391. /** Interrupt Return Pointer Register */
  1392. oldVal = IRP;
  1393. IRP = val;
  1394. return oldVal;
  1395. }
  1396. /** ============================================================================
  1397. * @n@b CSL_chipWriteNRP
  1398. *
  1399. * @b Description
  1400. * @n This API writes to the NMI Return Pointer Register (NRP) with the specified
  1401. * value 'val' to setup a return point in the program to continue execution after
  1402. * an NMI has occured. This API returns the old NRP value on return.
  1403. *
  1404. * @b Arguments
  1405. * @verbatim
  1406. val Value to be written.
  1407. @endverbatim
  1408. *
  1409. * <b> Return Value </b> Uint32
  1410. * @li New programmed value from NRP
  1411. *
  1412. * <b> Pre Condition </b>
  1413. * @n None
  1414. *
  1415. * <b> Post Condition </b>
  1416. * @n The NRP control register is written with the value passed
  1417. *
  1418. * @b Writes
  1419. * @n NRP
  1420. *
  1421. * <b> Usage Constraints: </b>
  1422. * @n Please refer to the C64x+ user guide for constraints while accessing
  1423. * registers in different privilege levels.
  1424. *
  1425. * @b Example
  1426. * @verbatim
  1427. Uint32 oldNRP;
  1428. oldNRP = CSL_chipWriteNRP (56);
  1429. @endverbatim
  1430. * ===========================================================================
  1431. */
  1432. /*misra requires duplicated prototype even for static functions*/
  1433. static inline Uint32 CSL_chipWriteNRP(CSL_Reg32 val);
  1434. static inline Uint32 CSL_chipWriteNRP(CSL_Reg32 val)
  1435. {
  1436. Uint32 oldVal;
  1437. /** Nonmaskable Interrupt (NMI) Registers */
  1438. oldVal = NRP;
  1439. NRP = val;
  1440. return oldVal;
  1441. }
  1442. /** ============================================================================
  1443. * @n@b CSL_chipWriteERP
  1444. *
  1445. * @b Description
  1446. * @n This API writes to the Exception Return Pointer Register (ERP) with the specified
  1447. * value 'val' to setup a return point in the program to continue execution after
  1448. * an exception has occured. This API returns the old ERP value on return.
  1449. *
  1450. * @b Arguments
  1451. * @verbatim
  1452. val Value to be written.
  1453. @endverbatim
  1454. *
  1455. * <b> Return Value </b> Uint32
  1456. * @li New programmed value from NRP register
  1457. *
  1458. * <b> Pre Condition </b>
  1459. * @n None
  1460. *
  1461. * <b> Post Condition </b>
  1462. * @n The NRP control register is written with the value passed
  1463. *
  1464. * @b Writes
  1465. * @n NRP
  1466. *
  1467. * <b> Usage Constraints: </b>
  1468. * @n Please refer to the C64x+ user guide for constraints while accessing
  1469. * registers in different privilege levels.
  1470. *
  1471. * @b Example
  1472. * @verbatim
  1473. Uint32 oldERP;
  1474. oldERP = CSL_chipWriteERP (56);
  1475. @endverbatim
  1476. * ===========================================================================
  1477. */
  1478. /*misra requires duplicated prototype even for static functions*/
  1479. static inline Uint32 CSL_chipWriteERP(CSL_Reg32 val);
  1480. static inline Uint32 CSL_chipWriteERP(CSL_Reg32 val)
  1481. {
  1482. Uint32 oldVal;
  1483. /** Exception Return Point (ERP) Registers */
  1484. oldVal = NRP;
  1485. NRP = val;
  1486. return oldVal;
  1487. }
  1488. /** ============================================================================
  1489. * @n@b CSL_chipWriteTSCL
  1490. *
  1491. * @b Description
  1492. * @n This API writes to the Time-Stamp Counter (low order 32 bits) Register (TSCL)
  1493. * with the specified value 'val' to enable the TSC. This API returns the
  1494. * old TSCL value on return. The actual value written "val" to TSCL has no effect on
  1495. * the Time stamp counter. The value is simply ignored by the hardware, and a write to
  1496. * TSCL is used only to enable the Time Stamp Counter.
  1497. *
  1498. * @b Arguments
  1499. * @verbatim
  1500. val Value to be written.
  1501. @endverbatim
  1502. *
  1503. * <b> Return Value </b> Uint32
  1504. * @li New programmed value from TSCL register
  1505. *
  1506. * <b> Pre Condition </b>
  1507. * @n None
  1508. *
  1509. * <b> Post Condition </b>
  1510. * @n The TSCL control register is written with the value passed
  1511. *
  1512. * @b Writes
  1513. * @n TSCL
  1514. *
  1515. * <b> Usage Constraints: </b>
  1516. * @n Please refer to the C64x+ user guide for constraints while accessing
  1517. * registers in different privilege levels.
  1518. *
  1519. * @b Example
  1520. * @verbatim
  1521. Uint32 oldTSCL;
  1522. oldTSCL = CSL_chipWriteTSCL (56);
  1523. @endverbatim
  1524. * ===========================================================================
  1525. */
  1526. /*misra requires duplicated prototype even for static functions*/
  1527. static inline Uint32 CSL_chipWriteTSCL(CSL_Reg32 val);
  1528. static inline Uint32 CSL_chipWriteTSCL(CSL_Reg32 val)
  1529. {
  1530. Uint32 oldVal;
  1531. /** Time Stamp Counter Register - Low */
  1532. oldVal = TSCL;
  1533. TSCL = val;
  1534. return oldVal;
  1535. }
  1536. /** ============================================================================
  1537. * @n@b CSL_chipWriteARP
  1538. *
  1539. * @b Description
  1540. * @n This API writes to the Analysis Return Pointer (ARP) with the
  1541. * specified value 'val'. This API returns the old ARP value on return.
  1542. *
  1543. * @b Arguments
  1544. * @verbatim
  1545. val Value to be written.
  1546. @endverbatim
  1547. *
  1548. * <b> Return Value </b> Uint32
  1549. * @li New programmed value from ARP register
  1550. *
  1551. * <b> Pre Condition </b>
  1552. * @n None
  1553. *
  1554. * <b> Post Condition </b>
  1555. * @n The ARP control register is written with the value passed
  1556. *
  1557. * @b Writes
  1558. * @n ARP
  1559. *
  1560. * <b> Usage Constraints: </b>
  1561. * @n Please refer to the C64x+ user guide for constraints while accessing
  1562. * registers in different privilege levels.
  1563. *
  1564. * @b Example
  1565. * @verbatim
  1566. Uint32 oldARP;
  1567. oldARP = CSL_chipWriteARP (56);
  1568. @endverbatim
  1569. * ===========================================================================
  1570. */
  1571. /*misra requires duplicated prototype even for static functions*/
  1572. static inline Uint32 CSL_chipWriteARP(CSL_Reg32 val);
  1573. static inline Uint32 CSL_chipWriteARP(CSL_Reg32 val)
  1574. {
  1575. Uint32 oldVal;
  1576. /** Analysis Return Point Register */
  1577. oldVal = ARP;
  1578. ARP = val;
  1579. return oldVal;
  1580. }
  1581. /** ============================================================================
  1582. * @n@b CSL_chipWriteILC
  1583. *
  1584. * @b Description
  1585. * @n This API writes to the SPLOOP Inner Loop Count Register (ILC) with the
  1586. * specified value 'val'. This API returns the old ILC value on return.
  1587. *
  1588. * @b Arguments
  1589. * @verbatim
  1590. val Value to be written.
  1591. @endverbatim
  1592. *
  1593. * <b> Return Value </b> Uint32
  1594. * @li New programmed value from ILC register
  1595. *
  1596. * <b> Pre Condition </b>
  1597. * @n None
  1598. *
  1599. * <b> Post Condition </b>
  1600. * @n The ILC control register is written with the value passed
  1601. *
  1602. * @b Writes
  1603. * @n ILC
  1604. *
  1605. * <b> Usage Constraints: </b>
  1606. * @n Please refer to the C64x+ user guide for constraints while accessing
  1607. * registers in different privilege levels.
  1608. *
  1609. * @b Example
  1610. * @verbatim
  1611. Uint32 oldILC;
  1612. oldILC = CSL_chipWriteILC (56);
  1613. @endverbatim
  1614. * ===========================================================================
  1615. */
  1616. /*misra requires duplicated prototype even for static functions*/
  1617. static inline Uint32 CSL_chipWriteILC(CSL_Reg32 val);
  1618. static inline Uint32 CSL_chipWriteILC(CSL_Reg32 val)
  1619. {
  1620. Uint32 oldVal;
  1621. /** SPLOOP Inner Loop Count Register */
  1622. oldVal = ILC;
  1623. ILC = val;
  1624. return oldVal;
  1625. }
  1626. /** ============================================================================
  1627. * @n@b CSL_chipWriteRILC
  1628. *
  1629. * @b Description
  1630. * @n This API writes to the SPLOOP Reload Inner Loop Count Register (RILC) with
  1631. * the specified value 'val'. This API returns the old RILC value on return.
  1632. *
  1633. * @b Arguments
  1634. * @verbatim
  1635. val Value to be written.
  1636. @endverbatim
  1637. *
  1638. * <b> Return Value </b> Uint32
  1639. * @li New programmed value from RILC register
  1640. *
  1641. * <b> Pre Condition </b>
  1642. * @n None
  1643. *
  1644. * <b> Post Condition </b>
  1645. * @n The RILC control register is written with the value passed
  1646. *
  1647. * @b Writes
  1648. * @n RILC
  1649. *
  1650. * <b> Usage Constraints: </b>
  1651. * @n Please refer to the C64x+ user guide for constraints while accessing
  1652. * registers in different privilege levels.
  1653. *
  1654. * @b Example
  1655. * @verbatim
  1656. Uint32 oldRILC;
  1657. oldRILC = CSL_chipWriteRILC (56);
  1658. @endverbatim
  1659. * ===========================================================================
  1660. */
  1661. /*misra requires duplicated prototype even for static functions*/
  1662. static inline Uint32 CSL_chipWriteRILC(CSL_Reg32 val);
  1663. static inline Uint32 CSL_chipWriteRILC(CSL_Reg32 val)
  1664. {
  1665. Uint32 oldVal;
  1666. /** SPLOOP Reload Inner Loop Count Register */
  1667. oldVal = RILC;
  1668. RILC = val;
  1669. return oldVal;
  1670. }
  1671. /** ============================================================================
  1672. * @n@b CSL_chipWriteREP
  1673. *
  1674. * @b Description
  1675. * @n This API writes to the Restricted Entry-Point Register (REP) with
  1676. * the specified value 'val'. This API returns the old REP value on return.
  1677. *
  1678. * @b Arguments
  1679. * @verbatim
  1680. val Value to be written.
  1681. @endverbatim
  1682. *
  1683. * <b> Return Value </b> Uint32
  1684. * @li New programmed value from REP register
  1685. *
  1686. * <b> Pre Condition </b>
  1687. * @n None
  1688. *
  1689. * <b> Post Condition </b>
  1690. * @n The REP control register is written with the value passed
  1691. *
  1692. * @b Writes
  1693. * @n REP
  1694. *
  1695. * <b> Usage Constraints: </b>
  1696. * @n Please refer to the C64x+ user guide for constraints while accessing
  1697. * registers in different privilege levels.
  1698. *
  1699. * @b Example
  1700. * @verbatim
  1701. Uint32 oldREP;
  1702. oldREP = CSL_chipWriteREP (56);
  1703. @endverbatim
  1704. * ===========================================================================
  1705. */
  1706. /*misra requires duplicated prototype even for static functions*/
  1707. static inline Uint32 CSL_chipWriteREP(CSL_Reg32 val);
  1708. static inline Uint32 CSL_chipWriteREP(CSL_Reg32 val)
  1709. {
  1710. Uint32 oldVal;
  1711. /** Restricted Entry Point Address Register */
  1712. oldVal = REP;
  1713. REP = val;
  1714. return oldVal;
  1715. }
  1716. /** ============================================================================
  1717. * @n@b CSL_chipWriteSSR
  1718. *
  1719. * @b Description
  1720. * @n This API writes to the Saturation Status Register (SSR) with
  1721. * the specified value 'val'. This API returns the old SSR value on return.
  1722. *
  1723. * @b Arguments
  1724. * @verbatim
  1725. val Value to be written.
  1726. @endverbatim
  1727. *
  1728. * <b> Return Value </b> Uint32
  1729. * @li New programmed value from SSR register
  1730. *
  1731. * <b> Pre Condition </b>
  1732. * @n None
  1733. *
  1734. * <b> Post Condition </b>
  1735. * @n The SSR control register is written with the value passed
  1736. *
  1737. * @b Writes
  1738. * @n SSR
  1739. *
  1740. * <b> Usage Constraints: </b>
  1741. * @n Please refer to the C64x+ user guide for constraints while accessing
  1742. * registers in different privilege levels.
  1743. *
  1744. * @b Example
  1745. * @verbatim
  1746. Uint32 oldSSR;
  1747. oldSSR = CSL_chipWriteSSR (56);
  1748. @endverbatim
  1749. * ===========================================================================
  1750. */
  1751. /*misra requires duplicated prototype even for static functions*/
  1752. static inline Uint32 CSL_chipWriteSSR(CSL_Reg32 val);
  1753. static inline Uint32 CSL_chipWriteSSR(CSL_Reg32 val)
  1754. {
  1755. Uint32 oldVal;
  1756. /** Saturation Status Register */
  1757. oldVal = SSR;
  1758. SSR = val;
  1759. return oldVal;
  1760. }
  1761. /** ============================================================================
  1762. * @n@b CSL_chipWriteGPLYA
  1763. *
  1764. * @b Description
  1765. * @n This API writes to the GMPY Polynomial-A side Register (GPLYA) with
  1766. * the specified value 'val'. This API returns the old GPLYA value on return.
  1767. *
  1768. * @b Arguments
  1769. * @verbatim
  1770. val Value to be written.
  1771. @endverbatim
  1772. *
  1773. * <b> Return Value </b> Uint32
  1774. * @li New programmed value from GPLYA register
  1775. *
  1776. * <b> Pre Condition </b>
  1777. * @n None
  1778. *
  1779. * <b> Post Condition </b>
  1780. * @n The GPLYA control register is written with the value passed
  1781. *
  1782. * @b Writes
  1783. * @n GPLYA
  1784. *
  1785. * <b> Usage Constraints: </b>
  1786. * @n Please refer to the C64x+ user guide for constraints while accessing
  1787. * registers in different privilege levels.
  1788. *
  1789. * @b Example
  1790. * @verbatim
  1791. Uint32 oldGPLYA;
  1792. oldGPLYA = CSL_chipWriteGPLYA (56);
  1793. @endverbatim
  1794. * ===========================================================================
  1795. */
  1796. /*misra requires duplicated prototype even for static functions*/
  1797. static inline Uint32 CSL_chipWriteGPLYA(CSL_Reg32 val);
  1798. static inline Uint32 CSL_chipWriteGPLYA(CSL_Reg32 val)
  1799. {
  1800. Uint32 oldVal;
  1801. /** GMPY Polynomial.A Side Register */
  1802. oldVal = GPLYA;
  1803. GPLYA = val;
  1804. return oldVal;
  1805. }
  1806. /** ============================================================================
  1807. * @n@b CSL_chipWriteGPLYB
  1808. *
  1809. * @b Description
  1810. * @n This API writes to the GMPY Polynomial-B side Register (GPLYB) with
  1811. * the specified value 'val'. This API returns the old GPLYB value on return.
  1812. *
  1813. * @b Arguments
  1814. * @verbatim
  1815. val Value to be written.
  1816. @endverbatim
  1817. *
  1818. * <b> Return Value </b> Uint32
  1819. * @li New programmed value from GPLYB register
  1820. *
  1821. * <b> Pre Condition </b>
  1822. * @n None
  1823. *
  1824. * <b> Post Condition </b>
  1825. * @n The GPLYB control register is written with the value passed
  1826. *
  1827. * @b Writes
  1828. * @n GPLYB
  1829. *
  1830. * <b> Usage Constraints: </b>
  1831. * @n Please refer to the C64x+ user guide for constraints while accessing
  1832. * registers in different privilege levels.
  1833. *
  1834. * @b Example
  1835. * @verbatim
  1836. Uint32 oldGPLYB;
  1837. oldGPLYB = CSL_chipWriteGPLYB (56);
  1838. @endverbatim
  1839. * ===========================================================================
  1840. */
  1841. /*misra requires duplicated prototype even for static functions*/
  1842. static inline Uint32 CSL_chipWriteGPLYB(CSL_Reg32 val);
  1843. static inline Uint32 CSL_chipWriteGPLYB(CSL_Reg32 val)
  1844. {
  1845. Uint32 oldVal;
  1846. /** GMPY Polynomial.B Side Register */
  1847. oldVal = GPLYB;
  1848. GPLYB = val;
  1849. return oldVal;
  1850. }
  1851. /** ============================================================================
  1852. * @n@b CSL_chipWriteGFPGFR
  1853. *
  1854. * @b Description
  1855. * @n This API writes to the Galios Field Polynomial Generator Function Register
  1856. * (GFPGFR) with the specified value 'val'. This API returns the old GFPGFR value
  1857. * on return.
  1858. *
  1859. * @b Arguments
  1860. * @verbatim
  1861. val Value to be written.
  1862. @endverbatim
  1863. *
  1864. * <b> Return Value </b> Uint32
  1865. * @li New programmed value from GFPGFR register
  1866. *
  1867. * <b> Pre Condition </b>
  1868. * @n None
  1869. *
  1870. * <b> Post Condition </b>
  1871. * @n The GFPGFR control register is written with the value passed
  1872. *
  1873. * @b Writes
  1874. * @n GFPGFR
  1875. *
  1876. * <b> Usage Constraints: </b>
  1877. * @n Please refer to the C64x+ user guide for constraints while accessing
  1878. * registers in different privilege levels.
  1879. *
  1880. * @b Example
  1881. * @verbatim
  1882. Uint32 oldGFPGFR;
  1883. oldGFPGFR = CSL_chipWriteGFPGFR (56);
  1884. @endverbatim
  1885. * ===========================================================================
  1886. */
  1887. /*misra requires duplicated prototype even for static functions*/
  1888. static inline Uint32 CSL_chipWriteGFPGFR(CSL_Reg32 val);
  1889. static inline Uint32 CSL_chipWriteGFPGFR(CSL_Reg32 val)
  1890. {
  1891. Uint32 oldVal;
  1892. /** Galois Field Polynomial Generator Function Register */
  1893. oldVal = GFPGFR;
  1894. GFPGFR = val;
  1895. return oldVal;
  1896. }
  1897. /** ============================================================================
  1898. * @n@b CSL_chipWriteDIER
  1899. *
  1900. * @b Description
  1901. * @n This API writes to the Debug Interrupt Enable Register (DIER) with the
  1902. * specified value 'val'. This API returns the old DIER value on return.
  1903. *
  1904. * @b Arguments
  1905. * @verbatim
  1906. val Value to be written.
  1907. @endverbatim
  1908. *
  1909. * <b> Return Value </b> Uint32
  1910. * @li New programmed value from DIER register
  1911. *
  1912. * <b> Pre Condition </b>
  1913. * @n None
  1914. *
  1915. * <b> Post Condition </b>
  1916. * @n The DIER control register is written with the value passed
  1917. *
  1918. * @b Writes
  1919. * @n DIER
  1920. *
  1921. * <b> Usage Constraints: </b>
  1922. * @n Please refer to the C64x+ user guide for constraints while accessing
  1923. * registers in different privilege levels.
  1924. *
  1925. * @b Example
  1926. * @verbatim
  1927. Uint32 oldDIER;
  1928. oldDIER = CSL_chipWriteDIER (56);
  1929. @endverbatim
  1930. * ===========================================================================
  1931. */
  1932. /*misra requires duplicated prototype even for static functions*/
  1933. static inline Uint32 CSL_chipWriteDIER(CSL_Reg32 val);
  1934. static inline Uint32 CSL_chipWriteDIER(CSL_Reg32 val)
  1935. {
  1936. Uint32 oldVal;
  1937. /** Debug Interrupt Enable Register */
  1938. oldVal = DIER;
  1939. DIER = val;
  1940. return oldVal;
  1941. }
  1942. /** ============================================================================
  1943. * @n@b CSL_chipWriteTSR
  1944. *
  1945. * @b Description
  1946. * @n This API writes to the Task State Register (TSR) with the specified value
  1947. * 'val'. This API returns the old TSR value on return.
  1948. *
  1949. * @b Arguments
  1950. * @verbatim
  1951. val Value to be written.
  1952. @endverbatim
  1953. *
  1954. * <b> Return Value </b> Uint32
  1955. * @li New programmed value from TSR register
  1956. *
  1957. * <b> Pre Condition </b>
  1958. * @n None
  1959. *
  1960. * <b> Post Condition </b>
  1961. * @n The TSR control register is written with the value passed
  1962. *
  1963. * @b Writes
  1964. * @n TSR
  1965. *
  1966. * <b> Usage Constraints: </b>
  1967. * @n Please refer to the C64x+ user guide for constraints while accessing
  1968. * registers in different privilege levels.
  1969. *
  1970. * @b Example
  1971. * @verbatim
  1972. Uint32 oldTSR;
  1973. oldTSR = CSL_chipWriteTSR (56);
  1974. @endverbatim
  1975. * ===========================================================================
  1976. */
  1977. /*misra requires duplicated prototype even for static functions*/
  1978. static inline Uint32 CSL_chipWriteTSR(CSL_Reg32 val);
  1979. static inline Uint32 CSL_chipWriteTSR(CSL_Reg32 val)
  1980. {
  1981. Uint32 oldVal;
  1982. /** Task State Register */
  1983. oldVal = TSR;
  1984. TSR = val;
  1985. return oldVal;
  1986. }
  1987. /** ============================================================================
  1988. * @n@b CSL_chipWriteITSR
  1989. *
  1990. * @b Description
  1991. * @n This API writes to the Interrupt Task State Register (ITSR) with the
  1992. * specified value 'val'. This API returns the old ITSR value on return.
  1993. *
  1994. * @b Arguments
  1995. * @verbatim
  1996. val Value to be written.
  1997. @endverbatim
  1998. *
  1999. * <b> Return Value </b> Uint32
  2000. * @li New programmed value from ITSR register
  2001. *
  2002. * <b> Pre Condition </b>
  2003. * @n None
  2004. *
  2005. * <b> Post Condition </b>
  2006. * @n The ITSR control register is written with the value passed
  2007. *
  2008. * @b Writes
  2009. * @n ITSR
  2010. *
  2011. * <b> Usage Constraints: </b>
  2012. * @n Please refer to the C64x+ user guide for constraints while accessing
  2013. * registers in different privilege levels.
  2014. *
  2015. * @b Example
  2016. * @verbatim
  2017. Uint32 oldITSR;
  2018. oldITSR = CSL_chipWriteITSR (56);
  2019. @endverbatim
  2020. * ===========================================================================
  2021. */
  2022. /*misra requires duplicated prototype even for static functions*/
  2023. static inline Uint32 CSL_chipWriteITSR(CSL_Reg32 val);
  2024. static inline Uint32 CSL_chipWriteITSR(CSL_Reg32 val)
  2025. {
  2026. Uint32 oldVal;
  2027. /** Interrupt Task State Register */
  2028. oldVal = ITSR;
  2029. ITSR = val;
  2030. return oldVal;
  2031. }
  2032. /** ============================================================================
  2033. * @n@b CSL_chipWriteNTSR
  2034. *
  2035. * @b Description
  2036. * @n This API writes to the NMI/Exception Task State Register (NTSR) with the
  2037. * specified value 'val'. This API returns the old NTSR value on return.
  2038. *
  2039. * @b Arguments
  2040. * @verbatim
  2041. val Value to be written.
  2042. @endverbatim
  2043. *
  2044. * <b> Return Value </b> Uint32
  2045. * @li New programmed value from NTSR register
  2046. *
  2047. * <b> Pre Condition </b>
  2048. * @n None
  2049. *
  2050. * <b> Post Condition </b>
  2051. * @n The NTSR control register is written with the value passed
  2052. *
  2053. * @b Writes
  2054. * @n NTSR
  2055. *
  2056. * <b> Usage Constraints: </b>
  2057. * @n Please refer to the C64x+ user guide for constraints while accessing
  2058. * registers in different privilege levels.
  2059. *
  2060. * @b Example
  2061. * @verbatim
  2062. Uint32 oldNTSR;
  2063. oldNTSR = CSL_chipWriteNTSR (56);
  2064. @endverbatim
  2065. * ===========================================================================
  2066. */
  2067. /*misra requires duplicated prototype even for static functions*/
  2068. static inline Uint32 CSL_chipWriteNTSR(CSL_Reg32 val);
  2069. static inline Uint32 CSL_chipWriteNTSR(CSL_Reg32 val)
  2070. {
  2071. Uint32 oldVal;
  2072. /** NMI/Exception Task State Register */
  2073. oldVal = NTSR;
  2074. NTSR = val;
  2075. return oldVal;
  2076. }
  2077. /** ============================================================================
  2078. * @n@b CSL_chipWriteECR
  2079. *
  2080. * @b Description
  2081. * @n This API writes to the Exception Clear Register (ECR) with the specified
  2082. * value 'val' to clear the corresponding bits in the EFR. This API returns
  2083. * the old EFR value on return.
  2084. *
  2085. * @b Arguments
  2086. * @verbatim
  2087. val Value to be written.
  2088. @endverbatim
  2089. *
  2090. * <b> Return Value </b> Uint32
  2091. * @li New programmed value from EFR register
  2092. *
  2093. * <b> Pre Condition </b>
  2094. * @n None
  2095. *
  2096. * <b> Post Condition </b>
  2097. * @n The ECR control register is written with the value passed and the
  2098. * corresponding exception bits in the EFR register are cleared.
  2099. *
  2100. * @b Writes
  2101. * @n EFR
  2102. *
  2103. * <b> Usage Constraints: </b>
  2104. * @n Please refer to the C64x+ user guide for constraints while accessing
  2105. * registers in different privilege levels.
  2106. *
  2107. * @b Example
  2108. * @verbatim
  2109. Uint32 oldEFR;
  2110. oldEFR = CSL_chipWriteECR (56);
  2111. @endverbatim
  2112. * ===========================================================================
  2113. */
  2114. /*misra requires duplicated prototype even for static functions*/
  2115. static inline Uint32 CSL_chipWriteECR(CSL_Reg32 val);
  2116. static inline Uint32 CSL_chipWriteECR(CSL_Reg32 val)
  2117. {
  2118. Uint32 oldVal;
  2119. /** Return the old value from Exception Flag Register
  2120. * and set the Clear Register
  2121. */
  2122. oldVal = EFR;
  2123. ECR = val;
  2124. return oldVal;
  2125. }
  2126. /** ============================================================================
  2127. * @n@b CSL_chipWriteIERR
  2128. *
  2129. * @b Description
  2130. * @n This API writes to the Internal Exception Report Register (IERR) with the
  2131. * specified value 'val'. This API returns the old IERR value on return.
  2132. *
  2133. * @b Arguments
  2134. * @verbatim
  2135. val Value to be written.
  2136. @endverbatim
  2137. *
  2138. * <b> Return Value </b> Uint32
  2139. * @li New programmed value from IERR register
  2140. *
  2141. * <b> Pre Condition </b>
  2142. * @n None
  2143. *
  2144. * <b> Post Condition </b>
  2145. * @n The IERR control register is written with the value passed.
  2146. *
  2147. * @b Writes
  2148. * @n IERR
  2149. *
  2150. * <b> Usage Constraints: </b>
  2151. * @n Please refer to the C64x+ user guide for constraints while accessing
  2152. * registers in different privilege levels.
  2153. *
  2154. * @b Example
  2155. * @verbatim
  2156. Uint32 oldIERR;
  2157. oldIERR = CSL_chipWriteIERR (56);
  2158. @endverbatim
  2159. * ===========================================================================
  2160. */
  2161. /*misra requires duplicated prototype even for static functions*/
  2162. static inline Uint32 CSL_chipWriteIERR(CSL_Reg32 val);
  2163. static inline Uint32 CSL_chipWriteIERR(CSL_Reg32 val)
  2164. {
  2165. Uint32 oldVal;
  2166. /** Internal Exception Report Register */
  2167. oldVal = IERR;
  2168. IERR = val;
  2169. return oldVal;
  2170. }
  2171. #ifdef __cplusplus
  2172. }
  2173. #endif
  2174. /* @} */
  2175. #endif /* CSL_CHIPAUX_H */