OpenCores
URL https://opencores.org/ocsvn/mips32r1/mips32r1/trunk

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Hardware/] [XUPV5-LX110T_SoC/] [MIPS32-Pipelined-Hw/] [src/] [Switches/] [Switches.v] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ayersg
`timescale 1ns / 1ps
2
/*
3
 * File         : Switches.v
4
 * Project      : University of Utah, XUM Project MIPS32 core
5
 * Creator(s)   : Grant Ayers (ayers@cs.utah.edu)
6
 *
7
 * Modification History:
8
 *   Rev   Date         Initials  Description of Change
9
 *   1.0   17-Jul-2012  GEA       Initial design.
10
 *
11
 * Standards/Formatting:
12
 *   Verilog 2001, 4 soft tab, wide column.
13
 *
14
 * Description:
15
 *   A read interface between a 4-way handshaking data bus and
16
 *   8 physical switches, which are debounced.
17
 */
18
module Switches(
19
    input  clock,
20
    input  reset,
21
    input  Read,
22
    input  Write,
23
    input  [7:0] Switch_in, // Direct from physical switches
24
    output reg Ack,
25
    output [7:0] Switch_out
26
    );
27
 
28
    always @(posedge clock) begin
29
        Ack <= (reset) ? 0 : (Read | Write);
30
    end
31
 
32
    // Low-level switch debounce filter
33
    Switch_Filter Switch_Filter (
34
        .clock       (clock),
35
        .reset       (reset),
36
        .switch_in   (Switch_in),
37
        .switch_out  (Switch_out)
38
    );
39
 
40
 
41
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.