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

Subversion Repositories minsoc

[/] [minsoc/] [trunk/] [utils/] [contributions/] [gpio/] [todo.txt] - Blame information for rev 88

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

Line No. Rev Author Line
1 46 rfajardo
I still have some important hints to you regarding this.
2
 
3
minsoc_top.v: on line 817 you should also include:
4
assign wb_gpio_err_o = 1'b0; (otherwise simulation might drive crazy and prob real life if it doesn't "automatically" be set to 0.
5
 
6
You probably missed it since these are gathered together around line 358 for uart, spi and start_up. And I forgot myself to add it for Ethernet.
7
 
8
On gpio_defines.v, the GPIO_IOS definition I'd set directly to 32. Instantiation would be instead of GPIO_IOS + 1, GPIO_IOS only. Is there any problem regarding this? The definitions generally are more human friendly than coding, so the register definitions of reg [GPIOS_IOS-1:0] which considers 0 to be something is let for the implementation. That's more or less standard I'd say. It is the same as when you define the address width on minsoc_defines.v you define it and I implement it considering the necessary -1s.
9
 
10
GPIO_LINES32 instead of GPIO_LINES31.
11
 
12
I'd substitute the whole minsoc_spartan_3a_starter_kit_ios.v. Instead of it, place a bidirectional port on minsoc_top if GPIO is enabled.
13
`ifdef GPIO
14
, gpio_io
15
`endif
16
 
17
//
18
// GPIO
19
//
20
inout [GPIO_IOS-1:0] gpio_io;
21
 
22
//
23
// GPIO tri-state
24
//
25
// I hope this works without generate, otherwise it is also easy but I'd first try this way
26
integer iterate;
27
for (iterate = 0; iterate < GPIO_IOS; iterate = iterate + 1)
28
    assign gpio_io[iterate] = ext_pad_oe_o[iterate] ? ext_pad_o[iterate] : 1'bZ;
29
 
30
assign ext_pad_i = gpio_io;
31
 
32
And then only define the pins for the inout port on the ucf file. Like this:
33
NET "gpio_io(31)" LOC = "a1(pin number)" | DRIVE = 12 | SLEW = SLOW;
34
NET "gpio_io(30)" LOC = "a1(pin number)" | DRIVE = 12 | SLEW = SLOW;
35
...
36
NET "gpio_io(0)" LOC = "a1(pin number)" | DRIVE = 12 | SLEW = SLOW;
37
 
38
After that you only need the definition GPIO on minsoc_defines.v. Of course, interrupt and address you also still need.

powered by: WebSVN 2.1.0

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