In this paper, we present a hardware-software cosimulation environment for heterogeneous systems. To be an efficient and convenient verification environment for the rapid prototyping of heterogeneous systems consisting of hardware and software components, the environment supports (i) modular cosimulation, (ii) cosimulation acceleration, and (iii) integrated user interface and internal representation. For modular cosimulation, we treat software and hardware components as separate processes that communicate with each other only through inter-process communication. We generate interface model automatically and insert between software and hardware components. We can accelerate cosimulation through hardware-emulation using FPGAs which also supports our incremental system prototyping strategy. Finally, to provide an integrated user interface and internal representation consistent with Various prototyping tasks, we modified and extended Ptolemy, a cosimulation and cosynthesis environment for heterogeneous systems. The benefits of our cosimulation environment are as follows: expandability of the environment, target architecture and protocol independence, interface transparency, seamless transition to cosynthesis, cosimulation speedup, and convenient cosimulation. As experimental examples, we cosimulated and prototyped several heterogeneous systems successfully, which shows that our environment can be a useful heterogeneous systems specification/verification environment for fast protoyping.