I want to design high pass filter whose gain should increase from minimum to maximum ( minimum upto 400 Hz maximum for 1 kHz) linearly or exponentially. It must be an active filter and my input signal is square wave. How do I design the circuit?
The steep response you want will require a multistage filter. The most commonly used active filter configuration is Sallen–Key topology, which provides two stages per amp using just 2 resistors and 2 capacitors. Various filter responses can be created by varying the component values. Here is an LTSpice simulation of a 4 stage Butterworth high-pass filter with 800Hz cutoff frequency.
This filter provides a frequency response close to your requirements, with an almost linear rise above 400Hz reaching a maximum at just over 1kHz. With more stages and a bit of tweaking you could probably improve linearity at the ends - but why bother?
Note that both the amplitude and frequency scales in this graph are linear, not logarithmic.
That curve looks nice and smooth, however the circuit's pulse response isn't so pretty. Here is the transient analysis for a 1Khz square wave.