gpio: Add HAS_GPIO to avoid verilator build errors
authorAnton Blanchard <anton@linux.ibm.com>
Fri, 13 Aug 2021 04:44:04 +0000 (14:44 +1000)
committerAnton Blanchard <anton@ozlabs.org>
Fri, 13 Aug 2021 04:51:15 +0000 (14:51 +1000)
commit591e96d1a294b84714664f4cbdb3d8aa8e2181d2
tree8d3d372c7a9314d46d7623c5429eacac650bd096
parent2bd00f5119aad9fc02c90790b179312a4281ea62
gpio: Add HAS_GPIO to avoid verilator build errors

The verilator build fails with warnings and errors, because NGPIO
is 0 and we do things like:

        gpio_out : out std_ulogic_vector(NGPIO - 1 downto 0);

Set NGPIO to something reasonable (eg 32) and add HAS_GPIO to avoid
building the macro entirely if it isn't in use.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
fpga/top-arty.vhdl
soc.vhdl