7 output reg [7:0] buttons
10 assign outdata = 1'b1;
13 reg bitcount [3:0] = 0;
15 reg keyarrow, keyup, parity;
16 reg key_a,key_b,key_st,key_sel,key_up,key_dn,key_l,key_r;
18 assign buttons = {key_st,key_sel,key_b,key_a,key_dn,key_up,key_l,key_r};
20 always @ (negedge inclk) begin
21 if(bitcount == 10) begin
23 if(parity == (^ key)) begin
63 {key_a,key_b,key_st,key_sel,key_up,key_dn,key_l,key_r} <= 8'b0;
66 bitcount <= bitcount + 1;