From 14c5cf3b8309f27d12199e296173b2169b19d1df Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Sat, 11 Jan 2020 14:34:25 +1100 Subject: [PATCH] Fix some ghdlsynth issues with fpga_bram Use to_integer() instead of conv_integer(). Signed-off-by: Anton Blanchard --- fpga/main_bram.vhdl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fpga/main_bram.vhdl b/fpga/main_bram.vhdl index 810d60c..fcc3701 100644 --- a/fpga/main_bram.vhdl +++ b/fpga/main_bram.vhdl @@ -2,7 +2,6 @@ library ieee; use ieee.std_logic_1164.all; -use ieee.std_logic_unsigned.all; use ieee.numeric_std.all; use std.textio.all; @@ -68,13 +67,13 @@ begin if we = '1' then for i in 0 to 7 loop if sel(i) = '1' then - memory(conv_integer(addr))((i + 1) * 8 - 1 downto i * 8) <= + memory(to_integer(unsigned(addr)))((i + 1) * 8 - 1 downto i * 8) <= di((i + 1) * 8 - 1 downto i * 8); end if; end loop; end if; if re = '1' then - obuf <= memory(conv_integer(addr)); + obuf <= memory(to_integer(unsigned(addr))); end if; do <= obuf; end if; -- 2.30.2