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

沒有留言:

張貼留言

WOKWI ESP32 LED Control , Node-Red MQTT SQLITE  

WOKWI ESP32 LED Control ,  Node-Red  MQTT SQLITE   const char broker[] = "test.mosquitto.org" ; //const char broker[] = "br...