High-pass filter model
This article contains Verilog-A model for a high-pass filter.
Usage:
- Create a new cell in Library Manager named HPF and select cell type Verilog A;
- Copy and paste the code provided;
- Specify Cutoff_frequency variable to be -3dB frequency;
- Perform Check and Save;
- A cell symbol will be created;
- Instantiate HPF cell into your design;
- Perform Check and Save and run the simulation.
HPF model testbench
HPF model simulation result
Cell name: HPF
Model type: Verilog-A
1 2// Low Pass filter model based on -3dB frequency definition 3// Author: A. Sidun 4// Source: AnalogHub.ie 5 6`include "constants.vams" 7`include "disciplines.vams" 8 9module HPF(in, out); 10electrical in, out; 11parameter real Cutoff_frequency = 10k; // -3dB frequency 12parameter real Filter_Order = 1; // 1 for 20dB/dec, 2 for 40dB/dec 13 14analog begin 15 V(out) <+ laplace_nd(V(in),{0, 1},{2*`M_PI*Cutoff_frequency, 1}); 16 end 17endcase 18end 19endmodule