In recent years, Computing In-Memory (CIM) technology has been proposed to solve the bottleneck of data movement in AI edge designs. In-RRAM Computing (IRC) is a popular architecture due to its low leakage current and high density. However, to integrate some simple computation in memory, the IRC designs often adopt analog operations, which bring new issues to the computation accuracy. In order to speed up the verification of computation results, an accurate behavioral model for the RRAM crossbar array and the peripheral circuits with non-ideal effects is proposed. By using the proposed behavioral model, we build a hierarchical simulation framework for the IRC system to provide runtime errors for circuit design optimization and CNN training. As shown in the experimental results, the simulation accuracy of the IRC system is greatly improved by considering the contribution from peripheral circuits, but the simulation time can be reduced from several hours to 1 minute. The error-aware CNN training with the proposed models efficiently improves the CNN inference accuracy in real applications, which solves the accuracy and efficiency issues in traditional approaches.