quite a big intrusive change in auto-assignment
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 15:03:07 +0000 (16:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 30 Aug 2021 15:03:07 +0000 (16:03 +0100)
commit69c1f44388226d1fde2e6aa70ce2fd5bc660bd87
tree7190c9450920475e184994113e0ba97ade57b734
parent883914e3ce63dcebdec1488e57ae7b5085e90035
quite a big intrusive change in auto-assignment
variables that do not exist get auto-created based on the bit-width
at which they are first encountered

    prod[0:31]

creates a variable with

    prod = concat(0, repeat=32)

however this needs to be more complicated rather than just assume
it is a pair of constants

expressions can now be

     prod[0:XLEN-1]

which gets an ast.BinOp expression created on the RHS.

therefore allow the assignment "var = concat(...., repeat=xxxx)"
to accept computed expressions by returning an ast.BinOp(UPPER, "-", LOWER)
so that the resultant python code performs the subtract calculation
src/openpower/decoder/power_pseudo.py
src/openpower/decoder/pseudo/parser.py