计算机组成原理 外设,输入输出系统 (RV$1.4$6.9,唐第5、8章) llxx@ustc.edu.cn 1
1 计算机组成原理 外设,输入输出系统 (RV $1.4 $6.9,唐第5、8章) llxx@ustc.edu.cn
o RV$1.4:外设(显示器, 触摸屏,网络) 0 RV$6.9:总线,IO系统 -示例:NetFPGA1 0G Ethernet NIC an FPGA-based open platform for network research and classroom experimentation -总线 -Control -Data ·PCl:并行总线 PCle ·PCle总线:串行总线 MAC PHY +Port 0 MAC PHY ++Port 1 -V0系统 DMA MAC PHY +Port 2 ·MMIO MAC PHY+Port 3 Polling,Interrupt-driven I/O,DMA ·设备驱动程序
• RV $1.4:外设(显示器,触摸屏,网络) • RV $6.9:总线,I/O系统 – 示例:NetFPGA 10G Ethernet NIC • an FPGA-based open platform for network research and classroom experimentation – 总线 • PCI:并行总线 • PCIe总线:串行总线 – I/O系统 • MMIO • Polling,Interrupt-driven I/O,DMA • 设备驱动程序
1/O:printf(),getchar(),putchar()? #include <stdio.h> Processor int main(void) int ch; FSB Graphics North Bridge SDRAM printf("Input a character:"); PCI 33 MHz M→ /read a Slots character from [cD-ooE South Bridge the standard input USB ISA stream * ch getchar(); Super putchar(ch); COM1 COM2 return 0;
I/O:printf(),getchar(),putchar()? #include <stdio.h> int main(void) { int ch; printf("Input a character:"); /* read a character from the standard input stream */ ch = getchar(); putchar(ch); return 0; }
KB:位置码 Key Cap d f 8 9 b Spring 哒哒嗌嗒 Mechanical switch 4 5 6 7 Conductor-coated membrane 0 2 Logical arrangement of keys Contacts Membrane switch 编码键盘:字符码(ASCI) 非编码键盘:位置码(POS机)
KB:位置码 编码键盘:字符码(ASCII) 非编码键盘:位置码(POS机)
I/F:Keyboard-to-processor connection Input interface Data Data Address KBD DATA Encoder Keyboard Processor R/W KBD STATUS circuit switches Master-ready Valid Slave-ready keyboard data 15 87 0 interrupt enable bit KBDR 151413 ready bit KBSR interrupt signal to processor
I/F:Keyboard-to-processor connection