Hierarchical Device Simulation