CPLD using VHDL

Status
Not open for further replies.
Very funny!
I live in Bangalore and Anusha and Anagha live in Mumbai!
How on earth could we be classmates????????????
 
Haha! Thats alright. Well Anagha and Anusha were using Hindi. I was replying because I know the language
Sorry if I sounded rude
 
Sorryyyyyyyyyy for not being here these days.... Really had a hard time in college. M here wid an idea plz help me out.
 
I have to make a CPLD based VHDL project. So My idea is to make AUTOMATED CAR PARKING PROTOTYPE. I hav written the code as per the required algorithm. CAn ny1 chk it for me? i dont hav VHDL software on my PC or else i wud have chked it on my own. please help.
 
Entity ABCD is
Port (
CurrentStatus : IN BIT_VECTOR(0 to 3);
S1,GND,FIRST : IN BIT;
LEDOUT : OUT BIT_VECTOR(0to3)
);
End ABCD;
Architecture A of ABCD is
Begin
Process (S1)
Variable : SavedStatus_GND : BIT_vector(0to3);
Variable : SavedStatus_FIRST : BIT_vector(0to3);
Begin
If (GND’event and GND=’1’ ) then
LEDOUT<= SavedStatus_GND;
If (S1’event and S1=’0’ ) then
SavedStatus_GND := CurrentStatus;
End if;
End if;
Wait for 10 ns;
LEDOUT<=”0000”;
If (FIRST’event and FIRST=’1’ ) then
LEDOUT<= SavedStatus_FIRST;
If (S1’event and S1=’0’ ) then
SavedStatus_FIRSt := CurrentStatus;
End if;
End if;
Wait for 10 ns;
LEDOUT<=”0000”;
End process ;
End A ;
 
hey lemme explain how it shud work...

-new user wil make s1 on
- he will decide gnd floor or first floor wid the help of switch GND nd FIRST
- led status will correspond to saved positions
- on led corresponds to occupied place n off says place is empty
-user will take the car to empty place n will make corresponding status i/p HIGH
-also he will turn s1 off before leaving his car
-when d nxt user arrives he will follow d same procedure.

U think dis will work?
 
Last edited:
Everything seems ok, but then why is the output a 3 bit vector? Any particular reason? Cant it be a 1 bit output?
Why do you have to use variables when there are only if statements? The assignment doesn't create an error due to time-delay, you can as well assign LEDOUT<=current_status
Oh and use an if-else statement to chose between the two floors.

EDIT: See the VHDL Project thread.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…