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