URL
https://opencores.org/ocsvn/s6soc/s6soc/trunk
[/] [s6soc/] [trunk/] [rtl/] [spio.v] - Diff between revs 46 and 51
Show entire file |
Details |
Blame |
View Log
Rev 46 |
Rev 51 |
Line 2... |
Line 2... |
//
|
//
|
// Filename: spio.v
|
// Filename: spio.v
|
//
|
//
|
// Project: CMod S6 System on a Chip, ZipCPU demonstration project
|
// Project: CMod S6 System on a Chip, ZipCPU demonstration project
|
//
|
//
|
// Purpose:
|
// Purpose: To provide a bare minimum level of access to the two on-board
|
|
// buttons, the 4 LED's, and the external 4x4 keypad. This
|
|
// routine does *nothing* to debounce either buttons or keypad. Any such
|
|
// debouncing *must* be done in software. As with the rest of the S6
|
|
// project, the goal is to keep the logic small and simple, and this
|
|
// module is no different.
|
//
|
//
|
// With the USB cord on top, the board facing you, LED[0] is on the left.
|
// With the USB cord on top, the board facing you, LED[0] is on the left.
|
//
|
//
|
// Creator: Dan Gisselquist, Ph.D.
|
// Creator: Dan Gisselquist, Ph.D.
|
// Gisselquist Technology, LLC
|
// Gisselquist Technology, LLC
|
Line 70... |
Line 75... |
end
|
end
|
|
|
reg [3:0] x_kp_row, r_kp_row;
|
reg [3:0] x_kp_row, r_kp_row;
|
reg [1:0] x_btn, r_btn;
|
reg [1:0] x_btn, r_btn;
|
|
|
|
initial x_kp_row = 4'h0;
|
|
initial r_kp_row = 4'b0;
|
|
initial x_btn = 2'b0;
|
|
initial r_btn = 2'b0;
|
|
initial o_kp_int = 1'b0;
|
|
initial o_btn_int = 1'b0;
|
always @(posedge i_clk)
|
always @(posedge i_clk)
|
begin
|
begin
|
x_kp_row <= i_kp_row;
|
x_kp_row <= i_kp_row;
|
x_btn <= i_btn;
|
x_btn <= i_btn;
|
r_kp_row <= x_kp_row;
|
r_kp_row <= x_kp_row;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.