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

Subversion Repositories wb_lcd

[/] [wb_lcd/] [trunk/] [verilog/] [wb_lcd_ramless/] [rtl/] [wb_lcd.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jvillar
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  wb_lcd.v                                                    ////
4
////                                                              ////
5
////  This file is part of:                                       ////
6
////  WISHBONE/MEM MAPPED CONTROLLER FOR LCD CHARACTER DISPLAYS   ////
7
////  http://www.opencores.org/projects/wb_lcd/                   ////
8
////                                                              ////
9
////  Description                                                 ////
10
////   -  Wishbone wrapper.                                       ////
11
////                                                              ////
12
////  To Do:                                                      ////
13
////   - nothing really                                           ////
14
////                                                              ////
15
////  Author(s):                                                  ////
16
////   - José Ignacio Villar, jose@dte.us.es , jvillar@gmail.com  ////
17
////                                                              ////
18
//////////////////////////////////////////////////////////////////////
19
////                                                              ////
20
//// Copyright (C) 2009 José Ignacio Villar - jvillar@gmail.com   ////
21
////                                                              ////
22
//// This source file may be used and distributed without         ////
23
//// restriction provided that this copyright statement is not    ////
24
//// removed from the file and that any derivative work contains  ////
25
//// the original copyright notice and the associated disclaimer. ////
26
////                                                              ////
27
//// This source file is free software; you can redistribute it   ////
28
//// and/or modify it under the terms of the GNU Lesser General   ////
29
//// Public License as published by the Free Software Foundation; ////
30
//// either version 3 of the License, or (at your option) any     ////
31
//// later version.                                               ////
32
////                                                              ////
33
//// This source is distributed in the hope that it will be       ////
34
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
35
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
36
//// PURPOSE.  See the GNU Lesser General Public License for more ////
37
//// details.                                                     ////
38
////                                                              ////
39
//// You should have received a copy of the GNU Lesser General    ////
40
//// Public License along with this source; if not, download it   ////
41
//// from http://www.gnu.org/licenses/lgpl.txt                    ////
42
////                                                              ////
43
//////////////////////////////////////////////////////////////////////
44
 
45
`include "lcd_defines.v"
46
 
47
module wb_lcd (
48
        //
49
        // I/O Ports
50
        //
51
        input                   wb_clk_i,
52
        input                   wb_rst_i,
53
 
54
        //
55
        // WB slave interface
56
        //
57
        input   [`WB_DAT_RNG]   wb_dat_i,
58
        output  [`WB_DAT_RNG]   wb_dat_o,
59
        input   [`WB_ADDR_RNG]  wb_adr_i,
60
        input   [`WB_BSEL_RNG]  wb_sel_i,
61
        input                   wb_we_i,
62
        input                   wb_cyc_i,
63
        input                   wb_stb_i,
64
        output                  wb_ack_o,
65
 
66
        //
67
        // LCD interface
68
        //
69
        output  [3:0]            SF_D,
70
        output                  LCD_E,
71
        output                  LCD_RS,
72
        output                  LCD_RW
73
        );
74
 
75
 
76
 
77
wire lcd_busy;
78
wire lcd_we;
79
 
80
assign wb_ack_o = wb_cyc_i & wb_stb_i;
81
assign lcd_we   = wb_cyc_i & wb_stb_i & wb_we_i & (wb_adr_i != 128);
82
assign wb_dat_o = lcd_busy ? `STATUS_BUSY_CODE : `STATUS_IDDLE_CODE;
83
 
84
 
85
//----------------------------------------------------------------------------
86
// Memory mapped LCD display controller
87
//----------------------------------------------------------------------------
88
 
89
lcd lcd(
90
        .clk    ( wb_clk_i ),
91
        .reset  ( wb_rst_i ),
92
 
93
        .dat    ( wb_dat_i[`DAT_RNG] ),
94
        .addr   ( wb_adr_i[`ADDR_WIDTH-1:0] ),
95
        .we     ( lcd_we ),
96
 
97
        .busy   ( lcd_busy ),
98
        .SF_D   ( SF_D ),
99
        .LCD_E  ( LCD_E ),
100
        .LCD_RS ( LCD_RS ),
101
        .LCD_RW ( LCD_RW )
102
        );
103
 
104
 
105
 
106
endmodule
107
 

powered by: WebSVN 2.1.0

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