1. A method for simulating behavior of a magnetic random access memory (STT-MRAM) device, the method comprising: configuring a library of functional blocks, wherein each functional block in the library of functional blocks is configured to generate a set of output parameters in response to receiving a set of input parameters, wherein each functional block in the library of functional blocks is configured to capture physical phenomenon associated with at least one element of the STT-MRAM device, wherein the STT-MRAM device has a configurable physical structure configured in the form of a stack; mapping selected elements of the STT-MRAM device into a corresponding set of selected functional blocks, wherein the selected elements include the stack, wherein the mapping maps the stack to a spin device circuit represented by the selected functional blocks; assembling the selected functional blocks in a configurable manner to form the spin device circuit, wherein the configurable manner replicates the physical structure of the STT-MRAM device, wherein the spin device circuit for the stack includes an electron spin transport functional block, a magnet-dynamics functional block, a magnetic coupling functional block and an coupled inter-layer Transport+Magnet-Dynamics (TMD) functional block; and generating the set of output parameters representing the behavior of the MRAM device in response to receiving the set of input parameters.