Chalcogenide thin films for direct resistors fabrication and trimming