资源描述:
《nios ii常用函数详解(children ii常用函数详解)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、niosii常用函数详解(Childrenii常用函数详解)NIOSIIcommonlyusedfunctionsdetailedIOoperationfunctionFunctionprototype:IORD(BASE,REGNUM)Inputparameter:BASEisthebaseaddressoftheregister,andREGNUMistheoffsetoftheregisterFunctionDescription:thevalueoftheunitintheregisteroffsetREGNUMisreadfromthedevicewhosebaseaddre
2、ssisBASE.Thevalueoftheregisteriswithintherangeoftheaddressbus.Returnvalue:-Functionprototype:IOWR(BASE,REGNUM,DATA)Inputparameter:BASEisthebaseaddressoftheregister,REGNUMistheoffsetoftheregister,andDATAisthedatatobewrittenFunctionDescription:writesdatatotheoffsetregisterforoffsetREGNUM.Thevalueo
3、ftheregisteriswithintherangeoftheaddressbus.Returnvalue:-Functionprototype:IORD_32DIRECT(BASE,OFFSET)Inputparameter:BASEisthebaseaddressoftheregister,andOFFSETistheoffsetoftheregisterFunctionDescription:readthedataof32BitdirectlyfromtheregisterwithaddresslocationofBASE+OFFSETReturnvalue:-Functio
4、nprototype:IORD_16DIRECT(BASE,OFFSET)Inputparameter:BASEisthebaseaddressoftheregister,andOFFSETistheoffsetoftheregisterFunctionDescription:readthedataof16BitdirectlyfromtheregisterwithaddresslocationofBASE+OFFSETReturnvalue:-Functionprototype:IORD_8DIRECT(BASE,OFFSET)Inputparameter:BASEisthebase
5、addressoftheregister,andOFFSETistheoffsetoftheregisterFunctionDescription:readthedataof8BitdirectlyfromtheregisterwithaddresslocationofBASE+OFFSETReturnvalue:-Functionprototype:IOWR_32DIRECT(BASE,OFFSET,DATA)Inputparameter:BASEisthebaseaddressoftheregister,REGNUMistheoffsetoftheregister,andDATAi
6、sthedatatobewrittenFunctionDescription:writesdatadirectlytothe32BitinregisterslocatedataddresslocationsofBASE+OFFSETReturnvalue:-Functionprototype:IOWR_16DIRECT(BASE,OFFSET,DATA)Inputparameter:BASEisthebaseaddressoftheregister,REGNUMistheoffsetoftheregister,andDATAisthedatatobewrittenFunctionDes
7、cription:writesdatadirectlytothe16BitinregisterslocatedataddresslocationsofBASE+OFFSETReturnvalue:-Functionprototype:IOWR_8DIRECT(BASE,OFFSET,DATA)Inputparameter:BASEisthebaseaddressoftheregister,REGNUMistheoffsetoftheregist