std_nhet.h 62 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427
  1. /** @file std_nhet.h
  2. * @brief NHET Instruction Definition File
  3. * @date 29.May.2013
  4. * @version 03.05.02
  5. *
  6. * (c) Texas Instruments 2009-2013, All rights reserved.
  7. */
  8. #ifndef __STD_NHET_H__
  9. #define __STD_NHET_H__
  10. #include "sys_common.h"
  11. #if defined(_TMS470_BIG) || defined(__big_endian__)
  12. #ifndef HET_v2
  13. # define HET_v2 0
  14. #endif
  15. #ifndef HETBYTE
  16. # define HETBYTE uint8
  17. #endif
  18. typedef struct memory_format
  19. {
  20. uint32 program_word ;
  21. uint32 control_word ;
  22. uint32 data_word ;
  23. uint32 reserved_word ;
  24. } HET_MEMORY ;
  25. /*---------------------------------------------*/
  26. /* ACMP INSTRUCTION */
  27. /*---------------------------------------------*/
  28. typedef struct acmp_format
  29. {
  30. uint32 : 6 ;
  31. uint32 reqnum : 3 ;
  32. uint32 brk : 1 ;
  33. uint32 next_program_address : 9 ;
  34. uint32 op_code : 4 ;
  35. uint32 : 9 ;
  36. uint32 : 3 ;
  37. uint32 request : 2 ;
  38. uint32 auto_read_clear : 1 ;
  39. uint32 coutprv : 1 ;
  40. uint32 : 2 ;
  41. uint32 en_pin_action : 1 ;
  42. uint32 cond_addr : 9 ;
  43. uint32 pin_select : 5 ;
  44. uint32 ext_reg : 1 ;
  45. uint32 : 2 ;
  46. uint32 pin_action : 1 ;
  47. uint32 : 1 ;
  48. uint32 t_register_select : 1 ;
  49. uint32 ab_register_select : 1 ;
  50. uint32 interrupt_enable : 1 ;
  51. uint32 data : 25 ;
  52. uint32 : 7 ;
  53. } ACMP_FIELDS;
  54. typedef union
  55. {
  56. ACMP_FIELDS acmp ;
  57. HET_MEMORY memory ;
  58. } ACMP_INSTRUCTION;
  59. /*---------------------------------------------*/
  60. /* ECMP INSTRUCTION */
  61. /*---------------------------------------------*/
  62. typedef struct ecmp_format
  63. {
  64. uint32 : 6 ;
  65. uint32 reqnum : 3 ;
  66. uint32 brk : 1 ;
  67. uint32 next_program_address : 9 ;
  68. uint32 op_code : 4 ;
  69. uint32 hr_lr : 1 ;
  70. uint32 angle_compare : 1 ;
  71. uint32 : 7 ;
  72. uint32 : 3 ;
  73. uint32 request : 2 ;
  74. uint32 auto_read_clear : 1 ;
  75. uint32 : 3 ;
  76. uint32 en_pin_action : 1 ;
  77. uint32 cond_addr : 9 ;
  78. uint32 pin_select : 5 ;
  79. uint32 : 1 ;
  80. uint32 sub_opcode : 2 ;
  81. uint32 pin_action : 1 ;
  82. uint32 opposite_action : 1 ;
  83. uint32 t_register_select : 1 ;
  84. uint32 ab_register_select : 1 ;
  85. uint32 interrupt_enable : 1 ;
  86. uint32 data : 25 ;
  87. uint32 hr_data : 7 ;
  88. } ECMP_FIELDS;
  89. typedef union
  90. {
  91. ECMP_FIELDS ecmp ;
  92. HET_MEMORY memory ;
  93. } ECMP_INSTRUCTION;
  94. /*---------------------------------------------*/
  95. /* SCMP INSTRUCTION */
  96. /*---------------------------------------------*/
  97. typedef struct scmp_format
  98. {
  99. uint32 : 6 ;
  100. uint32 reqnum : 3 ;
  101. uint32 brk : 1 ;
  102. uint32 next_program_address : 9 ;
  103. uint32 op_code : 4 ;
  104. uint32 : 2 ;
  105. uint32 : 2 ;
  106. uint32 : 5 ;
  107. uint32 : 3 ;
  108. uint32 request : 2 ;
  109. uint32 auto_read_clear : 1 ;
  110. uint32 coutprv : 1 ;
  111. uint32 : 2 ;
  112. uint32 en_pin_action : 1 ;
  113. uint32 cond_addr : 9 ;
  114. uint32 pin_select : 5 ;
  115. uint32 : 1 ;
  116. uint32 compare_mode : 2 ;
  117. uint32 pin_action : 1 ;
  118. uint32 : 2 ;
  119. uint32 restart_en : 1 ;
  120. uint32 interrupt_enable : 1 ;
  121. uint32 data : 25 ;
  122. uint32 : 7 ;
  123. } SCMP_FIELDS ;
  124. typedef union
  125. {
  126. SCMP_FIELDS scmp ;
  127. HET_MEMORY memory ;
  128. } SCMP_INSTRUCTION;
  129. /*---------------------------------------------*/
  130. /* MCMP INSTRUCTION */
  131. /*---------------------------------------------*/
  132. typedef struct mcmp_format
  133. {
  134. uint32 : 6 ;
  135. uint32 reqnum : 3 ;
  136. uint32 brk : 1 ;
  137. uint32 next_program_address : 9 ;
  138. uint32 op_code : 4 ;
  139. uint32 hr_lr : 1 ;
  140. uint32 angle_compare : 1 ;
  141. uint32 : 1 ;
  142. uint32 save_subtract : 1 ;
  143. uint32 : 5 ;
  144. uint32 : 3 ;
  145. uint32 request : 2 ;
  146. uint32 auto_read_clear : 1 ;
  147. uint32 : 3 ;
  148. uint32 en_pin_action : 1 ;
  149. uint32 cond_addr : 9 ;
  150. uint32 pin_select : 5 ;
  151. uint32 : 1 ;
  152. uint32 sub_opcode : 1 ;
  153. uint32 order : 1 ;
  154. uint32 pin_action : 1 ;
  155. uint32 opposite_action : 1 ;
  156. uint32 t_register_select : 1 ;
  157. uint32 ab_register_select : 1 ;
  158. uint32 interrupt_enable : 1 ;
  159. uint32 data : 25 ;
  160. uint32 hr_data : 7 ;
  161. } MCMP_FIELDS ;
  162. typedef union
  163. {
  164. MCMP_FIELDS mcmp ;
  165. HET_MEMORY memory ;
  166. } MCMP_INSTRUCTION;
  167. /*---------------------------------------------*/
  168. /* MOV64 INSTRUCTION */
  169. /*---------------------------------------------*/
  170. typedef struct mov64_format
  171. {
  172. uint32 : 9 ;
  173. uint32 brk : 1 ;
  174. uint32 next_program_address : 9 ;
  175. uint32 op_code : 4 ;
  176. uint32 remote_address : 9 ;
  177. uint32 : 3 ;
  178. uint32 request : 2 ;
  179. uint32 auto_read_clear : 1 ;
  180. uint32 : 3 ;
  181. uint32 en_pin_action : 1 ;
  182. uint32 cond_addr : 9 ;
  183. uint32 pin_select : 5 ;
  184. uint32 : 1 ;
  185. uint32 compare_mode : 2 ;
  186. uint32 pin_action : 1 ;
  187. uint32 opposite_action : 1 ;
  188. uint32 t_register_select : 1 ;
  189. uint32 ab_register_select : 1 ;
  190. uint32 interrupt_enable : 1 ;
  191. uint32 data : 25 ;
  192. uint32 hr_data : 7 ;
  193. } MOV64_FIELDS ;
  194. typedef union
  195. {
  196. MOV64_FIELDS mov64 ;
  197. HET_MEMORY memory ;
  198. } MOV64_INSTRUCTION;
  199. /*---------------------------------------------*/
  200. /* DADM64 INSTRUCTION */
  201. /*---------------------------------------------*/
  202. typedef struct dadm64_format
  203. {
  204. uint32 : 9 ;
  205. uint32 brk : 1 ;
  206. uint32 next_program_address : 9 ;
  207. uint32 op_code : 4 ;
  208. uint32 remote_address : 9 ;
  209. uint32 : 3 ;
  210. uint32 request : 2 ;
  211. uint32 auto_read_clear : 1 ;
  212. uint32 : 3 ;
  213. uint32 en_pin_action : 1 ;
  214. uint32 cond_addr : 9 ;
  215. uint32 pin_select : 5 ;
  216. uint32 : 1 ;
  217. uint32 compare_mode : 2 ;
  218. uint32 pin_action : 1 ;
  219. uint32 opposite_action : 1 ;
  220. uint32 t_register_select : 1 ;
  221. uint32 ab_register_select : 1 ;
  222. uint32 interrupt_enable : 1 ;
  223. uint32 data : 25 ;
  224. uint32 hr_data : 7 ;
  225. } DADM64_FIELDS ;
  226. typedef union
  227. {
  228. DADM64_FIELDS dadm64 ;
  229. HET_MEMORY memory ;
  230. } DADM64_INSTRUCTION;
  231. /*---------------------------------------------*/
  232. /* RADM64 INSTRUCTION */
  233. /*---------------------------------------------*/
  234. typedef struct RADM64_format
  235. {
  236. uint32 : 9 ;
  237. uint32 brk : 1 ;
  238. uint32 next_program_address : 9 ;
  239. uint32 op_code : 4 ;
  240. uint32 remote_address : 9 ;
  241. uint32 : 3 ;
  242. uint32 request : 2 ;
  243. uint32 auto_read_clear : 1 ;
  244. uint32 : 3 ;
  245. uint32 en_pin_action : 1 ;
  246. uint32 cond_addr : 9 ;
  247. uint32 pin_select : 5 ;
  248. uint32 : 1 ;
  249. uint32 compare_mode : 2 ;
  250. uint32 pin_action : 1 ;
  251. uint32 opposite_action : 1 ;
  252. uint32 t_register_select : 1 ;
  253. uint32 ab_register_select : 1 ;
  254. uint32 interrupt_enable : 1 ;
  255. uint32 data : 25 ;
  256. uint32 hr_data : 7 ;
  257. } RADM64_FIELDS ;
  258. typedef union
  259. {
  260. RADM64_FIELDS radm64 ;
  261. HET_MEMORY memory ;
  262. } RADM64_INSTRUCTION;
  263. /*---------------------------------------------*/
  264. /* MOV32 INSTRUCTION */
  265. /*---------------------------------------------*/
  266. typedef struct MOV32_format
  267. {
  268. uint32 : 9 ;
  269. uint32 brk : 1 ;
  270. uint32 next_program_address : 9 ;
  271. uint32 op_code : 4 ;
  272. uint32 remote_address : 9 ;
  273. uint32 : 5 ;
  274. uint32 auto_read_clear : 1 ;
  275. uint32 : 3 ;
  276. uint32 z_flag : 1 ;
  277. uint32 : 15 ;
  278. uint32 init_flag : 1 ;
  279. uint32 sub_opcode : 1 ;
  280. uint32 move_type : 2 ;
  281. uint32 t_register_select : 1 ;
  282. uint32 ab_register_select : 1 ;
  283. uint32 : 1 ;
  284. uint32 data : 25 ;
  285. uint32 hr_data : 7 ;
  286. } MOV32_FIELDS ;
  287. typedef union
  288. {
  289. MOV32_FIELDS mov32 ;
  290. HET_MEMORY memory ;
  291. } MOV32_INSTRUCTION;
  292. /*---------------------------------------------*/
  293. /* ADM32 INSTRUCTION */
  294. /*---------------------------------------------*/
  295. typedef struct ADM32_format
  296. {
  297. uint32 : 9 ;
  298. uint32 brk : 1 ;
  299. uint32 next_program_address : 9 ;
  300. uint32 op_code : 4 ;
  301. uint32 remote_address : 9 ;
  302. uint32 : 5 ;
  303. uint32 auto_read_clear : 1 ;
  304. uint32 : 19 ;
  305. uint32 init_flag : 1 ;
  306. uint32 sub_opcode : 1 ;
  307. uint32 move_type : 2 ;
  308. uint32 t_register_select : 1 ;
  309. uint32 ab_register_select : 1 ;
  310. uint32 : 1 ;
  311. uint32 data : 25 ;
  312. uint32 hr_data : 7 ;
  313. } ADM32_FIELDS ;
  314. typedef union
  315. {
  316. ADM32_FIELDS adm32 ;
  317. HET_MEMORY memory ;
  318. } ADM32_INSTRUCTION;
  319. /*---------------------------------------------*/
  320. /* ADCNST INSTRUCTION */
  321. /*---------------------------------------------*/
  322. typedef struct ADCNST_format
  323. {
  324. uint32 : 9 ;
  325. uint32 brk : 1 ;
  326. uint32 next_program_address : 9 ;
  327. uint32 op_code : 4 ;
  328. uint32 remote_address : 9 ;
  329. uint32 : 5 ;
  330. uint32 control : 1 ; /* pk */
  331. uint32 : 1 ;
  332. uint32 constant : 25 ;
  333. uint32 data : 25 ;
  334. uint32 hr_data : 7 ;
  335. } ADCNST_FIELDS ;
  336. typedef union
  337. {
  338. ADCNST_FIELDS adcnst ;
  339. HET_MEMORY memory ;
  340. } ADCNST_INSTRUCTION;
  341. /*----------------------------------------------*/
  342. /* ADD INSTRUCTION */
  343. /*----------------------------------------------*/
  344. typedef struct ADD_format
  345. {
  346. uint32 : 9 ;
  347. uint32 brk : 1 ;
  348. uint32 next_program_address : 9 ;
  349. uint32 op_code : 4 ;
  350. uint32 remote_address : 9 ;
  351. uint32 : 5 ;
  352. uint32 control : 1;
  353. uint32 sub_opcode3 : 3 ;
  354. uint32 src_1 : 4 ;
  355. uint32 src_2 : 3 ;
  356. uint32 shft_mode : 3 ;
  357. uint32 shft_cnt : 5 ;
  358. uint32 reg_ext : 1 ;
  359. uint32 init_flag : 1 ;
  360. uint32 sub_opcode1 : 1 ;
  361. uint32 rem_dest : 2 ;
  362. uint32 reg : 2 ;
  363. uint32 : 1 ;
  364. uint32 data : 25 ;
  365. uint32 hr_data : 7 ;
  366. } ADD_FIELDS ;
  367. typedef union
  368. {
  369. ADD_FIELDS add ;
  370. HET_MEMORY memory ;
  371. } ADD_INSTRUCTION;
  372. /*----------------------------------------------*/
  373. /* ADC INSTRUCTION */
  374. /*----------------------------------------------*/
  375. typedef struct ADC_format
  376. {
  377. uint32 : 9 ;
  378. uint32 brk : 1 ;
  379. uint32 next_program_address : 9 ;
  380. uint32 op_code : 4 ;
  381. uint32 remote_address : 9 ;
  382. uint32 : 5 ;
  383. uint32 control : 1;
  384. uint32 sub_opcode3 : 3 ;
  385. uint32 src_1 : 4 ;
  386. uint32 src_2 : 3 ;
  387. uint32 shft_mode : 3 ;
  388. uint32 shft_cnt : 5 ;
  389. uint32 reg_ext : 1 ;
  390. uint32 init_flag : 1 ;
  391. uint32 sub_opcode1 : 1 ;
  392. uint32 rem_dest : 2 ;
  393. uint32 reg : 2 ;
  394. uint32 : 1 ;
  395. uint32 data : 25 ;
  396. uint32 hr_data : 7 ;
  397. } ADC_FIELDS ;
  398. typedef union
  399. {
  400. ADC_FIELDS adc ;
  401. HET_MEMORY memory ;
  402. } ADC_INSTRUCTION;
  403. /*----------------------------------------------*/
  404. /* SUB INSTRUCTION */
  405. /*----------------------------------------------*/
  406. typedef struct SUB_format
  407. {
  408. uint32 : 9 ;
  409. uint32 brk : 1 ;
  410. uint32 next_program_address : 9 ;
  411. uint32 op_code : 4 ;
  412. uint32 remote_address : 9 ;
  413. uint32 : 5 ;
  414. uint32 control : 1;
  415. uint32 sub_opcode3 : 3 ;
  416. uint32 src_1 : 4 ;
  417. uint32 src_2 : 3 ;
  418. uint32 shft_mode : 3 ;
  419. uint32 shft_cnt : 5 ;
  420. uint32 reg_ext : 1 ;
  421. uint32 init_flag : 1 ;
  422. uint32 sub_opcode1 : 1 ;
  423. uint32 rem_dest : 2 ;
  424. uint32 reg : 2 ;
  425. uint32 : 1 ;
  426. uint32 data : 25 ;
  427. uint32 hr_data : 7 ;
  428. } SUB_FIELDS ;
  429. typedef union
  430. {
  431. SUB_FIELDS sub ;
  432. HET_MEMORY memory ;
  433. } SUB_INSTRUCTION;
  434. /*----------------------------------------------*/
  435. /* SBB INSTRUCTION */
  436. /*----------------------------------------------*/
  437. typedef struct SBB_format
  438. {
  439. uint32 : 9 ;
  440. uint32 brk : 1 ;
  441. uint32 next_program_address : 9 ;
  442. uint32 op_code : 4 ;
  443. uint32 remote_address : 9 ;
  444. uint32 : 5 ;
  445. uint32 control : 1;
  446. uint32 sub_opcode3 : 3 ;
  447. uint32 src_1 : 4 ;
  448. uint32 src_2 : 3 ;
  449. uint32 shft_mode : 3 ;
  450. uint32 shft_cnt : 5 ;
  451. uint32 reg_ext : 1 ;
  452. uint32 init_flag : 1 ;
  453. uint32 sub_opcode1 : 1 ;
  454. uint32 rem_dest : 2 ;
  455. uint32 reg : 2 ;
  456. uint32 : 1 ;
  457. uint32 data : 25 ;
  458. uint32 hr_data : 7 ;
  459. } SBB_FIELDS ;
  460. typedef union
  461. {
  462. SBB_FIELDS sbb ;
  463. HET_MEMORY memory ;
  464. } SBB_INSTRUCTION;
  465. /*----------------------------------------------*/
  466. /* AND INSTRUCTION */
  467. /*----------------------------------------------*/
  468. typedef struct AND_format
  469. {
  470. uint32 : 9 ;
  471. uint32 brk : 1 ;
  472. uint32 next_program_address : 9 ;
  473. uint32 op_code : 4 ;
  474. uint32 remote_address : 9 ;
  475. uint32 : 5 ;
  476. uint32 control : 1;
  477. uint32 sub_opcode3 : 3 ;
  478. uint32 src_1 : 4 ;
  479. uint32 src_2 : 3 ;
  480. uint32 shft_mode : 3 ;
  481. uint32 shft_cnt : 5 ;
  482. uint32 reg_ext : 1 ;
  483. uint32 init_flag : 1 ;
  484. uint32 sub_opcode1 : 1 ;
  485. uint32 rem_dest : 2 ;
  486. uint32 reg : 2 ;
  487. uint32 : 1 ;
  488. uint32 data : 25 ;
  489. uint32 hr_data : 7 ;
  490. } AND_FIELDS ;
  491. typedef union
  492. {
  493. AND_FIELDS and ;
  494. HET_MEMORY memory ;
  495. } AND_INSTRUCTION;
  496. /*----------------------------------------------*/
  497. /* OR INSTRUCTION */
  498. /*----------------------------------------------*/
  499. typedef struct OR_format
  500. {
  501. uint32 : 9 ;
  502. uint32 brk : 1 ;
  503. uint32 next_program_address : 9 ;
  504. uint32 op_code : 4 ;
  505. uint32 remote_address : 9 ;
  506. uint32 : 5 ;
  507. uint32 control : 1;
  508. uint32 sub_opcode3 : 3 ;
  509. uint32 src_1 : 4 ;
  510. uint32 src_2 : 3 ;
  511. uint32 shft_mode : 3 ;
  512. uint32 shft_cnt : 5 ;
  513. uint32 reg_ext : 1 ;
  514. uint32 init_flag : 1 ;
  515. uint32 sub_opcode1 : 1 ;
  516. uint32 rem_dest : 2 ;
  517. uint32 reg : 2 ;
  518. uint32 : 1 ;
  519. uint32 data : 25 ;
  520. uint32 hr_data : 7 ;
  521. } OR_FIELDS ;
  522. typedef union
  523. {
  524. OR_FIELDS or ;
  525. HET_MEMORY memory ;
  526. } OR_INSTRUCTION;
  527. /*----------------------------------------------*/
  528. /* XOR INSTRUCTION */
  529. /*----------------------------------------------*/
  530. typedef struct XOR_format
  531. {
  532. uint32 : 9 ;
  533. uint32 brk : 1 ;
  534. uint32 next_program_address : 9 ;
  535. uint32 op_code : 4 ;
  536. uint32 remote_address : 9 ;
  537. uint32 : 5 ;
  538. uint32 control : 1;
  539. uint32 sub_opcode3 : 3 ;
  540. uint32 src_1 : 4 ;
  541. uint32 src_2 : 3 ;
  542. uint32 shft_mode : 3 ;
  543. uint32 shft_cnt : 5 ;
  544. uint32 reg_ext : 1 ;
  545. uint32 init_flag : 1 ;
  546. uint32 sub_opcode1 : 1 ;
  547. uint32 rem_dest : 2 ;
  548. uint32 reg : 2 ;
  549. uint32 : 1 ;
  550. uint32 data : 25 ;
  551. uint32 hr_data : 7 ;
  552. } XOR_FIELDS ;
  553. typedef union
  554. {
  555. XOR_FIELDS xor ;
  556. HET_MEMORY memory ;
  557. } XOR_INSTRUCTION;
  558. /*---------------------------------------------*/
  559. /* CNT INSTRUCTION */
  560. /*---------------------------------------------*/
  561. typedef struct CNT_format
  562. {
  563. uint32 : 9 ;
  564. uint32 brk : 1 ;
  565. uint32 next_program_address : 9 ;
  566. uint32 op_code : 4 ;
  567. uint32 angle_cnt : 1 ;
  568. uint32 t_register_select : 1 ;
  569. uint32 ab_register_select : 1 ;
  570. uint32 : 4 ;
  571. uint32 interrupt_enable : 1 ;
  572. uint32 : 3 ;
  573. uint32 request : 2 ;
  574. uint32 auto_read_clear : 1 ;
  575. uint32 : 1 ;
  576. uint32 max : 25 ;
  577. uint32 data : 25 ;
  578. uint32 : 7 ;
  579. } CNT_FIELDS ;
  580. typedef union
  581. {
  582. CNT_FIELDS cnt ;
  583. HET_MEMORY memory ;
  584. } CNT_INSTRUCTION;
  585. /*---------------------------------------------*/
  586. /* APCNT INSTRUCTION */
  587. /*---------------------------------------------*/
  588. typedef struct apcnt_format
  589. {
  590. uint32 : 6 ;
  591. uint32 reqnum : 3 ;
  592. uint32 brk : 1 ;
  593. uint32 next_program_address : 9 ;
  594. uint32 op_code : 4 ;
  595. uint32 interrupt_enable : 1 ;
  596. uint32 edge_select : 2 ;
  597. uint32 : 6 ;
  598. uint32 : 3 ;
  599. uint32 request : 2 ;
  600. uint32 auto_read_clear : 1 ;
  601. uint32 previous_bit : 1 ;
  602. uint32 count : 25 ;
  603. uint32 data : 25 ;
  604. uint32 : 7 ;
  605. } APCNT_FIELDS ;
  606. typedef union
  607. {
  608. APCNT_FIELDS apcnt ;
  609. HET_MEMORY memory ;
  610. } APCNT_INSTRUCTION;
  611. /*---------------------------------------------*/
  612. /* PCNT INSTRUCTION */
  613. /*---------------------------------------------*/
  614. typedef struct pcnt_format
  615. {
  616. uint32 : 6 ;
  617. uint32 reqnum : 3 ;
  618. uint32 brk : 1 ;
  619. uint32 next_program_address : 9 ;
  620. uint32 op_code : 4 ;
  621. uint32 interrupt_enable : 1 ;
  622. uint32 period_pulse_select : 2 ;
  623. uint32 : 1 ;
  624. uint32 pin_select : 5 ;
  625. uint32 : 3 ;
  626. uint32 request : 2 ;
  627. uint32 auto_read_clear : 1 ;
  628. uint32 previous_bit : 1 ;
  629. uint32 count : 25 ;
  630. uint32 data : 25 ;
  631. uint32 hr_data : 7 ;
  632. } PCNT_FIELDS ;
  633. typedef union
  634. {
  635. PCNT_FIELDS pcnt ;
  636. HET_MEMORY memory ;
  637. } PCNT_INSTRUCTION;
  638. /*---------------------------------------------*/
  639. /* SCNT INSTRUCTION */
  640. /*---------------------------------------------*/
  641. typedef struct scnt_format
  642. {
  643. uint32 : 9 ;
  644. uint32 brk : 1 ;
  645. uint32 next_program_address : 9 ;
  646. uint32 op_code : 4 ;
  647. uint32 : 1 ;
  648. uint32 count_mode : 2 ;
  649. uint32 step_width : 2 ;
  650. uint32 : 4 ;
  651. uint32 : 5 ;
  652. uint32 auto_read_clear : 1 ;
  653. uint32 : 1 ;
  654. uint32 gap_start : 25 ;
  655. uint32 data : 25 ;
  656. uint32 : 7 ;
  657. } SCNT_FIELDS ;
  658. typedef union
  659. {
  660. SCNT_FIELDS scnt ;
  661. HET_MEMORY memory ;
  662. } SCNT_INSTRUCTION;
  663. /*---------------------------------------------*/
  664. /* ACNT INSTRUCTION */
  665. /*---------------------------------------------*/
  666. typedef struct acnt_format
  667. {
  668. uint32 : 6 ;
  669. uint32 reqnum : 3 ;
  670. uint32 brk : 1 ;
  671. uint32 next_program_address : 9 ;
  672. uint32 op_code : 4 ;
  673. uint32 edge_select : 1 ;
  674. uint32 : 7 ;
  675. uint32 interrupt_enable : 1 ;
  676. uint32 : 3 ;
  677. uint32 request : 2 ;
  678. uint32 auto_read_clear : 1 ;
  679. uint32 previous_bit : 1 ;
  680. uint32 gap_end : 25 ;
  681. uint32 data : 25 ;
  682. uint32 : 7 ;
  683. } ACNT_FIELDS ;
  684. typedef union
  685. {
  686. ACNT_FIELDS acnt ;
  687. HET_MEMORY memory ;
  688. } ACNT_INSTRUCTION;
  689. /*---------------------------------------------*/
  690. /* ECNT INSTRUCTION */
  691. /*---------------------------------------------*/
  692. typedef struct ecnt_format
  693. {
  694. uint32 : 6 ;
  695. uint32 reqnum : 3 ;
  696. uint32 brk : 1 ;
  697. uint32 next_program_address : 9 ;
  698. uint32 op_code : 4 ;
  699. uint32 : 1 ;
  700. uint32 count_mode : 2 ;
  701. uint32 : 6 ;
  702. uint32 : 3 ;
  703. uint32 request : 2 ;
  704. uint32 auto_read_clear : 1 ;
  705. uint32 previous_bit : 1 ;
  706. uint32 : 3 ;
  707. uint32 cond_addr : 9 ;
  708. uint32 pin_select : 5 ;
  709. uint32 : 1 ;
  710. uint32 count_cond : 3 ;
  711. uint32 : 1 ;
  712. uint32 t_register_select : 1 ;
  713. uint32 ab_register_select : 1 ;
  714. uint32 interrupt_enable : 1 ;
  715. uint32 data : 25 ;
  716. uint32 : 7 ;
  717. } ECNT_FIELDS ;
  718. typedef union
  719. {
  720. ECNT_FIELDS ecnt ;
  721. HET_MEMORY memory ;
  722. } ECNT_INSTRUCTION;
  723. /*---------------------------------------------*/
  724. /* RCNT INSTRUCTION */
  725. /*---------------------------------------------*/
  726. typedef struct rcnt_format
  727. {
  728. uint32 : 6 ;
  729. uint32 reqnum : 3 ;
  730. uint32 brk : 1 ;
  731. uint32 next_program_address : 9 ;
  732. uint32 op_code : 4 ;
  733. uint32 : 1 ;
  734. uint32 count_mode : 2 ;
  735. uint32 : 5 ;
  736. uint32 count_mode1 : 1 ;
  737. uint32 : 3 ;
  738. uint32 : 2 ;
  739. uint32 control : 1 ;
  740. uint32 : 1 ;
  741. uint32 divisor : 25 ;
  742. uint32 data : 25 ;
  743. uint32 : 7 ;
  744. } RCNT_FIELDS ;
  745. typedef union
  746. {
  747. RCNT_FIELDS rcnt ;
  748. HET_MEMORY memory ;
  749. } RCNT_INSTRUCTION;
  750. /*---------------------------------------------*/
  751. /* DJNZ INSTRUCTION */
  752. /*---------------------------------------------*/
  753. typedef struct djnz_format
  754. {
  755. uint32 : 6 ;
  756. uint32 reqnum : 3 ;
  757. uint32 brk : 1 ;
  758. uint32 next_program_address : 9 ;
  759. uint32 op_code : 4 ;
  760. uint32 : 1 ;
  761. uint32 sub_opcode : 2 ;
  762. uint32 : 6 ;
  763. uint32 : 3 ;
  764. uint32 request : 2 ;
  765. uint32 auto_read_clear : 1 ;
  766. uint32 : 4 ;
  767. uint32 cond_addr : 9 ;
  768. uint32 : 10 ;
  769. uint32 t_register_select : 1 ;
  770. uint32 ab_register_select : 1 ;
  771. uint32 interrupt_enable : 1 ;
  772. uint32 data : 25 ;
  773. uint32 : 7 ;
  774. } DJNZ_FIELDS ;
  775. typedef union
  776. {
  777. DJNZ_FIELDS djnz ;
  778. HET_MEMORY memory ;
  779. } DJNZ_INSTRUCTION;
  780. /*---------------------------------------------*/
  781. /* DJZ INSTRUCTION */
  782. /*---------------------------------------------*/
  783. typedef struct djz_format
  784. {
  785. uint32 : 6 ;
  786. uint32 reqnum : 3 ;
  787. uint32 brk : 1 ;
  788. uint32 next_program_address : 9 ;
  789. uint32 op_code : 4 ;
  790. uint32 : 1 ;
  791. uint32 sub_opcode : 2 ;
  792. uint32 : 6 ;
  793. uint32 : 3 ;
  794. uint32 request : 2 ;
  795. uint32 auto_read_clear : 1 ;
  796. uint32 : 4 ;
  797. uint32 cond_addr : 9 ;
  798. uint32 : 10 ;
  799. uint32 t_register_select : 1 ;
  800. uint32 ab_register_select : 1 ;
  801. uint32 interrupt_enable : 1 ;
  802. uint32 data : 25 ;
  803. uint32 : 7 ;
  804. } DJZ_FIELDS ;
  805. typedef union
  806. {
  807. DJZ_FIELDS djz ;
  808. HET_MEMORY memory ;
  809. } DJZ_INSTRUCTION;
  810. /*---------------------------------------------*/
  811. /* PWCNT INSTRUCTION */
  812. /*---------------------------------------------*/
  813. typedef struct pwcnt_format
  814. {
  815. uint32 : 6 ;
  816. uint32 reqnum : 3 ;
  817. uint32 brk : 1 ;
  818. uint32 next_program_address : 9 ;
  819. uint32 op_code : 4 ;
  820. uint32 hr_lr : 1 ;
  821. uint32 count_mode : 2 ;
  822. uint32 : 6 ;
  823. uint32 : 3 ;
  824. uint32 request : 2 ;
  825. uint32 auto_read_clear : 1 ;
  826. uint32 : 3 ;
  827. uint32 en_pin_action : 1 ;
  828. uint32 cond_addr : 9 ;
  829. uint32 pin_select : 5 ;
  830. uint32 : 3 ;
  831. uint32 pin_action : 1 ;
  832. uint32 opposite_action : 1 ;
  833. uint32 t_register_select : 1 ;
  834. uint32 ab_register_select : 1 ;
  835. uint32 interrupt_enable : 1 ;
  836. uint32 data : 25 ;
  837. uint32 hr_data : 7 ;
  838. } PWCNT_FIELDS ;
  839. typedef union
  840. {
  841. PWCNT_FIELDS pwcnt ;
  842. HET_MEMORY memory ;
  843. } PWCNT_INSTRUCTION;
  844. /*---------------------------------------------*/
  845. /* WCAP INSTRUCTION */
  846. /*---------------------------------------------*/
  847. typedef struct wcap_format
  848. {
  849. uint32 : 6 ;
  850. uint32 reqnum : 3 ;
  851. uint32 brk : 1 ;
  852. uint32 next_program_address : 9 ;
  853. uint32 op_code : 4 ;
  854. uint32 hr_lr : 1 ;
  855. uint32 : 8 ;
  856. uint32 : 3 ;
  857. uint32 request : 2 ;
  858. uint32 auto_read_clear : 1 ;
  859. uint32 previous_bit : 1 ;
  860. uint32 : 3 ;
  861. uint32 cond_addr : 9 ;
  862. uint32 pin_select : 5 ;
  863. uint32 : 1 ;
  864. uint32 capture_condition : 2 ;
  865. uint32 : 2 ;
  866. uint32 t_register_select : 1 ;
  867. uint32 ab_register_select : 1 ;
  868. uint32 interrupt_enable : 1 ;
  869. uint32 data : 25 ;
  870. uint32 hr_data : 7 ;
  871. } WCAP_FIELDS ;
  872. typedef union
  873. {
  874. WCAP_FIELDS wcap ;
  875. HET_MEMORY memory ;
  876. } WCAP_INSTRUCTION;
  877. /*----------------------------------------------*/
  878. /* WCAPE INSTRUCTION */
  879. /*----------------------------------------------*/
  880. typedef struct wcape_format
  881. {
  882. uint32 : 6 ;
  883. uint32 reqnum : 3 ;
  884. uint32 brk : 1 ;
  885. uint32 next_program_address : 9 ;
  886. uint32 op_code : 4 ;
  887. uint32 : 9 ;
  888. uint32 : 3 ;
  889. uint32 request : 2 ;
  890. uint32 auto_read_clear : 1 ;
  891. uint32 previous_bit : 1 ;
  892. uint32 : 3 ;
  893. uint32 cond_addr : 9 ;
  894. uint32 pin_select : 5 ;
  895. uint32 : 1 ;
  896. uint32 capture_condition : 2 ;
  897. uint32 : 2 ;
  898. uint32 t_register_select : 1 ;
  899. uint32 ab_register_select : 1 ;
  900. uint32 interrupt_enable : 1 ;
  901. uint32 ts_data : 25 ;
  902. uint32 ec_data : 7 ;
  903. } WCAPE_FIELDS ;
  904. typedef union
  905. {
  906. WCAPE_FIELDS wcape ;
  907. HET_MEMORY memory ;
  908. } WCAPE_INSTRUCTION;
  909. /*---------------------------------------------*/
  910. /* BR INSTRUCTION */
  911. /*---------------------------------------------*/
  912. typedef struct br_format
  913. {
  914. uint32 : 6 ;
  915. uint32 reqnum : 3 ;
  916. uint32 brk : 1 ;
  917. uint32 next_program_address : 9 ;
  918. uint32 op_code : 4 ;
  919. uint32 : 9 ;
  920. uint32 : 3 ;
  921. uint32 request : 2 ;
  922. uint32 auto_read_clear : 1 ;
  923. uint32 previous_bit : 1 ;
  924. uint32 : 3 ;
  925. uint32 cond_addr : 9 ;
  926. uint32 pin_select : 5 ;
  927. #if HET_v2
  928. uint32 branch_condition : 5 ;
  929. #else
  930. uint32 branch_condition : 3 ;
  931. uint32 : 1 ;
  932. uint32 : 1 ;
  933. #endif
  934. uint32 : 2 ;
  935. uint32 interrupt_enable : 1 ;
  936. uint32 data : 25 ;
  937. uint32 hr_data : 7 ;
  938. } BR_FIELDS ;
  939. typedef union
  940. {
  941. BR_FIELDS br ;
  942. HET_MEMORY memory ;
  943. } BR_INSTRUCTION;
  944. /*---------------------------------------------*/
  945. /* SHFT INSTRUCTION */
  946. /*---------------------------------------------*/
  947. typedef struct shft_format
  948. {
  949. uint32 : 6 ;
  950. uint32 reqnum : 3 ;
  951. uint32 brk : 1 ;
  952. uint32 next_program_address : 9 ;
  953. uint32 op_code : 4 ;
  954. uint32 : 5 ;
  955. uint32 shift_mode : 4 ;
  956. uint32 : 3 ;
  957. uint32 request : 2 ;
  958. uint32 auto_read_clear : 1 ;
  959. uint32 previous_bit : 1 ;
  960. uint32 : 3 ;
  961. uint32 cond_addr : 9 ;
  962. uint32 pin_select : 5 ;
  963. uint32 : 1 ;
  964. uint32 shift_condition : 2 ;
  965. uint32 : 2 ;
  966. uint32 t_register_select : 1 ;
  967. uint32 ab_register_select : 1 ;
  968. uint32 interrupt_enable : 1 ;
  969. uint32 data : 25 ;
  970. uint32 : 7 ;
  971. } SHFT_FIELDS ;
  972. typedef union
  973. {
  974. SHFT_FIELDS shft ;
  975. HET_MEMORY memory ;
  976. } SHFT_INSTRUCTION;
  977. /* ---------------------------------------------------------------------------------------------------- */
  978. #elif defined(_TMS470_LITTLE) || defined(__little_endian__)
  979. #ifndef HETBYTE
  980. # define HETBYTE uint8
  981. #endif
  982. typedef struct memory_format
  983. {
  984. uint32 program_word ;
  985. uint32 control_word ;
  986. uint32 data_word ;
  987. uint32 reserved_word ;
  988. } HET_MEMORY ;
  989. /*---------------------------------------------*/
  990. /* ACMP INSTRUCTION */
  991. /*---------------------------------------------*/
  992. typedef struct acmp_format
  993. {
  994. uint32 : 9 ;
  995. uint32 op_code : 4 ;
  996. uint32 next_program_address : 9 ;
  997. uint32 brk : 1 ;
  998. uint32 reqnum : 3 ;
  999. uint32 : 6 ;
  1000. uint32 interrupt_enable : 1 ;
  1001. uint32 ab_register_select : 1 ;
  1002. uint32 t_register_select : 1 ;
  1003. uint32 : 1 ;
  1004. uint32 pin_action : 1 ;
  1005. uint32 : 3 ;
  1006. uint32 pin_select : 5 ;
  1007. uint32 cond_addr : 9 ;
  1008. uint32 en_pin_action : 1 ;
  1009. uint32 : 2 ;
  1010. uint32 coutprv : 1 ;
  1011. uint32 auto_read_clear : 1 ;
  1012. uint32 request : 2 ;
  1013. uint32 : 3 ;
  1014. uint32 : 7 ;
  1015. uint32 data : 25 ;
  1016. } ACMP_FIELDS;
  1017. typedef union
  1018. {
  1019. ACMP_FIELDS acmp ;
  1020. HET_MEMORY memory ;
  1021. } ACMP_INSTRUCTION;
  1022. /*---------------------------------------------*/
  1023. /* ECMP INSTRUCTION */
  1024. /*---------------------------------------------*/
  1025. typedef struct ecmp_format
  1026. {
  1027. uint32 : 7 ;
  1028. uint32 angle_compare : 1 ;
  1029. uint32 hr_lr : 1 ;
  1030. uint32 op_code : 4 ;
  1031. uint32 next_program_address : 9 ;
  1032. uint32 brk : 1 ;
  1033. uint32 reqnum : 3 ;
  1034. uint32 : 6 ;
  1035. uint32 interrupt_enable : 1 ;
  1036. uint32 ab_register_select : 1 ;
  1037. uint32 t_register_select : 1 ;
  1038. uint32 opposite_action : 1 ;
  1039. uint32 pin_action : 1 ;
  1040. uint32 sub_opcode : 2 ;
  1041. uint32 : 1 ;
  1042. uint32 pin_select : 5 ;
  1043. uint32 cond_addr : 9 ;
  1044. uint32 en_pin_action : 1 ;
  1045. uint32 : 3 ;
  1046. uint32 auto_read_clear : 1 ;
  1047. uint32 request : 2 ;
  1048. uint32 : 3 ;
  1049. uint32 hr_data : 7 ;
  1050. uint32 data : 25 ;
  1051. } ECMP_FIELDS;
  1052. typedef union
  1053. {
  1054. ECMP_FIELDS ecmp ;
  1055. HET_MEMORY memory ;
  1056. } ECMP_INSTRUCTION;
  1057. /*---------------------------------------------*/
  1058. /* SCMP INSTRUCTION */
  1059. /*---------------------------------------------*/
  1060. typedef struct scmp_format
  1061. {
  1062. uint32 : 5 ;
  1063. uint32 : 2 ;
  1064. uint32 : 2 ;
  1065. uint32 op_code : 4 ;
  1066. uint32 next_program_address : 9 ;
  1067. uint32 brk : 1 ;
  1068. uint32 reqnum : 3 ;
  1069. uint32 : 6 ;
  1070. uint32 interrupt_enable : 1 ;
  1071. uint32 restart_en : 1 ;
  1072. uint32 : 2 ;
  1073. uint32 pin_action : 1 ;
  1074. uint32 compare_mode : 2 ;
  1075. uint32 : 1 ;
  1076. uint32 pin_select : 5 ;
  1077. uint32 cond_addr : 9 ;
  1078. uint32 en_pin_action : 1 ;
  1079. uint32 : 2 ;
  1080. uint32 coutprv : 1 ;
  1081. uint32 auto_read_clear : 1 ;
  1082. uint32 request : 2 ;
  1083. uint32 : 3 ;
  1084. uint32 : 7 ;
  1085. uint32 data : 25 ;
  1086. } SCMP_FIELDS ;
  1087. typedef union
  1088. {
  1089. SCMP_FIELDS scmp ;
  1090. HET_MEMORY memory ;
  1091. } SCMP_INSTRUCTION;
  1092. /*---------------------------------------------*/
  1093. /* MCMP INSTRUCTION */
  1094. /*---------------------------------------------*/
  1095. typedef struct mcmp_format
  1096. {
  1097. uint32 : 5 ;
  1098. uint32 save_subtract : 1 ;
  1099. uint32 : 1 ;
  1100. uint32 angle_compare : 1 ;
  1101. uint32 hr_lr : 1 ;
  1102. uint32 op_code : 4 ;
  1103. uint32 next_program_address : 9 ;
  1104. uint32 brk : 1 ;
  1105. uint32 reqnum : 3 ;
  1106. uint32 : 6 ;
  1107. uint32 interrupt_enable : 1 ;
  1108. uint32 ab_register_select : 1 ;
  1109. uint32 t_register_select : 1 ;
  1110. uint32 opposite_action : 1 ;
  1111. uint32 pin_action : 1 ;
  1112. uint32 order : 1 ;
  1113. uint32 sub_opcode : 1 ;
  1114. uint32 : 1 ;
  1115. uint32 pin_select : 5 ;
  1116. uint32 cond_addr : 9 ;
  1117. uint32 en_pin_action : 1 ;
  1118. uint32 : 3 ;
  1119. uint32 auto_read_clear : 1 ;
  1120. uint32 request : 2 ;
  1121. uint32 : 3 ;
  1122. uint32 hr_data : 7 ;
  1123. uint32 data : 25 ;
  1124. } MCMP_FIELDS ;
  1125. typedef union
  1126. {
  1127. MCMP_FIELDS mcmp ;
  1128. HET_MEMORY memory ;
  1129. } MCMP_INSTRUCTION;
  1130. /*---------------------------------------------*/
  1131. /* MOV64 INSTRUCTION */
  1132. /*---------------------------------------------*/
  1133. typedef struct mov64_format
  1134. {
  1135. uint32 remote_address : 9 ;
  1136. uint32 op_code : 4 ;
  1137. uint32 next_program_address : 9 ;
  1138. uint32 brk : 1 ;
  1139. uint32 : 9 ;
  1140. uint32 interrupt_enable : 1 ;
  1141. uint32 ab_register_select : 1 ;
  1142. uint32 t_register_select : 1 ;
  1143. uint32 opposite_action : 1 ;
  1144. uint32 pin_action : 1 ;
  1145. uint32 compare_mode : 2 ;
  1146. uint32 : 1 ;
  1147. uint32 pin_select : 5 ;
  1148. uint32 cond_addr : 9 ;
  1149. uint32 en_pin_action : 1 ;
  1150. uint32 : 3 ;
  1151. uint32 auto_read_clear : 1 ;
  1152. uint32 request : 2 ;
  1153. uint32 : 3 ;
  1154. uint32 hr_data : 7 ;
  1155. uint32 data : 25 ;
  1156. } MOV64_FIELDS ;
  1157. typedef union
  1158. {
  1159. MOV64_FIELDS mov64 ;
  1160. HET_MEMORY memory ;
  1161. } MOV64_INSTRUCTION;
  1162. /*---------------------------------------------*/
  1163. /* DADM64 INSTRUCTION */
  1164. /*---------------------------------------------*/
  1165. typedef struct dadm64_format
  1166. {
  1167. uint32 remote_address : 9 ;
  1168. uint32 op_code : 4 ;
  1169. uint32 next_program_address : 9 ;
  1170. uint32 brk : 1 ;
  1171. uint32 : 9 ;
  1172. uint32 interrupt_enable : 1 ;
  1173. uint32 ab_register_select : 1 ;
  1174. uint32 t_register_select : 1 ;
  1175. uint32 opposite_action : 1 ;
  1176. uint32 pin_action : 1 ;
  1177. uint32 compare_mode : 2 ;
  1178. uint32 : 1 ;
  1179. uint32 pin_select : 5 ;
  1180. uint32 cond_addr : 9 ;
  1181. uint32 en_pin_action : 1 ;
  1182. uint32 : 3 ;
  1183. uint32 auto_read_clear : 1 ;
  1184. uint32 request : 2 ;
  1185. uint32 : 3 ;
  1186. uint32 hr_data : 7 ;
  1187. uint32 data : 25 ;
  1188. } DADM64_FIELDS ;
  1189. typedef union
  1190. {
  1191. DADM64_FIELDS dadm64 ;
  1192. HET_MEMORY memory ;
  1193. } DADM64_INSTRUCTION;
  1194. /*---------------------------------------------*/
  1195. /* RADM64 INSTRUCTION */
  1196. /*---------------------------------------------*/
  1197. typedef struct RADM64_format
  1198. {
  1199. uint32 remote_address : 9 ;
  1200. uint32 op_code : 4 ;
  1201. uint32 next_program_address : 9 ;
  1202. uint32 brk : 1 ;
  1203. uint32 : 9 ;
  1204. uint32 interrupt_enable : 1 ;
  1205. uint32 ab_register_select : 1 ;
  1206. uint32 t_register_select : 1 ;
  1207. uint32 opposite_action : 1 ;
  1208. uint32 pin_action : 1 ;
  1209. uint32 compare_mode : 2 ;
  1210. uint32 : 1 ;
  1211. uint32 pin_select : 5 ;
  1212. uint32 cond_addr : 9 ;
  1213. uint32 en_pin_action : 1 ;
  1214. uint32 : 3 ;
  1215. uint32 auto_read_clear : 1 ;
  1216. uint32 request : 2 ;
  1217. uint32 : 3 ;
  1218. uint32 hr_data : 7 ;
  1219. uint32 data : 25 ;
  1220. } RADM64_FIELDS ;
  1221. typedef union
  1222. {
  1223. RADM64_FIELDS radm64 ;
  1224. HET_MEMORY memory ;
  1225. } RADM64_INSTRUCTION;
  1226. /*---------------------------------------------*/
  1227. /* MOV32 INSTRUCTION */
  1228. /*---------------------------------------------*/
  1229. typedef struct MOV32_format
  1230. {
  1231. uint32 remote_address : 9 ;
  1232. uint32 op_code : 4 ;
  1233. uint32 next_program_address : 9 ;
  1234. uint32 brk : 1 ;
  1235. uint32 : 9 ;
  1236. uint32 : 1 ;
  1237. uint32 ab_register_select : 1 ;
  1238. uint32 t_register_select : 1 ;
  1239. uint32 move_type : 2 ;
  1240. uint32 sub_opcode : 1 ;
  1241. uint32 init_flag : 1 ;
  1242. uint32 : 15 ;
  1243. uint32 z_flag : 1 ;
  1244. uint32 : 3 ;
  1245. uint32 auto_read_clear : 1 ;
  1246. uint32 : 5 ;
  1247. uint32 hr_data : 7 ;
  1248. uint32 data : 25 ;
  1249. } MOV32_FIELDS ;
  1250. typedef union
  1251. {
  1252. MOV32_FIELDS mov32 ;
  1253. HET_MEMORY memory ;
  1254. } MOV32_INSTRUCTION;
  1255. /*---------------------------------------------*/
  1256. /* ADM32 INSTRUCTION */
  1257. /*---------------------------------------------*/
  1258. typedef struct ADM32_format
  1259. {
  1260. uint32 remote_address : 9 ;
  1261. uint32 op_code : 4 ;
  1262. uint32 next_program_address : 9 ;
  1263. uint32 brk : 1 ;
  1264. uint32 : 9 ;
  1265. uint32 : 1 ;
  1266. uint32 ab_register_select : 1 ;
  1267. uint32 t_register_select : 1 ;
  1268. uint32 move_type : 2 ;
  1269. uint32 sub_opcode : 1 ;
  1270. uint32 init_flag : 1 ;
  1271. uint32 : 19 ;
  1272. uint32 auto_read_clear : 1 ;
  1273. uint32 : 5 ;
  1274. uint32 hr_data : 7 ;
  1275. uint32 data : 25 ;
  1276. } ADM32_FIELDS ;
  1277. typedef union
  1278. {
  1279. ADM32_FIELDS adm32 ;
  1280. HET_MEMORY memory ;
  1281. } ADM32_INSTRUCTION;
  1282. /*---------------------------------------------*/
  1283. /* ADCNST INSTRUCTION */
  1284. /*---------------------------------------------*/
  1285. typedef struct ADCNST_format
  1286. {
  1287. uint32 remote_address : 9 ;
  1288. uint32 op_code : 4 ;
  1289. uint32 next_program_address : 9 ;
  1290. uint32 brk : 1 ;
  1291. uint32 : 9 ;
  1292. uint32 constant : 25 ;
  1293. uint32 : 1 ;
  1294. uint32 : 5 ;
  1295. uint32 hr_data : 7 ;
  1296. uint32 data : 25 ;
  1297. } ADCNST_FIELDS ;
  1298. typedef union
  1299. {
  1300. ADCNST_FIELDS adcnst ;
  1301. HET_MEMORY memory ;
  1302. } ADCNST_INSTRUCTION;
  1303. /*----------------------------------------------*/
  1304. /* ADD INSTRUCTION */
  1305. /*----------------------------------------------*/
  1306. typedef struct ADD_format
  1307. {
  1308. uint32 remote_address : 9 ;
  1309. uint32 op_code : 4 ;
  1310. uint32 next_program_address : 9 ;
  1311. uint32 brk : 1 ;
  1312. uint32 : 9 ;
  1313. uint32 : 1 ;
  1314. uint32 reg : 2 ;
  1315. uint32 rem_dest : 2 ;
  1316. uint32 sub_opcode1 : 1 ;
  1317. uint32 init_flag : 1 ;
  1318. uint32 reg_ext : 1 ;
  1319. uint32 shft_cnt : 5 ;
  1320. uint32 shft_mode : 3 ;
  1321. uint32 src_2 : 3 ;
  1322. uint32 src_1 : 4 ;
  1323. uint32 sub_opcode3 : 3 ;
  1324. uint32 control : 1 ;
  1325. uint32 : 5 ;
  1326. uint32 hr_data : 7 ;
  1327. uint32 data : 25 ;
  1328. } ADD_FIELDS ;
  1329. typedef union
  1330. {
  1331. ADD_FIELDS add ;
  1332. HET_MEMORY memory ;
  1333. } ADD_INSTRUCTION;
  1334. /*----------------------------------------------*/
  1335. /* ADC INSTRUCTION */
  1336. /*----------------------------------------------*/
  1337. typedef struct ADC_format
  1338. {
  1339. uint32 remote_address : 9 ;
  1340. uint32 op_code : 4 ;
  1341. uint32 next_program_address : 9 ;
  1342. uint32 brk : 1 ;
  1343. uint32 : 9 ;
  1344. uint32 : 1 ;
  1345. uint32 reg : 2 ;
  1346. uint32 rem_dest : 2 ;
  1347. uint32 sub_opcode1 : 1 ;
  1348. uint32 init_flag : 1 ;
  1349. uint32 reg_ext : 1 ;
  1350. uint32 shft_cnt : 5 ;
  1351. uint32 shft_mode : 3 ;
  1352. uint32 src_2 : 3 ;
  1353. uint32 src_1 : 4 ;
  1354. uint32 sub_opcode3 : 3 ;
  1355. uint32 control : 1 ;
  1356. uint32 : 5 ;
  1357. uint32 hr_data : 7 ;
  1358. uint32 data : 25 ;
  1359. } ADC_FIELDS ;
  1360. typedef union
  1361. {
  1362. ADC_FIELDS adc ;
  1363. HET_MEMORY memory ;
  1364. } ADC_INSTRUCTION;
  1365. /*----------------------------------------------*/
  1366. /* SUB INSTRUCTION */
  1367. /*----------------------------------------------*/
  1368. typedef struct SUB_format
  1369. {
  1370. uint32 remote_address : 9 ;
  1371. uint32 op_code : 4 ;
  1372. uint32 next_program_address : 9 ;
  1373. uint32 brk : 1 ;
  1374. uint32 : 9 ;
  1375. uint32 : 1 ;
  1376. uint32 reg : 2 ;
  1377. uint32 rem_dest : 2 ;
  1378. uint32 sub_opcode1 : 1 ;
  1379. uint32 init_flag : 1 ;
  1380. uint32 reg_ext : 1 ;
  1381. uint32 shft_cnt : 5 ;
  1382. uint32 shft_mode : 3 ;
  1383. uint32 src_2 : 3 ;
  1384. uint32 src_1 : 4 ;
  1385. uint32 sub_opcode3 : 3 ;
  1386. uint32 control : 1 ;
  1387. uint32 : 5 ;
  1388. uint32 hr_data : 7 ;
  1389. uint32 data : 25 ;
  1390. } SUB_FIELDS ;
  1391. typedef union
  1392. {
  1393. SUB_FIELDS sub ;
  1394. HET_MEMORY memory ;
  1395. } SUB_INSTRUCTION;
  1396. /*----------------------------------------------*/
  1397. /* SBB INSTRUCTION */
  1398. /*----------------------------------------------*/
  1399. typedef struct SBB_format
  1400. {
  1401. uint32 remote_address : 9 ;
  1402. uint32 op_code : 4 ;
  1403. uint32 next_program_address : 9 ;
  1404. uint32 brk : 1 ;
  1405. uint32 : 9 ;
  1406. uint32 : 1 ;
  1407. uint32 reg : 2 ;
  1408. uint32 rem_dest : 2 ;
  1409. uint32 sub_opcode1 : 1 ;
  1410. uint32 init_flag : 1 ;
  1411. uint32 reg_ext : 1 ;
  1412. uint32 shft_cnt : 5 ;
  1413. uint32 shft_mode : 3 ;
  1414. uint32 src_2 : 3 ;
  1415. uint32 src_1 : 4 ;
  1416. uint32 sub_opcode3 : 3 ;
  1417. uint32 control : 1 ;
  1418. uint32 : 5 ;
  1419. uint32 hr_data : 7 ;
  1420. uint32 data : 25 ;
  1421. } SBB_FIELDS ;
  1422. typedef union
  1423. {
  1424. SBB_FIELDS sbb ;
  1425. HET_MEMORY memory ;
  1426. } SBB_INSTRUCTION;
  1427. /*----------------------------------------------*/
  1428. /* AND INSTRUCTION */
  1429. /*----------------------------------------------*/
  1430. typedef struct AND_format
  1431. {
  1432. uint32 remote_address : 9 ;
  1433. uint32 op_code : 4 ;
  1434. uint32 next_program_address : 9 ;
  1435. uint32 brk : 1 ;
  1436. uint32 : 9 ;
  1437. uint32 : 1 ;
  1438. uint32 reg : 2 ;
  1439. uint32 rem_dest : 2 ;
  1440. uint32 sub_opcode1 : 1 ;
  1441. uint32 init_flag : 1 ;
  1442. uint32 reg_ext : 1 ;
  1443. uint32 shft_cnt : 5 ;
  1444. uint32 shft_mode : 3 ;
  1445. uint32 src_2 : 3 ;
  1446. uint32 src_1 : 4 ;
  1447. uint32 sub_opcode3 : 3 ;
  1448. uint32 control : 1 ;
  1449. uint32 : 5 ;
  1450. uint32 hr_data : 7 ;
  1451. uint32 data : 25 ;
  1452. } AND_FIELDS ;
  1453. typedef union
  1454. {
  1455. AND_FIELDS and ;
  1456. HET_MEMORY memory ;
  1457. } AND_INSTRUCTION;
  1458. /*----------------------------------------------*/
  1459. /* OR INSTRUCTION */
  1460. /*----------------------------------------------*/
  1461. typedef struct OR_format
  1462. {
  1463. uint32 remote_address : 9 ;
  1464. uint32 op_code : 4 ;
  1465. uint32 next_program_address : 9 ;
  1466. uint32 brk : 1 ;
  1467. uint32 : 9 ;
  1468. uint32 : 1 ;
  1469. uint32 reg : 2 ;
  1470. uint32 rem_dest : 2 ;
  1471. uint32 sub_opcode1 : 1 ;
  1472. uint32 init_flag : 1 ;
  1473. uint32 reg_ext : 1 ;
  1474. uint32 shft_cnt : 5 ;
  1475. uint32 shft_mode : 3 ;
  1476. uint32 src_2 : 3 ;
  1477. uint32 src_1 : 4 ;
  1478. uint32 sub_opcode3 : 3 ;
  1479. uint32 control : 1 ;
  1480. uint32 : 5 ;
  1481. uint32 hr_data : 7 ;
  1482. uint32 data : 25 ;
  1483. } OR_FIELDS ;
  1484. typedef union
  1485. {
  1486. OR_FIELDS or ;
  1487. HET_MEMORY memory ;
  1488. } OR_INSTRUCTION;
  1489. /*----------------------------------------------*/
  1490. /* XOR INSTRUCTION */
  1491. /*----------------------------------------------*/
  1492. typedef struct XOR_format
  1493. {
  1494. uint32 remote_address : 9 ;
  1495. uint32 op_code : 4 ;
  1496. uint32 next_program_address : 9 ;
  1497. uint32 brk : 1 ;
  1498. uint32 : 9 ;
  1499. uint32 : 1 ;
  1500. uint32 reg : 2 ;
  1501. uint32 rem_dest : 2 ;
  1502. uint32 sub_opcode1 : 1 ;
  1503. uint32 init_flag : 1 ;
  1504. uint32 reg_ext : 1 ;
  1505. uint32 shft_cnt : 5 ;
  1506. uint32 shft_mode : 3 ;
  1507. uint32 src_2 : 3 ;
  1508. uint32 src_1 : 4 ;
  1509. uint32 sub_opcode3 : 3 ;
  1510. uint32 control : 1 ;
  1511. uint32 : 5 ;
  1512. uint32 hr_data : 7 ;
  1513. uint32 data : 25 ;
  1514. } XOR_FIELDS ;
  1515. typedef union
  1516. {
  1517. XOR_FIELDS xor ;
  1518. HET_MEMORY memory ;
  1519. } XOR_INSTRUCTION;
  1520. /*---------------------------------------------*/
  1521. /* CNT INSTRUCTION */
  1522. /*---------------------------------------------*/
  1523. typedef struct CNT_format
  1524. {
  1525. uint32 interrupt_enable : 1 ;
  1526. uint32 : 4 ;
  1527. uint32 ab_register_select : 1 ;
  1528. uint32 t_register_select : 1 ;
  1529. uint32 angle_cnt : 1 ;
  1530. uint32 op_code : 4 ;
  1531. uint32 next_program_address : 9 ;
  1532. uint32 brk : 1 ;
  1533. uint32 : 9 ;
  1534. uint32 max : 25 ;
  1535. uint32 : 1 ;
  1536. uint32 auto_read_clear : 1 ;
  1537. uint32 request : 2 ;
  1538. uint32 : 3 ;
  1539. uint32 : 7 ;
  1540. uint32 data : 25 ;
  1541. } CNT_FIELDS ;
  1542. typedef union
  1543. {
  1544. CNT_FIELDS cnt ;
  1545. HET_MEMORY memory ;
  1546. } CNT_INSTRUCTION;
  1547. /*---------------------------------------------*/
  1548. /* APCNT INSTRUCTION */
  1549. /*---------------------------------------------*/
  1550. typedef struct apcnt_format
  1551. {
  1552. uint32 : 6 ;
  1553. uint32 edge_select : 2 ;
  1554. uint32 interrupt_enable : 1 ;
  1555. uint32 op_code : 4 ;
  1556. uint32 next_program_address : 9 ;
  1557. uint32 brk : 1 ;
  1558. uint32 reqnum : 3 ;
  1559. uint32 : 6 ;
  1560. uint32 count : 25 ;
  1561. uint32 previous_bit : 1 ;
  1562. uint32 auto_read_clear : 1 ;
  1563. uint32 request : 2 ;
  1564. uint32 : 3 ;
  1565. uint32 : 7 ;
  1566. uint32 data : 25 ;
  1567. } APCNT_FIELDS ;
  1568. typedef union
  1569. {
  1570. APCNT_FIELDS apcnt ;
  1571. HET_MEMORY memory ;
  1572. } APCNT_INSTRUCTION;
  1573. /*---------------------------------------------*/
  1574. /* PCNT INSTRUCTION */
  1575. /*---------------------------------------------*/
  1576. typedef struct pcnt_format
  1577. {
  1578. uint32 pin_select : 5 ;
  1579. uint32 : 1 ;
  1580. uint32 period_pulse_select : 2 ;
  1581. uint32 interrupt_enable : 1 ;
  1582. uint32 op_code : 4 ;
  1583. uint32 next_program_address : 9 ;
  1584. uint32 brk : 1 ;
  1585. uint32 reqnum : 3 ;
  1586. uint32 : 6 ;
  1587. uint32 count : 25 ;
  1588. uint32 previous_bit : 1 ;
  1589. uint32 auto_read_clear : 1 ;
  1590. uint32 request : 2 ;
  1591. uint32 : 3 ;
  1592. uint32 hr_data : 7 ;
  1593. uint32 data : 25 ;
  1594. } PCNT_FIELDS ;
  1595. typedef union
  1596. {
  1597. PCNT_FIELDS pcnt ;
  1598. HET_MEMORY memory ;
  1599. } PCNT_INSTRUCTION;
  1600. /*---------------------------------------------*/
  1601. /* SCNT INSTRUCTION */
  1602. /*---------------------------------------------*/
  1603. typedef struct scnt_format
  1604. {
  1605. uint32 : 4 ;
  1606. uint32 step_width : 2 ;
  1607. uint32 count_mode : 2 ;
  1608. uint32 : 1 ;
  1609. uint32 op_code : 4 ;
  1610. uint32 next_program_address : 9 ;
  1611. uint32 brk : 1 ;
  1612. uint32 : 9 ;
  1613. uint32 gap_start : 25 ;
  1614. uint32 : 1 ;
  1615. uint32 auto_read_clear : 1 ;
  1616. uint32 : 5 ;
  1617. uint32 : 7 ;
  1618. uint32 data : 25 ;
  1619. } SCNT_FIELDS ;
  1620. typedef union
  1621. {
  1622. SCNT_FIELDS scnt ;
  1623. HET_MEMORY memory ;
  1624. } SCNT_INSTRUCTION;
  1625. /*---------------------------------------------*/
  1626. /* ACNT INSTRUCTION */
  1627. /*---------------------------------------------*/
  1628. typedef struct acnt_format
  1629. {
  1630. uint32 interrupt_enable : 1 ;
  1631. uint32 : 7 ;
  1632. uint32 edge_select : 1 ;
  1633. uint32 op_code : 4 ;
  1634. uint32 next_program_address : 9 ;
  1635. uint32 brk : 1 ;
  1636. uint32 reqnum : 3 ;
  1637. uint32 : 6 ;
  1638. uint32 gap_end : 25 ;
  1639. uint32 previous_bit : 1 ;
  1640. uint32 auto_read_clear : 1 ;
  1641. uint32 request : 2 ;
  1642. uint32 : 3 ;
  1643. uint32 : 7 ;
  1644. uint32 data : 25 ;
  1645. } ACNT_FIELDS ;
  1646. typedef union
  1647. {
  1648. ACNT_FIELDS acnt ;
  1649. HET_MEMORY memory ;
  1650. } ACNT_INSTRUCTION;
  1651. /*---------------------------------------------*/
  1652. /* ECNT INSTRUCTION */
  1653. /*---------------------------------------------*/
  1654. typedef struct ecnt_format
  1655. {
  1656. uint32 : 6 ;
  1657. uint32 count_mode : 2 ;
  1658. uint32 : 1 ;
  1659. uint32 op_code : 4 ;
  1660. uint32 next_program_address : 9 ;
  1661. uint32 brk : 1 ;
  1662. uint32 reqnum : 3 ;
  1663. uint32 : 6 ;
  1664. uint32 interrupt_enable : 1 ;
  1665. uint32 ab_register_select : 1 ;
  1666. uint32 t_register_select : 1 ;
  1667. uint32 : 1 ;
  1668. uint32 count_cond : 3 ;
  1669. uint32 : 1 ;
  1670. uint32 pin_select : 5 ;
  1671. uint32 cond_addr : 9 ;
  1672. uint32 : 3 ;
  1673. uint32 previous_bit : 1 ;
  1674. uint32 auto_read_clear : 1 ;
  1675. uint32 request : 2 ;
  1676. uint32 : 3 ;
  1677. uint32 : 7 ;
  1678. uint32 data : 25 ;
  1679. } ECNT_FIELDS ;
  1680. typedef union
  1681. {
  1682. ECNT_FIELDS ecnt ;
  1683. HET_MEMORY memory ;
  1684. } ECNT_INSTRUCTION;
  1685. /*---------------------------------------------*/
  1686. /* RCNT INSTRUCTION */
  1687. /*---------------------------------------------*/
  1688. typedef struct rcnt_format
  1689. {
  1690. uint32 count_mode1 : 1 ;
  1691. uint32 : 5 ;
  1692. uint32 count_mode : 2 ;
  1693. uint32 : 1 ;
  1694. uint32 op_code : 4 ;
  1695. uint32 next_program_address : 9 ;
  1696. uint32 brk : 1 ;
  1697. uint32 reqnum : 3 ;
  1698. uint32 : 6 ;
  1699. uint32 divisor : 25 ;
  1700. uint32 : 1 ;
  1701. uint32 control : 1 ;
  1702. uint32 : 2 ;
  1703. uint32 : 3 ;
  1704. uint32 : 7 ;
  1705. uint32 data : 25 ;
  1706. } RCNT_FIELDS ;
  1707. typedef union
  1708. {
  1709. RCNT_FIELDS rcnt ;
  1710. HET_MEMORY memory ;
  1711. } RCNT_INSTRUCTION;
  1712. /*---------------------------------------------*/
  1713. /* DJNZ INSTRUCTION */
  1714. /*---------------------------------------------*/
  1715. typedef struct djnz_format
  1716. {
  1717. uint32 : 6 ;
  1718. uint32 sub_opcode : 2 ;
  1719. uint32 : 1 ;
  1720. uint32 op_code : 4 ;
  1721. uint32 next_program_address : 9 ;
  1722. uint32 brk : 1 ;
  1723. uint32 reqnum : 3 ;
  1724. uint32 : 6 ;
  1725. uint32 interrupt_enable : 1 ;
  1726. uint32 ab_register_select : 1 ;
  1727. uint32 t_register_select : 1 ;
  1728. uint32 : 10 ;
  1729. uint32 cond_addr : 9 ;
  1730. uint32 : 4 ;
  1731. uint32 auto_read_clear : 1 ;
  1732. uint32 request : 2 ;
  1733. uint32 : 3 ;
  1734. uint32 : 7 ;
  1735. uint32 data : 25 ;
  1736. } DJNZ_FIELDS ;
  1737. typedef union
  1738. {
  1739. DJNZ_FIELDS djnz ;
  1740. HET_MEMORY memory ;
  1741. } DJNZ_INSTRUCTION;
  1742. /*---------------------------------------------*/
  1743. /* DJZ INSTRUCTION */
  1744. /*---------------------------------------------*/
  1745. typedef struct djz_format
  1746. {
  1747. uint32 : 6 ;
  1748. uint32 sub_opcode : 2 ;
  1749. uint32 : 1 ;
  1750. uint32 op_code : 4 ;
  1751. uint32 next_program_address : 9 ;
  1752. uint32 brk : 1 ;
  1753. uint32 reqnum : 3 ;
  1754. uint32 : 6 ;
  1755. uint32 interrupt_enable : 1 ;
  1756. uint32 ab_register_select : 1 ;
  1757. uint32 t_register_select : 1 ;
  1758. uint32 : 10 ;
  1759. uint32 cond_addr : 9 ;
  1760. uint32 : 4 ;
  1761. uint32 auto_read_clear : 1 ;
  1762. uint32 request : 2 ;
  1763. uint32 : 3 ;
  1764. uint32 : 7 ;
  1765. uint32 data : 25 ;
  1766. } DJZ_FIELDS ;
  1767. typedef union
  1768. {
  1769. DJZ_FIELDS djz ;
  1770. HET_MEMORY memory ;
  1771. } DJZ_INSTRUCTION;
  1772. /*---------------------------------------------*/
  1773. /* PWCNT INSTRUCTION */
  1774. /*---------------------------------------------*/
  1775. typedef struct pwcnt_format
  1776. {
  1777. uint32 : 6 ;
  1778. uint32 count_mode : 2 ;
  1779. uint32 hr_lr : 1 ;
  1780. uint32 op_code : 4 ;
  1781. uint32 next_program_address : 9 ;
  1782. uint32 brk : 1 ;
  1783. uint32 reqnum : 3 ;
  1784. uint32 : 6 ;
  1785. uint32 interrupt_enable : 1 ;
  1786. uint32 ab_register_select : 1 ;
  1787. uint32 t_register_select : 1 ;
  1788. uint32 opposite_action : 1 ;
  1789. uint32 pin_action : 1 ;
  1790. uint32 : 3 ;
  1791. uint32 pin_select : 5 ;
  1792. uint32 cond_addr : 9 ;
  1793. uint32 en_pin_action : 1 ;
  1794. uint32 : 3 ;
  1795. uint32 auto_read_clear : 1 ;
  1796. uint32 request : 2 ;
  1797. uint32 : 3 ;
  1798. uint32 hr_data : 7 ;
  1799. uint32 data : 25 ;
  1800. } PWCNT_FIELDS ;
  1801. typedef union
  1802. {
  1803. PWCNT_FIELDS pwcnt ;
  1804. HET_MEMORY memory ;
  1805. } PWCNT_INSTRUCTION;
  1806. /*---------------------------------------------*/
  1807. /* WCAP INSTRUCTION */
  1808. /*---------------------------------------------*/
  1809. typedef struct wcap_format
  1810. {
  1811. uint32 : 8 ;
  1812. uint32 hr_lr : 1 ;
  1813. uint32 op_code : 4 ;
  1814. uint32 next_program_address : 9 ;
  1815. uint32 brk : 1 ;
  1816. uint32 reqnum : 3 ;
  1817. uint32 : 6 ;
  1818. uint32 interrupt_enable : 1 ;
  1819. uint32 ab_register_select : 1 ;
  1820. uint32 t_register_select : 1 ;
  1821. uint32 : 2 ;
  1822. uint32 capture_condition : 2 ;
  1823. uint32 : 1 ;
  1824. uint32 pin_select : 5 ;
  1825. uint32 cond_addr : 9 ;
  1826. uint32 : 3 ;
  1827. uint32 previous_bit : 1 ;
  1828. uint32 auto_read_clear : 1 ;
  1829. uint32 request : 2 ;
  1830. uint32 : 3 ;
  1831. uint32 hr_data : 7 ;
  1832. uint32 data : 25 ;
  1833. } WCAP_FIELDS ;
  1834. typedef union
  1835. {
  1836. WCAP_FIELDS wcap ;
  1837. HET_MEMORY memory ;
  1838. } WCAP_INSTRUCTION;
  1839. /*----------------------------------------------*/
  1840. /* WCAPE INSTRUCTION */
  1841. /*----------------------------------------------*/
  1842. typedef struct wcape_format
  1843. {
  1844. uint32 : 9 ;
  1845. uint32 op_code : 4 ;
  1846. uint32 next_program_address : 9 ;
  1847. uint32 brk : 1 ;
  1848. uint32 reqnum : 3 ;
  1849. uint32 : 6 ;
  1850. uint32 interrupt_enable : 1 ;
  1851. uint32 ab_register_select : 1 ;
  1852. uint32 t_register_select : 1 ;
  1853. uint32 : 2 ;
  1854. uint32 capture_condition : 2 ;
  1855. uint32 : 1 ;
  1856. uint32 pin_select : 5 ;
  1857. uint32 cond_addr : 9 ;
  1858. uint32 previous_bit : 1 ;
  1859. uint32 auto_read_clear : 1 ;
  1860. uint32 request : 2 ;
  1861. uint32 : 3 ;
  1862. uint32 ec_data : 7 ;
  1863. uint32 ts_data : 25 ;
  1864. } WCAPE_FIELDS ;
  1865. typedef union
  1866. {
  1867. WCAPE_FIELDS wcape ;
  1868. HET_MEMORY memory ;
  1869. } WCAPE_INSTRUCTION;
  1870. /*---------------------------------------------*/
  1871. /* BR INSTRUCTION */
  1872. /*---------------------------------------------*/
  1873. typedef struct br_format
  1874. {
  1875. uint32 : 9 ;
  1876. uint32 op_code : 4 ;
  1877. uint32 next_program_address : 9 ;
  1878. uint32 brk : 1 ;
  1879. uint32 reqnum : 3 ;
  1880. uint32 : 6 ;
  1881. uint32 interrupt_enable : 1 ;
  1882. uint32 : 2 ;
  1883. uint32 : 1 ;
  1884. uint32 : 1 ;
  1885. uint32 branch_condition : 3 ;
  1886. uint32 pin_select : 5 ;
  1887. uint32 cond_addr : 9 ;
  1888. uint32 : 3 ;
  1889. uint32 previous_bit : 1 ;
  1890. uint32 auto_read_clear : 1 ;
  1891. uint32 request : 2 ;
  1892. uint32 : 3 ;
  1893. uint32 hr_data : 7 ;
  1894. uint32 data : 25 ;
  1895. } BR_FIELDS ;
  1896. typedef union
  1897. {
  1898. BR_FIELDS br ;
  1899. HET_MEMORY memory ;
  1900. } BR_INSTRUCTION;
  1901. /*---------------------------------------------*/
  1902. /* SHFT INSTRUCTION */
  1903. /*---------------------------------------------*/
  1904. typedef struct shft_format
  1905. {
  1906. uint32 shift_mode : 4 ;
  1907. uint32 : 5 ;
  1908. uint32 op_code : 4 ;
  1909. uint32 next_program_address : 9 ;
  1910. uint32 brk : 1 ;
  1911. uint32 reqnum : 3 ;
  1912. uint32 : 6 ;
  1913. uint32 interrupt_enable : 1 ;
  1914. uint32 ab_register_select : 1 ;
  1915. uint32 t_register_select : 1 ;
  1916. uint32 : 2 ;
  1917. uint32 shift_condition : 2 ;
  1918. uint32 : 1 ;
  1919. uint32 pin_select : 5 ;
  1920. uint32 cond_addr : 9 ;
  1921. uint32 : 3 ;
  1922. uint32 previous_bit : 1 ;
  1923. uint32 auto_read_clear : 1 ;
  1924. uint32 request : 2 ;
  1925. uint32 : 3 ;
  1926. uint32 : 7 ;
  1927. uint32 data : 25 ;
  1928. } SHFT_FIELDS ;
  1929. typedef union
  1930. {
  1931. SHFT_FIELDS shft ;
  1932. HET_MEMORY memory ;
  1933. } SHFT_INSTRUCTION;
  1934. #endif
  1935. #endif
  1936. /*--------------------------- End Of File ----------------------------------*/