[myhdl-list] [PATCH 0 of 2 RFC] Add support for negative indexes
Brought to you by:
jandecaluwe
From: Angel E. <ang...@gm...> - 2012-10-13 00:12:12
|
Python lists have a natural way to access list itemps from the end of the list, which is to use negative indexes. These patches add this functionality to MyHDL. The first patch adds negative index and slice limit support to the intbv class. I think this first patch is probably right and not very controversial (although I might be totally wrong, since this is my first attempt at making a serious modification to MyHDL). The second patch is _very_ rough and probably breaks lots of things. It adds support for negative indexes (not slices) to the VHDL convertor. I'd really appreaciate any help with improving this patch in particular. Comments are welcome! |