From 5dfda5702c61a133ef1e6173e2a1d681bf1ac580 Mon Sep 17 00:00:00 2001
From: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
Date: Wed, 20 Jul 2011 12:54:10 +0200
Subject: [PATCH] wb_gpio_port: fixed error appearing when g_num_pins != a
 multiple of 32

---
 modules/wishbone/wb_gpio_port/wb_gpio_port.vhd | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/wishbone/wb_gpio_port/wb_gpio_port.vhd b/modules/wishbone/wb_gpio_port/wb_gpio_port.vhd
index 14ea0d56..f11778e2 100644
--- a/modules/wishbone/wb_gpio_port/wb_gpio_port.vhd
+++ b/modules/wishbone/wb_gpio_port/wb_gpio_port.vhd
@@ -222,9 +222,9 @@ begin
   end generate gen_with_tristates;
 
   gen_without_tristates : if (not g_with_builtin_tristates) generate
-    gpio_out_o <= out_reg;
-    gpio_in    <= gpio_in_i;
-    gpio_oen_o <= dir_reg;
+    gpio_out_o <= out_reg(g_num_pins-1 downto 0);
+    gpio_in(g_num_pins-1 downto 0)    <= gpio_in_i;
+    gpio_oen_o <= dir_reg(g_num_pins-1 downto 0);
   end generate gen_without_tristates;
 
   wb_ack_o <= ack_int;
-- 
GitLab