Altera_Forum
Honored Contributor
16 years agoBlackjack using VHDL code
My partner and I have an assignment to replicate a blackjack game using VHDL coding techniques on Quartus Max+II. We were to do this by using a Finite State Machine.
We are having trouble understanding how the 'process' and 'case' operations work. For example, do "When" statements (for our example, to switch the states of the FSM) in a 'case' operation, loop back upon themselves if you change states not in sequential order??? Or does the case statement just run through sequentially without redoing any WHEN statements when the "state" is changed. ANY help is appreciated, even if it is just to explain how the 'case' and 'process' operations work, especially with the rising edge of the clock signal. THANK YOU VERY MUCH!! our code is attached via word 2009.... The main problem we are having is that we cannot get certain scenarios to work correctly such as we cannot get the program to "bust" by having a bust output of 1 for any combination of numbers. Some problems might include the general misunderstanding of how to write VHDL code AND also, we try to set certain states throughout the program as if the program will loop up to the correct WHEN statement when the corresponding state is called.