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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [openchip/] [doc/] [readme.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
OpenChip IP-Cores for GRLIB
2
 
3
 
4
implemented in this release:
5
 
6
APBGPIO
7
APBSUI
8
 
9
both tested on Memec S3-1500MB board.
10
 
11
 
12
Generic note about the IP Cores:
13
All REV 0 IPcores implement only minimal "software assisted"
14
functionality, so they are basically just like specialized
15
IO ports that connect to the extenal peripherals.
16
 
17
Next REVision will include dedicated hardware, but will be
18
backwards compatible and continue supporting the "software"
19
mode where the software has direct access to the peripherals.
20
 
21
 
22
 
23
APBGPIO
24
=======
25
Simple 32bit General Purpose Input Output port
26
 
27
address map (REV 0)
28
 
29
base+0 write : data output
30
base+4 write : tristate register
31
 
32
base+0 read  : data input (external pins readback)
33
 
34
 
35
tristate buffer should be instantiated in toplevel,
36
if no tristate signals are used the GPIO can be used
37
as two 32 bit output and one 32 bit input port
38
 
39
example use in C:
40
 
41
int *gpio = (int *) 0x80000400; // Set base address!
42
int temp;
43
 
44
  gpio[0] = 0x12345678; // Write to DATA
45
  gpio[1] = 0xFFFFFFFF; // Write to Direction
46
  temp = gpio[0];       // Read input data
47
 
48
 
49
 
50
APBSUI
51
======
52
Simple User Interface
53
 
54
combines in one peripheral
55
* Switches, use for DIP switches)
56
* Buttons, use for Push Buttons
57
* LED's, use for single LED's
58
* 7 Segment LED', connect to Segment LED's
59
* Buzzer, connect to Piezo or Speaker
60
* Character LCD, connect to typical Character mode LCD
61
 
62
 
63
address map (REV 0)
64
base+0 write : single LED's
65
base+1 write : 7 Segment LED's (4 digits, non multiplexed)
66
base+2 write : LCD
67
base+3 write : d0 - buzzer
68
 
69
 
70
base+4 read  : Switches
71
base+5 read  : Buttons
72
 
73
 
74
example use in vhdl top:
75
------------------------------------------------------------
76
  sui0 : apbsui
77
  generic map (
78
        pindex => 4,
79
        paddr => 4,
80
        pirq => 5,
81
        ledact => 0,
82
        led7act => 0
83
        )
84
  port map (
85
        rstn,
86
        clkm,
87
        apbi,
88
        apbo(4),
89
        suii,
90
        suio
91
  );
92
 
93
  suii.switch_in(7 downto 0) <= switch(7 downto 0);
94
  suii.button_in(0) <= push1;
95
 
96
  led(3 downto 0) <= suio.led_out(3 downto 0);
97
 
98
  led1_a  <= suio.led_a_out(0);
99
  led1_b  <= suio.led_b_out(0);
100
  led1_c  <= suio.led_c_out(0);
101
  led1_d  <= suio.led_d_out(0);
102
  led1_e  <= suio.led_e_out(0);
103
  led1_f  <= suio.led_f_out(0);
104
  led1_g  <= suio.led_g_out(0);
105
  led1_dp <= suio.led_dp_out(0);
106
 
107
  led2_a  <= suio.led_a_out(1);
108
  led2_b  <= suio.led_b_out(1);
109
  led2_c  <= suio.led_c_out(1);
110
  led2_d  <= suio.led_d_out(1);
111
  led2_e  <= suio.led_e_out(1);
112
  led2_f  <= suio.led_f_out(1);
113
  led2_g  <= suio.led_g_out(1);
114
  led2_dp <= suio.led_dp_out(1);
115
 
116
  lcd_data <= suio.lcd_out;
117
  lcd_en   <= suio.lcd_en(0);
118
  lcd_rs   <= suio.lcd_rs;
119
  piezo    <= suio.buzzer;
120
 
121
------------------------------------------------------------
122
 

powered by: WebSVN 2.1.0

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