1 `define ADDR_P1 16'hFF10
3 /* note: buttons are 'pressed' when the input is high */
18 assign data = (rd && (addr == `ADDR_P1)) ? p1 : 8'bzzzzzzzz;
20 wire p1013 = (p1[4] ? 4'b1111 : ~buttons[3:0]) | (p1[5] ? 4'b1111 : ~buttons[7:4]);
22 always @ (negedge core_clk) begin
25 `ADDR_P1: p1[5:4] <= data[5:4];
30 int <= | (oldp1013 & (oldp1013 ^ p1013));