test_caller_bcd: refactor addg6s test
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Thu, 19 Aug 2021 15:40:32 +0000 (15:40 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Thu, 19 Aug 2021 17:34:08 +0000 (17:34 +0000)
commitf2ed9ea6869bbfb72c3d590f02b3792e81bbfc08
tree5f26fe527bba7c2aa5b113075f92282131bb2334
parent30fc19d8bfad7b2e000ca4aaae5498ecedf84644
test_caller_bcd: refactor addg6s test

This patch should vastly simplify and speed up the addg6s test. Most
importantly, we drop half adders and full adders, making use of the
fact that Python uses big integers directly. Also, we don't bother
generating all posible products of BCD numbers; instead, we simply
resort to random number generator. Note, however, that we only check
the numbers that are correct from BCD point of view.
src/openpower/decoder/isa/test_caller_bcd.py