Need help quick, simple VHDL question.

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
When defining an integer data type, for example,

counter: in integer range 0 to 255;

how would I access bit 2, or bit 3 of counter?

 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
I can't remember exactly so I may be talking out my rear.

I think I used a ROT and INC/bit flip function to get to the 2nd bit...I still don't have my notes handy (just moved in and they are just in an unorganized pile).

You should be able to 'grab' the left most two bits also and ROT and INC/bit flip them. I am exhausted so maybe this at least gets you on the right path.