2020年3月29日 星期日

BASIC Gate Verilog

BASIC Gate Verilog

module basic(KEY1,KEY2,LED1,LED2,LED3,LED4);
input KEY1,KEY2;
output LED1,LED2,LED3,LED4;

and_or_not (.A(KEY1),.B(KEY2),.O_and(LED1),.O_notA(LED2),.O_notB(LED3),.O_or(LED4));

endmodule


module and_or_not (A,B,O_and,O_notA,O_notB,O_or);
input A,B;
output O_and,O_notA,O_notB,O_or;

 assign O_and= A& B ;
 assign O_notA= ~A;
 assign O_notB= ~B;
 assign O_or= A| B;

endmodule

沒有留言:

張貼留言

2024產專班 作業2 (純模擬)

2024產專班 作業2  (純模擬) 1) LED ON,OFF,TIMER,FLASH 模擬 (switch 控制) 2)RFID卡號模擬 (buttom  模擬RFID UID(不從ESP32) Node-Red 程式 [{"id":"d8886...