2012年10月11日 星期四

RS Latch for DE2-70 Board




`timescale 1ns/100ps
module RSFF (SW, LEDR, LEDG);
input [17:0] SW; // toggle switches
output [17:0] LEDR; // red LEDs
output [7:0] LEDG; // green LEDs


wire s,r;
wire q,q_b;

    
assign LEDR = SW;
assign s = SW[0];
assign r = SW[1];

nor #(4) 
     g1 ( q_b, s, q ),
     g2 ( q, r, q_b );
     
assign LEDG[0]=q;
assign LEDG[1]=q_b;

endmodule

/*
module RSFF (input s, r, output q, q_b );
    nor #(4) 
     g1 ( q_b, s, q ),
     g2 ( q, r, q_b );
endmodule
*/




沒有留言:

張貼留言

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

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