Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

VHDL: operations on bit vectors

Status
Not open for further replies.

bitprolix

Junior Member level 2
Joined
Sep 19, 2013
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
235
Hi All,

I'm working on modelling of elevator control and I'm trying to come up with two separate process for tackling the different requirements for this particular elevator control. The main idea that I have is that One process will continuously snoop for the requested floor by ORing the buttons pressed from inside(B_IN) or from outside of the cart (B_OUT), and another process will take action on such requests. So far so good but considering B_IN and B_OUT, both are bit vectors (say both B_IN and B_OUT 8 bit wide, and after ORing to form a final requested floors, i get something as "0100 1000" representing that the requested floors are floor 2 and 5 ), how should i write a loop in my "take-action" process so that it checks the bits which are set from the request vector(01001000 in this case) and take further action, such as opening the door on only such floors, one at at time. i..e only one bit from the door vector should be set at a time.

psuedo code:
Code:
while (some bits are set in request)
{
    extract the bits from the right in the request vector;
    door(ith bit) = '1'; -- open the door on that particular floor
}
 

Hmm - the way you talk it sounds like you expect all these processes to act sequentially, like a C program. It wont.
Have you got a sketch of circuit from before you write any code?
 

Hmm - the way you talk it sounds like you expect all these processes to act sequentially, like a C program. It wont.
Have you got a sketch of circuit from before you write any code?

I'm still trying to get rid of my "C" way of approaching the Modelling tasks, as In past I've mostly used "C". I have spent a considerable time in thinking how to solve such kinds of modelling problems and have not been much successful so far. It'll help me a lot if you suggest me some books or tutorials which starts from building flow charts or some kind of graphical representation of the solution(maybe state machines) and then devise a synthesize-able model for it using VHDL.
 

Thank you for the suggestion, It's a mammoth book though :roll:
 

There are, but it will start with the basics first, moving on to more complicated logic design.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top