URL
https://opencores.org/ocsvn/neo430/neo430/trunk
Subversion Repositories neo430
Compare Revisions
- This comparison shows the changes necessary to convert path
/
- from Rev 175 to Rev 176
- ↔ Reverse comparison
Rev 175 → Rev 176
/neo430/trunk/neo430/README.md
81,7 → 81,7
- Optional custom functions unit ([CFU](https://github.com/stnolting/neo430/blob/master/rtl/core/neo430_cfu.vhd)) for user-defined processor extensions |
- Optional 4 channel PWM controller with 1 to 8 bit resolution ([PWM](https://github.com/stnolting/neo430/blob/master/rtl/core/neo430_pwm.vhd)) |
- Optional Galois Ring Oscillator (GARO) based true random number generator ([TRNG](https://github.com/stnolting/neo430/blob/master/rtl/core/neo430_trng.vhd)) |
- Optional external interrupts controller with 8 independent channels ([EXIRQ](https://github.com/stnolting/neo430/blob/master/rtl/core/neo430_exirq.vhd)) |
- Optional external interrupts controller with 8 independent channels ([EXIRQ](https://github.com/stnolting/neo430/blob/master/rtl/core/neo430_exirq.vhd)), can also be used for software-triggered interrupts (traps, breakpoints, etc.) |
- Optional internal [bootloader](https://github.com/stnolting/neo430/blob/master/sw/bootloader/bootloader.c) (2kB ROM) with serial user console and automatic boot from external SPI EEPROM |
|
|
158,7 → 158,7
| Two Wire Interface (TWI) | 80 | 41 | 0 | 0 | |
| Universal Asynchronous Rx/Tx (UART) | 129 | 89 | 0 | 0 | |
| Wishbone Interface (WB32) | 128 | 117 | 0 | 0 | |
| External Interrupts Controller (EXIRQ) | 73 | 60 | 0 | 0 | |
| External Interrupts Controller (EXIRQ) | 72 | 54 | 0 | 0 | |
| Watchdog TImer (WDT) | 49 | 36 | 0 | 0 | |
|
|
/neo430/trunk/neo430/doc/NEO430.pdf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/neo430/trunk/neo430/rtl/core/neo430_bootloader_image.vhd
22,7 → 22,7
000011 => x"c004", |
000012 => x"435c", |
000013 => x"12b0", |
000014 => x"f654", |
000014 => x"f658", |
000015 => x"413b", |
000016 => x"413c", |
000017 => x"413d", |
30,7 → 30,7
000019 => x"413f", |
000020 => x"1300", |
000021 => x"403c", |
000022 => x"f694", |
000022 => x"f698", |
000023 => x"12b0", |
000024 => x"f568", |
000025 => x"403d", |
44,7 → 44,7
000033 => x"4030", |
000034 => x"f040", |
000035 => x"403c", |
000036 => x"f6a1", |
000036 => x"f6a5", |
000037 => x"12b0", |
000038 => x"f568", |
000039 => x"4130", |
59,11 → 59,11
000048 => x"4038", |
000049 => x"f568", |
000050 => x"4037", |
000051 => x"f5d2", |
000051 => x"f5d6", |
000052 => x"4036", |
000053 => x"f538", |
000054 => x"403c", |
000055 => x"f703", |
000055 => x"f707", |
000056 => x"1288", |
000057 => x"4a09", |
000058 => x"5039", |
71,7 → 71,7
000060 => x"490c", |
000061 => x"1287", |
000062 => x"403c", |
000063 => x"f705", |
000063 => x"f709", |
000064 => x"1288", |
000065 => x"4075", |
000066 => x"0020", |
93,7 → 93,7
000082 => x"4030", |
000083 => x"f06c", |
000084 => x"4030", |
000085 => x"f67a", |
000085 => x"f67e", |
000086 => x"120a", |
000087 => x"1209", |
000088 => x"1208", |
103,16 → 103,16
000092 => x"4c07", |
000093 => x"4d46", |
000094 => x"4038", |
000095 => x"f606", |
000095 => x"f60a", |
000096 => x"434c", |
000097 => x"1288", |
000098 => x"403a", |
000099 => x"f634", |
000099 => x"f638", |
000100 => x"407c", |
000101 => x"0006", |
000102 => x"128a", |
000103 => x"4039", |
000104 => x"f62c", |
000104 => x"f630", |
000105 => x"1289", |
000106 => x"434c", |
000107 => x"1288", |
121,7 → 121,7
000110 => x"470c", |
000111 => x"427d", |
000112 => x"12b0", |
000113 => x"f68e", |
000113 => x"f692", |
000114 => x"128a", |
000115 => x"474c", |
000116 => x"128a", |
142,7 → 142,7
000131 => x"b316", |
000132 => x"23f6", |
000133 => x"4030", |
000134 => x"f67a", |
000134 => x"f67e", |
000135 => x"120a", |
000136 => x"1209", |
000137 => x"1208", |
151,7 → 151,7
000140 => x"4d0c", |
000141 => x"427d", |
000142 => x"12b0", |
000143 => x"f68e", |
000143 => x"f692", |
000144 => x"403a", |
000145 => x"f0ac", |
000146 => x"4c4d", |
162,7 → 162,7
000151 => x"531c", |
000152 => x"128a", |
000153 => x"4030", |
000154 => x"f680", |
000154 => x"f684", |
000155 => x"120a", |
000156 => x"1209", |
000157 => x"8321", |
169,9 → 169,9
000158 => x"4c09", |
000159 => x"434c", |
000160 => x"12b0", |
000161 => x"f606", |
000161 => x"f60a", |
000162 => x"403a", |
000163 => x"f634", |
000163 => x"f638", |
000164 => x"407c", |
000165 => x"0003", |
000166 => x"128a", |
178,7 → 178,7
000167 => x"490c", |
000168 => x"427d", |
000169 => x"12b0", |
000170 => x"f68e", |
000170 => x"f692", |
000171 => x"128a", |
000172 => x"494c", |
000173 => x"128a", |
187,11 → 187,11
000176 => x"4c81", |
000177 => x"0000", |
000178 => x"12b0", |
000179 => x"f62c", |
000179 => x"f630", |
000180 => x"412c", |
000181 => x"5321", |
000182 => x"4030", |
000183 => x"f682", |
000183 => x"f686", |
000184 => x"120a", |
000185 => x"1209", |
000186 => x"1208", |
206,9 → 206,9
000195 => x"4c4d", |
000196 => x"4a4c", |
000197 => x"12b0", |
000198 => x"f666", |
000198 => x"f66a", |
000199 => x"4030", |
000200 => x"f680", |
000200 => x"f684", |
000201 => x"4039", |
000202 => x"f136", |
000203 => x"1289", |
220,16 → 220,16
000209 => x"f186", |
000210 => x"4c4a", |
000211 => x"403c", |
000212 => x"f709", |
000212 => x"f70d", |
000213 => x"12b0", |
000214 => x"f568", |
000215 => x"4a4c", |
000216 => x"12b0", |
000217 => x"f5b6", |
000217 => x"f5ba", |
000218 => x"4302", |
000219 => x"435c", |
000220 => x"12b0", |
000221 => x"f64e", |
000221 => x"f652", |
000222 => x"4030", |
000223 => x"f1bc", |
000224 => x"120a", |
240,7 → 240,7
000229 => x"403a", |
000230 => x"f568", |
000231 => x"403c", |
000232 => x"f710", |
000232 => x"f714", |
000233 => x"128a", |
000234 => x"12b0", |
000235 => x"f54c", |
249,19 → 249,19
000238 => x"0079", |
000239 => x"2034", |
000240 => x"403c", |
000241 => x"f71f", |
000241 => x"f723", |
000242 => x"128a", |
000243 => x"4037", |
000244 => x"f606", |
000244 => x"f60a", |
000245 => x"434c", |
000246 => x"1287", |
000247 => x"403a", |
000248 => x"f634", |
000248 => x"f638", |
000249 => x"407c", |
000250 => x"0006", |
000251 => x"128a", |
000252 => x"4039", |
000253 => x"f62c", |
000253 => x"f630", |
000254 => x"1289", |
000255 => x"434c", |
000256 => x"1287", |
298,10 → 298,10
000287 => x"426c", |
000288 => x"128a", |
000289 => x"403c", |
000290 => x"f72c", |
000290 => x"f730", |
000291 => x"1288", |
000292 => x"4030", |
000293 => x"f67c", |
000293 => x"f680", |
000294 => x"4c06", |
000295 => x"5326", |
000296 => x"4c2d", |
335,7 → 335,7
000324 => x"9307", |
000325 => x"200e", |
000326 => x"403c", |
000327 => x"f72f", |
000327 => x"f733", |
000328 => x"1285", |
000329 => x"4039", |
000330 => x"f170", |
349,7 → 349,7
000338 => x"4030", |
000339 => x"f280", |
000340 => x"403c", |
000341 => x"f743", |
000341 => x"f747", |
000342 => x"4030", |
000343 => x"f290", |
000344 => x"474d", |
408,11 → 408,11
000397 => x"4030", |
000398 => x"f2e2", |
000399 => x"403c", |
000400 => x"f72c", |
000400 => x"f730", |
000401 => x"1285", |
000402 => x"5221", |
000403 => x"4030", |
000404 => x"f678", |
000404 => x"f67c", |
000405 => x"120a", |
000406 => x"1209", |
000407 => x"1208", |
420,7 → 420,7
000409 => x"1206", |
000410 => x"1205", |
000411 => x"12b0", |
000412 => x"f670", |
000412 => x"f674", |
000413 => x"4032", |
000414 => x"c000", |
000415 => x"4382", |
440,7 → 440,7
000429 => x"ffaa", |
000430 => x"435c", |
000431 => x"12b0", |
000432 => x"f64e", |
000432 => x"f652", |
000433 => x"403c", |
000434 => x"4b00", |
000435 => x"434d", |
451,10 → 451,10
000440 => x"407c", |
000441 => x"0003", |
000442 => x"12b0", |
000443 => x"f5ec", |
000443 => x"f5f0", |
000444 => x"434c", |
000445 => x"12b0", |
000446 => x"f634", |
000446 => x"f638", |
000447 => x"4382", |
000448 => x"ffb0", |
000449 => x"4038", |
471,27 → 471,27
000460 => x"4382", |
000461 => x"c004", |
000462 => x"12b0", |
000463 => x"f660", |
000463 => x"f664", |
000464 => x"12b0", |
000465 => x"f65a", |
000465 => x"f65e", |
000466 => x"403a", |
000467 => x"f568", |
000468 => x"403c", |
000469 => x"f74f", |
000469 => x"f753", |
000470 => x"128a", |
000471 => x"4039", |
000472 => x"f5d2", |
000472 => x"f5d6", |
000473 => x"421c", |
000474 => x"fff0", |
000475 => x"1289", |
000476 => x"403c", |
000477 => x"f783", |
000477 => x"f787", |
000478 => x"128a", |
000479 => x"421c", |
000480 => x"fff4", |
000481 => x"1289", |
000482 => x"403c", |
000483 => x"f78c", |
000483 => x"f790", |
000484 => x"128a", |
000485 => x"482c", |
000486 => x"1289", |
499,25 → 499,25
000488 => x"fffc", |
000489 => x"1289", |
000490 => x"403c", |
000491 => x"f795", |
000491 => x"f799", |
000492 => x"128a", |
000493 => x"421c", |
000494 => x"fff6", |
000495 => x"1289", |
000496 => x"403c", |
000497 => x"f79e", |
000497 => x"f7a2", |
000498 => x"128a", |
000499 => x"421c", |
000500 => x"fffa", |
000501 => x"1289", |
000502 => x"403c", |
000503 => x"f7a7", |
000503 => x"f7ab", |
000504 => x"128a", |
000505 => x"421c", |
000506 => x"fff2", |
000507 => x"1289", |
000508 => x"403c", |
000509 => x"f7b0", |
000509 => x"f7b4", |
000510 => x"128a", |
000511 => x"4a09", |
000512 => x"403e", |
532,7 → 532,7
000521 => x"12b0", |
000522 => x"f260", |
000523 => x"403c", |
000524 => x"f703", |
000524 => x"f707", |
000525 => x"1289", |
000526 => x"12b0", |
000527 => x"f02a", |
549,13 → 549,13
000538 => x"4037", |
000539 => x"f260", |
000540 => x"403c", |
000541 => x"f7d7", |
000541 => x"f7db", |
000542 => x"1289", |
000543 => x"1286", |
000544 => x"4c4a", |
000545 => x"1285", |
000546 => x"403c", |
000547 => x"f703", |
000547 => x"f707", |
000548 => x"1289", |
000549 => x"907a", |
000550 => x"0072", |
604,12 → 604,12
000593 => x"0063", |
000594 => x"2005", |
000595 => x"403c", |
000596 => x"f7df", |
000596 => x"f7e3", |
000597 => x"1289", |
000598 => x"4030", |
000599 => x"f438", |
000600 => x"403c", |
000601 => x"f7f2", |
000601 => x"f7f6", |
000602 => x"4030", |
000603 => x"f4aa", |
000604 => x"120a", |
654,7 → 654,7
000643 => x"4d82", |
000644 => x"ffa0", |
000645 => x"4030", |
000646 => x"f682", |
000646 => x"f686", |
000647 => x"8e0a", |
000648 => x"7f0b", |
000649 => x"531c", |
666,7 → 666,7
000655 => x"2008", |
000656 => x"490d", |
000657 => x"12b0", |
000658 => x"f68e", |
000658 => x"f692", |
000659 => x"535a", |
000660 => x"f03a", |
000661 => x"00ff", |
713,7 → 713,7
000702 => x"930a", |
000703 => x"2002", |
000704 => x"4030", |
000705 => x"f67e", |
000705 => x"f682", |
000706 => x"903a", |
000707 => x"000a", |
000708 => x"2002", |
735,301 → 735,303
000724 => x"12b0", |
000725 => x"f538", |
000726 => x"4130", |
000727 => x"503c", |
000728 => x"0037", |
000729 => x"4030", |
000730 => x"f5a8", |
000731 => x"120a", |
000732 => x"1209", |
000733 => x"4c49", |
000734 => x"490c", |
000735 => x"426d", |
000736 => x"12b0", |
000737 => x"f68e", |
000738 => x"403a", |
000739 => x"f598", |
000740 => x"128a", |
000741 => x"494c", |
000727 => x"507c", |
000728 => x"0057", |
000729 => x"f03c", |
000730 => x"00ff", |
000731 => x"4030", |
000732 => x"f5a8", |
000733 => x"120a", |
000734 => x"1209", |
000735 => x"4c49", |
000736 => x"490c", |
000737 => x"426d", |
000738 => x"12b0", |
000739 => x"f692", |
000740 => x"403a", |
000741 => x"f598", |
000742 => x"128a", |
000743 => x"4030", |
000744 => x"f682", |
000745 => x"120a", |
000746 => x"1209", |
000747 => x"4c09", |
000748 => x"427d", |
000749 => x"12b0", |
000750 => x"f68e", |
000751 => x"403a", |
000752 => x"f5b6", |
000753 => x"128a", |
000754 => x"494c", |
000743 => x"494c", |
000744 => x"128a", |
000745 => x"4030", |
000746 => x"f686", |
000747 => x"120a", |
000748 => x"1209", |
000749 => x"4c09", |
000750 => x"427d", |
000751 => x"12b0", |
000752 => x"f692", |
000753 => x"403a", |
000754 => x"f5ba", |
000755 => x"128a", |
000756 => x"4030", |
000757 => x"f682", |
000758 => x"f03c", |
000759 => x"00ff", |
000760 => x"403d", |
000761 => x"ffa4", |
000762 => x"438d", |
000763 => x"0000", |
000764 => x"5c0c", |
000765 => x"5c0c", |
000756 => x"494c", |
000757 => x"128a", |
000758 => x"4030", |
000759 => x"f686", |
000760 => x"f03c", |
000761 => x"00ff", |
000762 => x"403d", |
000763 => x"ffa4", |
000764 => x"438d", |
000765 => x"0000", |
000766 => x"5c0c", |
000767 => x"d31c", |
000768 => x"4c8d", |
000769 => x"0000", |
000770 => x"4130", |
000771 => x"f03c", |
000772 => x"00ff", |
000773 => x"403d", |
000774 => x"ffa4", |
000775 => x"f0bd", |
000776 => x"fc3f", |
000777 => x"0000", |
000778 => x"5c0c", |
000779 => x"5c0c", |
000767 => x"5c0c", |
000768 => x"5c0c", |
000769 => x"d31c", |
000770 => x"4c8d", |
000771 => x"0000", |
000772 => x"4130", |
000773 => x"f03c", |
000774 => x"00ff", |
000775 => x"403d", |
000776 => x"ffa4", |
000777 => x"f0bd", |
000778 => x"fc3f", |
000779 => x"0000", |
000780 => x"5c0c", |
000781 => x"5c0c", |
000782 => x"5c0c", |
000783 => x"5c0c", |
000784 => x"dd2c", |
000785 => x"d03c", |
000786 => x"0200", |
000787 => x"4c8d", |
000788 => x"0000", |
000789 => x"4130", |
000790 => x"f0b2", |
000791 => x"fdff", |
000792 => x"ffa4", |
000793 => x"4130", |
000794 => x"403d", |
000795 => x"ffa6", |
000796 => x"f03c", |
000797 => x"00ff", |
000798 => x"4c8d", |
000799 => x"0000", |
000800 => x"403e", |
000801 => x"ffa4", |
000802 => x"4e2c", |
000803 => x"930c", |
000804 => x"3bfd", |
000805 => x"4d2c", |
000806 => x"4130", |
000807 => x"4c82", |
000808 => x"ffae", |
000809 => x"4130", |
000810 => x"ec82", |
000811 => x"ffae", |
000812 => x"4130", |
000813 => x"d232", |
000814 => x"4303", |
000815 => x"4130", |
000816 => x"d032", |
000817 => x"4000", |
000818 => x"4130", |
000819 => x"4c4e", |
000820 => x"4d4c", |
000821 => x"108e", |
000822 => x"de0c", |
000823 => x"4130", |
000824 => x"40b2", |
000825 => x"4700", |
000826 => x"ffb8", |
000827 => x"4130", |
000828 => x"4134", |
000829 => x"4135", |
000830 => x"4136", |
000831 => x"4137", |
000832 => x"4138", |
000833 => x"4139", |
000834 => x"413a", |
000835 => x"4130", |
000836 => x"533d", |
000837 => x"c312", |
000838 => x"100c", |
000839 => x"930d", |
000840 => x"23fb", |
000841 => x"4130", |
000842 => x"6f42", |
000843 => x"746f", |
000844 => x"6e69", |
000845 => x"2e67", |
000846 => x"2e2e", |
000847 => x"0a0a", |
000848 => x"4300", |
000849 => x"444d", |
000850 => x"3a73", |
000851 => x"200a", |
000852 => x"3a64", |
000853 => x"4420", |
000854 => x"6d75", |
000855 => x"2070", |
000856 => x"454d", |
000857 => x"0a4d", |
000858 => x"6520", |
000859 => x"203a", |
000860 => x"6f4c", |
000861 => x"6461", |
000862 => x"4520", |
000863 => x"5045", |
000864 => x"4f52", |
000865 => x"0a4d", |
000866 => x"6820", |
000867 => x"203a", |
000868 => x"6548", |
000869 => x"706c", |
000870 => x"200a", |
000871 => x"3a70", |
000872 => x"5320", |
000873 => x"6f74", |
000874 => x"6572", |
000875 => x"4520", |
000876 => x"5045", |
000877 => x"4f52", |
000878 => x"0a4d", |
000879 => x"7220", |
000880 => x"203a", |
000881 => x"6552", |
000882 => x"7473", |
000883 => x"7261", |
000884 => x"0a74", |
000885 => x"7320", |
000886 => x"203a", |
000887 => x"7453", |
000888 => x"7261", |
000889 => x"2074", |
000890 => x"7061", |
000891 => x"0a70", |
000892 => x"7520", |
000893 => x"203a", |
000894 => x"7055", |
000895 => x"6f6c", |
000896 => x"6461", |
000897 => x"0a00", |
000898 => x"3a00", |
000899 => x"2020", |
000900 => x"0700", |
000901 => x"450a", |
000902 => x"5252", |
000903 => x"005f", |
000904 => x"7250", |
000905 => x"636f", |
000906 => x"6565", |
000907 => x"2064", |
000908 => x"7928", |
000909 => x"6e2f", |
000910 => x"3f29", |
000911 => x"0a00", |
000912 => x"7257", |
000913 => x"7469", |
000914 => x"6e69", |
000915 => x"2e67", |
000916 => x"2e2e", |
000917 => x"0020", |
000918 => x"4b4f", |
000919 => x"4100", |
000920 => x"6177", |
000921 => x"7469", |
000922 => x"6e69", |
000923 => x"2067", |
000924 => x"4942", |
000925 => x"454e", |
000926 => x"4558", |
000927 => x"2e2e", |
000928 => x"202e", |
000929 => x"4c00", |
000930 => x"616f", |
000931 => x"6964", |
000932 => x"676e", |
000933 => x"2e2e", |
000934 => x"202e", |
000935 => x"0a00", |
000936 => x"3c0a", |
000937 => x"203c", |
000938 => x"454e", |
000939 => x"344f", |
000940 => x"3033", |
000941 => x"4220", |
000942 => x"6f6f", |
000943 => x"6c74", |
000944 => x"616f", |
000945 => x"6564", |
000946 => x"2072", |
000947 => x"3e3e", |
000948 => x"0a0a", |
000949 => x"4c42", |
000950 => x"3a56", |
000951 => x"4e20", |
000952 => x"766f", |
000953 => x"3220", |
000954 => x"2039", |
000955 => x"3032", |
000956 => x"3931", |
000957 => x"480a", |
000958 => x"5657", |
000959 => x"203a", |
000960 => x"7830", |
000961 => x"0a00", |
000962 => x"5355", |
000963 => x"3a52", |
000964 => x"3020", |
000965 => x"0078", |
000966 => x"430a", |
000967 => x"4b4c", |
000968 => x"203a", |
000969 => x"7830", |
000970 => x"0a00", |
000971 => x"4f52", |
000972 => x"3a4d", |
000973 => x"3020", |
000974 => x"0078", |
000975 => x"520a", |
000976 => x"4d41", |
000977 => x"203a", |
000978 => x"7830", |
000979 => x"0a00", |
000980 => x"5953", |
000981 => x"3a53", |
000982 => x"3020", |
000983 => x"0078", |
000984 => x"0a0a", |
000985 => x"7541", |
000986 => x"6f74", |
000987 => x"6f62", |
000988 => x"746f", |
000989 => x"6920", |
000990 => x"206e", |
000991 => x"7338", |
000992 => x"202e", |
000993 => x"7250", |
000994 => x"7365", |
000995 => x"2073", |
000996 => x"656b", |
000997 => x"2079", |
000998 => x"6f74", |
000999 => x"6120", |
001000 => x"6f62", |
001001 => x"7472", |
001002 => x"0a2e", |
001003 => x"0a00", |
001004 => x"4d43", |
001005 => x"3a44", |
001006 => x"203e", |
001007 => x"4200", |
001008 => x"2079", |
001009 => x"7453", |
001010 => x"7065", |
001011 => x"6168", |
001012 => x"206e", |
001013 => x"6f4e", |
001014 => x"746c", |
001015 => x"6e69", |
001016 => x"0067", |
001017 => x"6142", |
001018 => x"2064", |
001019 => x"4d43", |
001020 => x"2144", |
001021 => x"0000", |
000784 => x"5c0c", |
000785 => x"5c0c", |
000786 => x"dd2c", |
000787 => x"d03c", |
000788 => x"0200", |
000789 => x"4c8d", |
000790 => x"0000", |
000791 => x"4130", |
000792 => x"f0b2", |
000793 => x"fdff", |
000794 => x"ffa4", |
000795 => x"4130", |
000796 => x"403d", |
000797 => x"ffa6", |
000798 => x"f03c", |
000799 => x"00ff", |
000800 => x"4c8d", |
000801 => x"0000", |
000802 => x"403e", |
000803 => x"ffa4", |
000804 => x"4e2c", |
000805 => x"930c", |
000806 => x"3bfd", |
000807 => x"4d2c", |
000808 => x"4130", |
000809 => x"4c82", |
000810 => x"ffae", |
000811 => x"4130", |
000812 => x"ec82", |
000813 => x"ffae", |
000814 => x"4130", |
000815 => x"d232", |
000816 => x"4303", |
000817 => x"4130", |
000818 => x"d032", |
000819 => x"4000", |
000820 => x"4130", |
000821 => x"4c4e", |
000822 => x"4d4c", |
000823 => x"108e", |
000824 => x"de0c", |
000825 => x"4130", |
000826 => x"40b2", |
000827 => x"4700", |
000828 => x"ffb8", |
000829 => x"4130", |
000830 => x"4134", |
000831 => x"4135", |
000832 => x"4136", |
000833 => x"4137", |
000834 => x"4138", |
000835 => x"4139", |
000836 => x"413a", |
000837 => x"4130", |
000838 => x"533d", |
000839 => x"c312", |
000840 => x"100c", |
000841 => x"930d", |
000842 => x"23fb", |
000843 => x"4130", |
000844 => x"6f42", |
000845 => x"746f", |
000846 => x"6e69", |
000847 => x"2e67", |
000848 => x"2e2e", |
000849 => x"0a0a", |
000850 => x"4300", |
000851 => x"444d", |
000852 => x"3a73", |
000853 => x"200a", |
000854 => x"3a64", |
000855 => x"4420", |
000856 => x"6d75", |
000857 => x"2070", |
000858 => x"454d", |
000859 => x"0a4d", |
000860 => x"6520", |
000861 => x"203a", |
000862 => x"6f4c", |
000863 => x"6461", |
000864 => x"4520", |
000865 => x"5045", |
000866 => x"4f52", |
000867 => x"0a4d", |
000868 => x"6820", |
000869 => x"203a", |
000870 => x"6548", |
000871 => x"706c", |
000872 => x"200a", |
000873 => x"3a70", |
000874 => x"5320", |
000875 => x"6f74", |
000876 => x"6572", |
000877 => x"4520", |
000878 => x"5045", |
000879 => x"4f52", |
000880 => x"0a4d", |
000881 => x"7220", |
000882 => x"203a", |
000883 => x"6552", |
000884 => x"7473", |
000885 => x"7261", |
000886 => x"0a74", |
000887 => x"7320", |
000888 => x"203a", |
000889 => x"7453", |
000890 => x"7261", |
000891 => x"2074", |
000892 => x"7061", |
000893 => x"0a70", |
000894 => x"7520", |
000895 => x"203a", |
000896 => x"7055", |
000897 => x"6f6c", |
000898 => x"6461", |
000899 => x"0a00", |
000900 => x"3a00", |
000901 => x"2020", |
000902 => x"0700", |
000903 => x"450a", |
000904 => x"5252", |
000905 => x"005f", |
000906 => x"7250", |
000907 => x"636f", |
000908 => x"6565", |
000909 => x"2064", |
000910 => x"7928", |
000911 => x"6e2f", |
000912 => x"3f29", |
000913 => x"0a00", |
000914 => x"7257", |
000915 => x"7469", |
000916 => x"6e69", |
000917 => x"2e67", |
000918 => x"2e2e", |
000919 => x"0020", |
000920 => x"4b4f", |
000921 => x"4100", |
000922 => x"6177", |
000923 => x"7469", |
000924 => x"6e69", |
000925 => x"2067", |
000926 => x"4942", |
000927 => x"454e", |
000928 => x"4558", |
000929 => x"2e2e", |
000930 => x"202e", |
000931 => x"4c00", |
000932 => x"616f", |
000933 => x"6964", |
000934 => x"676e", |
000935 => x"2e2e", |
000936 => x"202e", |
000937 => x"0a00", |
000938 => x"3c0a", |
000939 => x"203c", |
000940 => x"454e", |
000941 => x"344f", |
000942 => x"3033", |
000943 => x"4220", |
000944 => x"6f6f", |
000945 => x"6c74", |
000946 => x"616f", |
000947 => x"6564", |
000948 => x"2072", |
000949 => x"3e3e", |
000950 => x"0a0a", |
000951 => x"4c42", |
000952 => x"3a56", |
000953 => x"4420", |
000954 => x"6365", |
000955 => x"2020", |
000956 => x"2036", |
000957 => x"3032", |
000958 => x"3931", |
000959 => x"480a", |
000960 => x"5657", |
000961 => x"203a", |
000962 => x"7830", |
000963 => x"0a00", |
000964 => x"5355", |
000965 => x"3a52", |
000966 => x"3020", |
000967 => x"0078", |
000968 => x"430a", |
000969 => x"4b4c", |
000970 => x"203a", |
000971 => x"7830", |
000972 => x"0a00", |
000973 => x"4f52", |
000974 => x"3a4d", |
000975 => x"3020", |
000976 => x"0078", |
000977 => x"520a", |
000978 => x"4d41", |
000979 => x"203a", |
000980 => x"7830", |
000981 => x"0a00", |
000982 => x"5953", |
000983 => x"3a53", |
000984 => x"3020", |
000985 => x"0078", |
000986 => x"0a0a", |
000987 => x"7541", |
000988 => x"6f74", |
000989 => x"6f62", |
000990 => x"746f", |
000991 => x"6920", |
000992 => x"206e", |
000993 => x"7338", |
000994 => x"202e", |
000995 => x"7250", |
000996 => x"7365", |
000997 => x"2073", |
000998 => x"656b", |
000999 => x"2079", |
001000 => x"6f74", |
001001 => x"6120", |
001002 => x"6f62", |
001003 => x"7472", |
001004 => x"0a2e", |
001005 => x"0a00", |
001006 => x"4d43", |
001007 => x"3a44", |
001008 => x"203e", |
001009 => x"4200", |
001010 => x"2079", |
001011 => x"7453", |
001012 => x"7065", |
001013 => x"6168", |
001014 => x"206e", |
001015 => x"6f4e", |
001016 => x"746c", |
001017 => x"6e69", |
001018 => x"0067", |
001019 => x"6142", |
001020 => x"2064", |
001021 => x"4d43", |
001022 => x"2144", |
001023 => x"0000", |
others => x"0000" |
); |
|
/neo430/trunk/neo430/rtl/core/neo430_exirq.vhd
2,16 → 2,16
-- # << NEO430 - External Interrupts Controller >> # |
-- # ********************************************************************************************* # |
-- # This unit provides 8 maskable external interrupt lines with according ACK lines. The IRQ # |
-- # can be globally set to trigger either on a high-level or on a rising edge. Each line has a # |
-- # unique enable bit. The acknowledge output is set high for one clock cycle to confirm the # |
-- # interrupt has been sampled and has also been cpatured by the handler function. # |
-- # All external interrupt requests are forwarded to a single CPU interrupt. The according # |
-- # trigger on a high level (use external edge detectors if required). Each line has a unique # |
-- # enable bit. The acknowledge output is set high for one clock cycle to confirm the # |
-- # interrupt has been sampled and has also been cpatured by the according handler function. # |
-- # All external interrupt requests are forwarded to a *single CPU interrupt*. The according IRQ # |
-- # has to check the SRC bits in the unit's control register to determine the actual source and # |
-- # start the according handler function. # |
-- # If several IRQs occur at the same time, the one with highest priority is executed while the # |
-- # others are kept in a buffer. The buffer is reset when the global enable flag of the unit is # |
-- # cleared. # |
-- # ext_irq_i(0) has highest priority while ext_irq_i(7) has the lowest priority. # |
-- # cleared. ext_irq_i(0) has highest priority while ext_irq_i(7) has the lowest priority. # |
-- # Each enabled interrupt channel can also be triggered by software using the sw_irq_x bits. # |
-- # ********************************************************************************************* # |
-- # This file is part of the NEO430 Processor project: https://github.com/stnolting/neo430 # |
-- # Copyright by Stephan Nolting: stnolting@gmail.com # |
31,7 → 31,7
-- # You should have received a copy of the GNU Lesser General Public License along with this # |
-- # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
-- # ********************************************************************************************* # |
-- # Stephan Nolting, Hannover, Germany 29.11.2019 # |
-- # Stephan Nolting, Hannover, Germany 06.12.2019 # |
-- ################################################################################################# |
|
library ieee; |
61,20 → 61,22
architecture neo430_exirq_rtl of neo430_exirq is |
|
-- control register bits -- |
constant ctrl_src0_c : natural := 0; -- r/-: IRQ source bit 0 |
constant ctrl_src1_c : natural := 1; -- r/-: IRQ source bit 1 |
constant ctrl_src2_c : natural := 2; -- r/-: IRQ source bit 2 |
constant ctrl_trig_c : natural := 3; -- r/w: global trigger (0: high-level, 1: rising-edge) |
constant ctrl_en_c : natural := 4; -- r/w: unit enable |
-- ... |
constant ctrl_en_irq0_c : natural := 8; -- r/w: IRQ 0 enable |
constant ctrl_en_irq1_c : natural := 9; -- r/w: IRQ 1 enable |
constant ctrl_en_irq2_c : natural := 10; -- r/w: IRQ 2 enable |
constant ctrl_en_irq3_c : natural := 11; -- r/w: IRQ 3 enable |
constant ctrl_en_irq4_c : natural := 12; -- r/w: IRQ 4 enable |
constant ctrl_en_irq5_c : natural := 13; -- r/w: IRQ 5 enable |
constant ctrl_en_irq6_c : natural := 14; -- r/w: IRQ 6 enable |
constant ctrl_en_irq7_c : natural := 15; -- r/w: IRQ 7 enable |
constant ctrl_src0_c : natural := 0; -- r/-: IRQ source bit 0 |
constant ctrl_src1_c : natural := 1; -- r/-: IRQ source bit 1 |
constant ctrl_src2_c : natural := 2; -- r/-: IRQ source bit 2 |
constant ctrl_en_c : natural := 3; -- r/w: unit enable |
constant ctrl_sw_irq_c : natural := 4; -- -/w: enable SW IRQ trigger, auto-clears |
constant ctrl_sw_irq_sel0_c : natural := 5; -- -/w: SW IRQ select bit 0 |
constant ctrl_sw_irq_sel1_c : natural := 6; -- -/w: SW IRQ select bit 1 |
constant ctrl_sw_irq_sel2_c : natural := 7; -- -/w: SW IRQ select bit 2 |
constant ctrl_en_irq0_c : natural := 8; -- r/w: IRQ channel 0 enable |
constant ctrl_en_irq1_c : natural := 9; -- r/w: IRQ channel 1 enable |
constant ctrl_en_irq2_c : natural := 10; -- r/w: IRQ channel 2 enable |
constant ctrl_en_irq3_c : natural := 11; -- r/w: IRQ channel 3 enable |
constant ctrl_en_irq4_c : natural := 12; -- r/w: IRQ channel 4 enable |
constant ctrl_en_irq5_c : natural := 13; -- r/w: IRQ channel 5 enable |
constant ctrl_en_irq6_c : natural := 14; -- r/w: IRQ channel 6 enable |
constant ctrl_en_irq7_c : natural := 15; -- r/w: IRQ channel 7 enable |
|
-- IO space: module base address -- |
constant hi_abb_c : natural := index_size_f(io_size_c)-1; -- high address boundary bit |
87,11 → 89,12
|
-- r/w accessible registers -- |
signal irq_enable : std_ulogic_vector(7 downto 0); |
signal irq_trigger : std_ulogic; |
signal enable : std_ulogic; |
signal sw_trig : std_ulogic; |
signal sw_trig_src : std_ulogic_vector(2 downto 0); |
|
-- irq input / ack output system -- |
signal irq_sync0, irq_sync1, irq_sync2, irq_raw, irq_valid, ack_mask : std_ulogic_vector(7 downto 0); |
signal irq_sync, irq_raw, sw_irq, irq_valid, ack_mask : std_ulogic_vector(7 downto 0); |
|
-- controller core -- |
signal irq_buf : std_ulogic_vector(7 downto 0); |
112,33 → 115,47
wr_access: process(clk_i) |
begin |
if rising_edge(clk_i) then |
sw_trig <= '0'; |
if (wren = '1') then |
irq_trigger <= data_i(ctrl_trig_c); |
enable <= data_i(ctrl_en_c); |
irq_enable <= data_i(ctrl_en_irq7_c downto ctrl_en_irq0_c); |
enable <= data_i(ctrl_en_c); |
irq_enable <= data_i(ctrl_en_irq7_c downto ctrl_en_irq0_c); |
-- software irq trigger -- |
sw_trig <= data_i(ctrl_sw_irq_c); |
sw_trig_src <= data_i(ctrl_sw_irq_sel2_c downto ctrl_sw_irq_sel0_c); |
end if; |
end if; |
end process wr_access; |
|
|
-- Get external interrupt request -------------------------------------------- |
-- Get external/software interrupt request ---------------------------------- |
-- ----------------------------------------------------------------------------- |
exirq_sync: process(clk_i) |
ext_irq_source_sync: process(clk_i) |
begin |
if rising_edge(clk_i) then |
-- no metastability! -- |
irq_sync0 <= ext_irq_i; |
irq_sync1 <= irq_sync0; |
-- sample again for edge detection -- |
irq_sync2 <= irq_sync1; |
irq_sync <= ext_irq_i; |
irq_raw <= irq_sync; -- sync to avoid metastability |
end if; |
end process exirq_sync; |
end process ext_irq_source_sync; |
|
-- rising-edge or high-level detector -- |
irq_raw <= (irq_sync1 and (not irq_sync2)) when (irq_trigger = '1') else irq_sync1; |
sw_irq_source: process(sw_trig, sw_trig_src) |
variable sw_irq_v : std_ulogic_vector(3 downto 0); |
begin |
sw_irq_v := sw_trig & sw_trig_src; |
case sw_irq_v is |
when "1000" => sw_irq <= "00000001"; |
when "1001" => sw_irq <= "00000010"; |
when "1010" => sw_irq <= "00000100"; |
when "1011" => sw_irq <= "00001000"; |
when "1100" => sw_irq <= "00010000"; |
when "1101" => sw_irq <= "00100000"; |
when "1110" => sw_irq <= "01000000"; |
when "1111" => sw_irq <= "10000000"; |
when others => sw_irq <= "00000000"; |
end case; |
end process sw_irq_source; |
|
-- only pass enabled interrupt sources -- |
irq_valid <= irq_raw and irq_enable; |
irq_valid <= (irq_raw or sw_irq) and irq_enable; |
|
|
-- IRQ controller core ------------------------------------------------------ |
191,18 → 208,20
|
-- ACK priority decoder ----------------------------------------------------- |
-- ----------------------------------------------------------------------------- |
ack_priority_dec: process(irq_src_reg) |
ack_priority_dec: process(state, irq_src_reg) |
variable irq_src_v : std_ulogic_vector(3 downto 0); |
begin |
case irq_src_reg is |
when "000" => ack_mask <= "00000001"; |
when "001" => ack_mask <= "00000010"; |
when "010" => ack_mask <= "00000100"; |
when "011" => ack_mask <= "00001000"; |
when "100" => ack_mask <= "00010000"; |
when "101" => ack_mask <= "00100000"; |
when "110" => ack_mask <= "01000000"; |
when "111" => ack_mask <= "10000000"; |
when others => ack_mask <= "--------"; |
irq_src_v := state & irq_src_reg; |
case irq_src_v is |
when "1000" => ack_mask <= "00000001"; |
when "1001" => ack_mask <= "00000010"; |
when "1010" => ack_mask <= "00000100"; |
when "1011" => ack_mask <= "00001000"; |
when "1100" => ack_mask <= "00010000"; |
when "1101" => ack_mask <= "00100000"; |
when "1110" => ack_mask <= "01000000"; |
when "1111" => ack_mask <= "10000000"; |
when others => ack_mask <= "00000000"; |
end case; |
end process ack_priority_dec; |
|
216,7 → 235,6
if (rden = '1') then |
data_o(ctrl_src2_c downto ctrl_src0_c) <= irq_src_reg; |
data_o(ctrl_en_irq7_c downto ctrl_en_irq0_c) <= irq_enable; |
data_o(ctrl_trig_c) <= irq_trigger; |
data_o(ctrl_en_c) <= enable; |
end if; |
end if; |
/neo430/trunk/neo430/rtl/core/neo430_package.vhd
19,7 → 19,7
-- # You should have received a copy of the GNU Lesser General Public License along with this # |
-- # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
-- # ********************************************************************************************* # |
-- # Stephan Nolting, Hannover, Germany 27.11.2019 # |
-- # Stephan Nolting, Hannover, Germany 06.12.2019 # |
-- ################################################################################################# |
|
library ieee; |
30,7 → 30,7
|
-- Processor Hardware Version ------------------------------------------------------------- |
-- ------------------------------------------------------------------------------------------- |
constant hw_version_c : std_ulogic_vector(15 downto 0) := x"0320"; -- no touchy! |
constant hw_version_c : std_ulogic_vector(15 downto 0) := x"0321"; -- no touchy! |
|
-- Advanced Hardware Configuration -------------------------------------------------------- |
-- ------------------------------------------------------------------------------------------- |
/neo430/trunk/neo430/sim/ISIM/neo430_tb.wcfg
12,15 → 12,15
</db_ref> |
</db_ref_list> |
<zoom_setting> |
<ZoomStartTime time="19996391666667fs"></ZoomStartTime> |
<ZoomEndTime time="20018191666668fs"></ZoomEndTime> |
<Cursor1Time time="20000025000000fs"></Cursor1Time> |
<ZoomStartTime time="1434752233333fs"></ZoomStartTime> |
<ZoomEndTime time="1434861633334fs"></ZoomEndTime> |
<Cursor1Time time="1430885000000fs"></Cursor1Time> |
</zoom_setting> |
<column_width_setting> |
<NameColumnWidth column_width="167"></NameColumnWidth> |
<ValueColumnWidth column_width="65"></ValueColumnWidth> |
<ValueColumnWidth column_width="61"></ValueColumnWidth> |
</column_width_setting> |
<WVObjectSize size="132" /> |
<WVObjectSize size="135" /> |
<wvobject type="divider" fp_name="divider6"> |
<obj_property name="label">Global</obj_property> |
<obj_property name="DisplayName">label</obj_property> |
267,7 → 267,6
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_gpio_inst_true/neo430_gpio_inst/gpio_o" type="array"> |
<obj_property name="ElementShortName">gpio_o[15:0]</obj_property> |
<obj_property name="ObjectShortName">gpio_o[15:0]</obj_property> |
<obj_property name="isExpanded"></obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_gpio_inst_true/neo430_gpio_inst/gpio_i" type="array"> |
<obj_property name="ElementShortName">gpio_i[15:0]</obj_property> |
532,10 → 531,6
<obj_property name="ElementShortName">enable</obj_property> |
<obj_property name="ObjectShortName">enable</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/irq_trigger" type="logic"> |
<obj_property name="ElementShortName">irq_trigger</obj_property> |
<obj_property name="ObjectShortName">irq_trigger</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/state" type="logic"> |
<obj_property name="ElementShortName">state</obj_property> |
<obj_property name="ObjectShortName">state</obj_property> |
548,6 → 543,10
<obj_property name="ElementShortName">irq_enable[7:0]</obj_property> |
<obj_property name="ObjectShortName">irq_enable[7:0]</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/ack_mask" type="array"> |
<obj_property name="ElementShortName">ack_mask[7:0]</obj_property> |
<obj_property name="ObjectShortName">ack_mask[7:0]</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/irq_valid" type="array"> |
<obj_property name="ElementShortName">irq_valid[7:0]</obj_property> |
<obj_property name="ObjectShortName">irq_valid[7:0]</obj_property> |
560,6 → 559,18
<obj_property name="ElementShortName">irq_src_reg[2:0]</obj_property> |
<obj_property name="ObjectShortName">irq_src_reg[2:0]</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/sw_trig" type="logic"> |
<obj_property name="ElementShortName">sw_trig</obj_property> |
<obj_property name="ObjectShortName">sw_trig</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/sw_trig_src" type="array"> |
<obj_property name="ElementShortName">sw_trig_src[2:0]</obj_property> |
<obj_property name="ObjectShortName">sw_trig_src[2:0]</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/sw_irq" type="array"> |
<obj_property name="ElementShortName">sw_irq[7:0]</obj_property> |
<obj_property name="ObjectShortName">sw_irq[7:0]</obj_property> |
</wvobject> |
<wvobject fp_name="/neo430_tb/neo430_top_inst/neo430_exirq_inst_true/neo430_exirq_inst/cpu_irq_o" type="logic"> |
<obj_property name="ElementShortName">cpu_irq_o</obj_property> |
<obj_property name="ObjectShortName">cpu_irq_o</obj_property> |
/neo430/trunk/neo430/sw/example/exirq_test/main.c
19,7 → 19,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 29.11.2019 # |
// # Stephan Nolting, Hannover, Germany 06.11.2019 # |
// ################################################################################################# |
|
|
35,7 → 35,9
void ext_irq_ch2_handler(void); |
void ext_irq_ch3_handler(void); |
|
void ext_irq_ch7_handler(void); |
|
|
/* ------------------------------------------------------------ |
* INFO Main function |
* ------------------------------------------------------------ */ |
53,11 → 55,14
return 1; |
} |
|
neo430_uart_br_print("\nTrigger the external interrupt pin (set high) or perform a manual\n" |
"triggering (sw interrupt) by pressing key 0 to 7.\n"); |
|
// clear output port |
neo430_gpio_port_set(0); |
|
|
// use this struct for configuring the EXIRQ controller |
// use this predefined struct for configuring the EXIRQ controller |
struct neo430_exirq_config_t exirq_config; |
|
// initialise handler addresses |
68,22 → 73,28
exirq_config.address[4] = 0; // set unused vectors to zero |
exirq_config.address[5] = 0; |
exirq_config.address[6] = 0; |
exirq_config.address[7] = 0; |
exirq_config.address[7] = (uint16_t)(&ext_irq_ch7_handler); |
|
// enable used IRQ channels |
exirq_config.enable = 0b00001111; |
// only enable the actually used IRQ channels |
exirq_config.enable = 0b10001111; |
|
// use rising edge as trigger for all channels |
exirq_config.trigger = 1; |
|
// send configuration and activate EXIRQ controller |
// program configuration and activate EXIRQ controller |
neo430_exirq_config(exirq_config); |
neo430_exirq_enable(); |
|
// enable global interrupts and go to sleep |
// enable global interrupts |
neo430_eint(); |
|
// trigger EXIRQ channel 0 IRQ by software just for fun |
neo430_exirq_sw_irq(0); |
|
// wait for key input |
while(1) { |
neo430_sleep(); |
char c = neo430_uart_getc(); |
if ((c >= '0') && (c <= '7')) { |
c = c - '0'; |
neo430_exirq_sw_irq((uint8_t)c); // trigger according IRQ by software |
} |
} |
|
return 0; |
92,7 → 103,7
|
// handler functions for the external interrupt channels: |
// - must not have parameters nor a return value |
// - must not use the interrupt attribute, as they are normal functions, called by an actual interrupt handler |
// - should not use the interrupt attribute, as they can be normal functions called by the actual interrupt handler |
|
void ext_irq_ch0_handler(void) { |
|
117,3 → 128,9
neo430_gpio_pin_toggle(3); |
} |
|
|
void ext_irq_ch7_handler(void) { |
|
neo430_gpio_pin_toggle(7); |
} |
|
/neo430/trunk/neo430/sw/lib/neo430/include/neo430.h
23,7 → 23,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 28.11.2019 # |
// # Stephan Nolting, Hannover, Germany 06.12.2019 # |
// ################################################################################################# |
|
#ifndef neo430_h |
355,22 → 355,24
#define EXIRQ_CT (*(REG16 0xFFEE)) // r/w: control register |
|
// EXIRQ control register |
#define EXIRQ_CT_SRC0 0 // r/-: IRQ source bit 0 |
#define EXIRQ_CT_SRC1 1 // r/-: IRQ source bit 1 |
#define EXIRQ_CT_SRC2 2 // r/-: IRQ source bit 2 |
#define EXIRQ_CT_TRIG 3 // r/w: global trigger (0: high-level, 1: rising-edge) |
#define EXIRQ_CT_EN 4 // r/w: unit enable |
#define EXIRQ_CT_SRC0 0 // r/-: IRQ source bit 0 |
#define EXIRQ_CT_SRC1 1 // r/-: IRQ source bit 1 |
#define EXIRQ_CT_SRC2 2 // r/-: IRQ source bit 2 |
#define EXIRQ_CT_EN 3 // r/w: unit enable |
#define EXIRQ_CT_SW_IRQ 4 // -/w: enable SW IRQ trigger, auto-clears |
#define EXIRQ_CT_SW_IRQ_SEL0 5 // -/w: SW IRQ select bit 0, read as zero |
#define EXIRQ_CT_SW_IRQ_SEL1 6 // -/w: SW IRQ select bit 1, read as zero |
#define EXIRQ_CT_SW_IRQ_SEL2 7 // -/w: SW IRQ select bit 2, read as zero |
#define EXIRQ_CT_IRQ0_EN 8 // r/w: Enable IRQ channel 0 |
#define EXIRQ_CT_IRQ1_EN 9 // r/w: Enable IRQ channel 1 |
#define EXIRQ_CT_IRQ2_EN 10 // r/w: Enable IRQ channel 2 |
#define EXIRQ_CT_IRQ3_EN 11 // r/w: Enable IRQ channel 3 |
#define EXIRQ_CT_IRQ4_EN 12 // r/w: Enable IRQ channel 4 |
#define EXIRQ_CT_IRQ5_EN 13 // r/w: Enable IRQ channel 5 |
#define EXIRQ_CT_IRQ6_EN 14 // r/w: Enable IRQ channel 6 |
#define EXIRQ_CT_IRQ7_EN 15 // r/w: Enable IRQ channel 7 |
|
#define EXIRQ_CT_IRQ0_EN 8 // r/w: Enable IRQ channel 0 |
#define EXIRQ_CT_IRQ1_EN 9 // r/w: Enable IRQ channel 1 |
#define EXIRQ_CT_IRQ2_EN 10 // r/w: Enable IRQ channel 2 |
#define EXIRQ_CT_IRQ3_EN 11 // r/w: Enable IRQ channel 3 |
#define EXIRQ_CT_IRQ4_EN 12 // r/w: Enable IRQ channel 4 |
#define EXIRQ_CT_IRQ5_EN 13 // r/w: Enable IRQ channel 5 |
#define EXIRQ_CT_IRQ6_EN 14 // r/w: Enable IRQ channel 6 |
#define EXIRQ_CT_IRQ7_EN 15 // r/w: Enable IRQ channel 7 |
|
|
// ---------------------------------------------------------------------------- |
// System Configuration (SYSCONFIG) |
// ---------------------------------------------------------------------------- |
/neo430/trunk/neo430/sw/lib/neo430/include/neo430_exirq.h
19,7 → 19,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 29.11.2019 # |
// # Stephan Nolting, Hannover, Germany 05.12.2019 # |
// ################################################################################################# |
|
#ifndef neo430_exirq_h |
28,7 → 28,6
// data types |
struct neo430_exirq_config_t { |
uint16_t address[8]; |
uint8_t trigger; |
uint8_t enable; |
}; |
|
39,6 → 38,7
void neo430_exirq_enable(void); // activate EXIRQ controller |
void neo430_exirq_disable(void); // deactivate EXIRQ controller |
void neo430_exirq_config(struct neo430_exirq_config_t config); // configure EXIRQ controller |
void neo430_exirq_sw_irq(uint8_t id); // trigger interrupt by software |
void __attribute__((__interrupt__)) exirq_irq_handler(void); // EXIRQ IRQ handler |
|
#endif // neo430_exirq_h |
/neo430/trunk/neo430/sw/lib/neo430/source/neo430_exirq.c
19,7 → 19,7
// # You should have received a copy of the GNU Lesser General Public License along with this # |
// # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
// # ********************************************************************************************* # |
// # Stephan Nolting, Hannover, Germany 28.11.2019 # |
// # Stephan Nolting, Hannover, Germany 05.12.2019 # |
// ################################################################################################# |
|
#include "neo430.h" |
63,23 → 63,35
neo430_exirq_vectors[6] = config.address[6]; |
neo430_exirq_vectors[7] = config.address[7]; |
|
// set correct CPU external IRQ interrupt handler address |
// set correct CPU external interrupts request handler address |
IRQVEC_EXT = (uint16_t)(&exirq_irq_handler); |
|
// configure channel enables and global trigger |
uint16_t trig = (uint16_t)config.trigger; |
uint16_t ena = (uint16_t)config.enable; |
// configure channel enables |
uint16_t enable = (uint16_t)config.enable; |
EXIRQ_CT = (enable<<EXIRQ_CT_IRQ0_EN); |
} |
|
EXIRQ_CT = (ena<<EXIRQ_CT_IRQ0_EN) | (trig<<EXIRQ_CT_TRIG) ; |
|
/* ------------------------------------------------------------ |
* INFO Trigger IRQ channel by software |
* PARAM id (0..7) indicating which (ENABLED!) channel shall be triggered |
* ------------------------------------------------------------ */ |
void neo430_exirq_sw_irq(uint8_t id) { |
|
uint16_t irq_sel = (uint16_t)(id & 7); |
|
// apply sw irq enable bit and according irq select |
EXIRQ_CT |= (1<<EXIRQ_CT_SW_IRQ) | (irq_sel<<EXIRQ_CT_SW_IRQ_SEL0); |
} |
|
|
/* ------------------------------------------------------------ |
* INFO Actual external interrupts controller IRQ handler |
* INFO This function is automatically installed |
* ------------------------------------------------------------ */ |
void __attribute__((__interrupt__)) exirq_irq_handler(void) { |
|
uint16_t src = EXIRQ_CT & ((8-1)<<EXIRQ_CT_SRC0); |
neo430_call_address(neo430_exirq_vectors[src]); |
uint16_t src = EXIRQ_CT & (7<<EXIRQ_CT_SRC0); // get IRQ source |
neo430_call_address(neo430_exirq_vectors[src]); // call according handler |
} |
|
/neo430/trunk/neo430/sw/lib/neo430/source/neo430_uart.c
193,7 → 193,7
if (d < 10) |
d += '0'; |
else |
d += 'A'-10; |
d += 'a'-10; |
neo430_uart_putc(d); |
} |
|