SOPC开发流程及开发平台简介课件解析.ppt

  1. 1、本文档共209页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
存储器分类 SRAM:synchronous random access memory的缩写,同步静态随机存储器,采用触发器的自保持功能存储数据。 SDRAM:synchronous dynamic random access memory的缩写,同步动态随机存储器。SDRAM与CPU频率同步,共享一个时钟周期。采用栅极电容存储电荷,因此需要定期进行刷新(充电)才能保存数据。容量大,但是读写速度不如SRAM。 FLASH:闪速存储器,一般用于程序存放和需要掉电保存的数据存放。 1 PIO(Parallel I/O) #include system.h #include altera_avalon_pio_regs.h #include alt_types.h int main (void) __attribute__ ((weak, alias (alt_main))); int alt_main (void) { unsigned char led = 0; unsigned int i; while (1) { led = 0; IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led); i = 0; while (i500000) i++; led = 1; IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, led); i = 0; while (i500000) i++; } return 0; } 串口UART #include stdio.h #include string.h #include io.h #include sys/alt_flash.h #include system.h int main() { char buffer[20]; char a[20]={‘H,e,‘l,‘l,‘0, ,‘w,‘o,‘r,‘l,‘d,‘.‘ }; FILE *uart= NULL; if( uart = fopen(UART1_NAME,r+) ) // Open file for reading and writing { while(1) { fprintf(uart,\n please input:%s,a); //print a message fgets(buffer,20,uart); //get uart message to a buffer fprintf(uart,\nyou have inputed:%s,buffer); //print the message in the buffer if( (buffer[0]==B) (buffer[1]==r) (buffer[2]==e)(buffer[3]==a)(buffer[4]==k) ) break; //if sent message is “Break, then close uart } fclose(uart); printf(\n uart has be closed!); } else { printf(\n cant open the uart); } } 定时器编程 #include system.h #include altera_avalon_pio_regs.h #include altera_avalon_timer_regs.h #include alt_types.h volatile alt_u16 count; static void handle_Timer0_interrupts(void* context, alt_u32 id) { alt_u16 a; volatile alt_u16 *countptr = (volatile alt_u16 *)context; IOWR_ALTERA_AVALON_TIMER_STATUS(TIMER_0_BASE, 0); //清TO标志 a = *countptr; a = a1; //取count中的值,再左移一位 if (a == 0x100) a = 1; /

文档评论(0)

南非的朋友 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档