Kumar,
Sorry to see your rush into "some how solve problem of today" (and
think about next one when it comes). It is almost 3 days since your original
post and it certainly doesn't take 3 days for one to write a counter in
VHDL. Nevertheless here is some pseudo-code, now DOIT yourself. You've asked
for UPDOWN counter:
if (up) cnt += 1;
if (down) cnt -= 1;
Disclaimer: No guarantee that this is a VHDL code (it is NOT)
No guarantee that such operators (+=, -=) exist in VHDL.
Logic is incomplete as well.
If you display similar attitude in industry - saying "some how let me get
this chip/block done by an online forum", and I will learn how to do it next
time around - be assured: you will be fired from the job. I hope you are
studying to get a job at the end of the day!
Good luck
Srini
--
Srinivasan Venkataramanan
Co-Author: SystemVerilog Assertions Handbook,
http://www.abv-sva.org
Co-Author: Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition.
http://www.noveldv.com
I own my words and not my employer, unless specifically mentioned