setup the decode and emulate framewrok