Yes it is a big inverter, but it also has the charging circuits inside too.
In the early Roadsters (2008 1.5s) the PEM used an AC propulsion licensed "
reductive charging" circuit that apparently used motor windings as part of the charging circuit. In the later cars (2.x 2010/2011/2012) they redesigned the PEM with what I recall were the following changes:
#1: Smaller
#2: Cheaper to produce
#3: Easier to service
#4: Redesigned charging that didn't use the ACP reductive charging license anymore.
#5: New Sport variant available.
There are also various discussions about merits and pitfalls of how the air cooling works in the different PEMs.
I think some of the very early (prototype) Roadsters had analog circuits in the PEMs that were later replaced by digital circuits, but the original analog design never saw production.