Create micro-architecture and write an RTL code for a design that calculates the square of a given number.