GIS-6905 fixed assignment warnings for single bit bit-slices. E.g. (0 downto 0) becomes(0)

This commit is contained in:
Simon Southwell 2018-03-08 14:42:46 +00:00
commit f3dcccfbf9
2 changed files with 5 additions and 2 deletions

View file

@ -385,7 +385,10 @@ class MemMapperHdl(MemMapperBase) :
resetStr = MemMapperBase.valToStdLogic(resetVal, width)
opStr += resetStr
elif modifierStr == 'avs':
opStr += 'avs_writedata(' + str(upBit) + ' downto ' + str(loBit) + ')'
if upBit == loBit :
opStr += 'avs_writedata(' + str(upBit) + ')'
else :
opStr += 'avs_writedata(' + str(upBit) + ' downto ' + str(loBit) + ')'
elif modifierStr == 'w0default' :
if (upBit - loBit) == 0 :
opStr += '\'0\''

View file

@ -91,7 +91,7 @@ class MemMapperPkg(MemMapperBase) :
wfp.write('-- altera vhdl_input_version vhdl_2008\n')
wfp.write('library ieee;\n')
wfp.write('use ieee.std_logic_1164.all;\n')
wfp.write('use ieee.std_logic_arith.all;\n\n')
wfp.write('use ieee.numeric_std.all;\n\n')
wfp.write('package ' + ip + '_pkg is\n\n')
# Iterate through each bus dictionary