所需E币: 3
时间: 2019-12-24 16:31
大小: 59.51KB
拨码开关控制LED灯/*----------------------------------------------------------Engineer:zhrscut--CreateDate:--ModuleName:--ToolVersions:Quartus_II9.1--欢迎加入EEPW,FPGA开发板DIY活动--------------------------------------------------------*/moduleswitch_key(clk,led,key);inputclk;input[1:0]key;output[7:0]led;reg[7:0]led_r;always@(posedgeclk)beginif(key==0)led_relseif(key==1)led_relseif(key==2)led_relseled_rendassignled=led_r;endmodule……