Exactly, that's where the problem lies, setting the gain... i have been experiencing logical error when the program is loaded into the device, because all the output goes high. Pls Daixiwen, can u go through my design description and corresponding code and direct me as to what to do.
Also i adjusted the instant of my comparator that is GENERIC MAP (WIDTH => 8192) but the output still went HIGH.
ATTACHED ARE SOME DOC
--- Quote Start ---
And I forgot to answer the other part of your problem.... if you need a fixed reference, then you should remove B from the ports list and make it a generic instead. That way you can even change the threshold each time you instantiate your comparator.
--- Quote End ---