BJ Plans (Updated 2/19/Thu)
---------------------------

1.  Gameover criteria (if any of the following occur)

    num hands played = 128
	any player chips >= 1024
	all players have 0 chips

2.  These are player development suggestions from class

    Betting criteria (things player knows)
	  your chips
	  opponents' chips (needs discussion! (aka jwhite))
      number of hands left
      cards played (stats)

    Hit/Stand criteria
	  your cards
	  dealer cards
	  chips at stake

3.  scoreKeeper does not sort list, outputs in table

4.  initialBank = 128, maxBank = 1023, skMaxBank = 4095

5.  Players can bet zero (to allow not playing or no chips)

6.  Card stats start at zero and count up

7. Player:

  INPUT:
	clock(1)
	reset(1)
    turn(1) -- enable for player
	issued(1) -- realizes card has been issued
    card(4) -- card dealt to player on bus
    dealerShow(4) -- card shown by dealer on current hand
    stats(13*5) -- 13 different cards, 5 bits for histogram
    numHands(7) -- tells remaining hands left (maxHands = 128)
    balance(10) -- maxBank = 1023 chips

  OUTPUT:
    hit(1) -- request another card
    stand(1) -- signals stand (player done) and ends placing bet
    bet(10) -- chips bet for a hand, must be lte than balance


8. CardGenerator:

  INPUT:
	clock(1)
    issue(1) -- controller commands that a card be issued (controller 0-->1--0)
    reset(1) -- refreshes dealerShow, checks if new decks need generation
	bistMode(1) -- enables 200.txt deck

    (internally reshuffles when two decks of cards have been dealt)

  OUTPUT:
    dealerShow(4) -- card dealer is showing
    card(4) -- card player/scoreKeeper can read
	issued(1) -- card has been issued 


9. ScoreKeeper:

  INPUT:
	issued(1) -- realizes card has been issued on falling edge
    card(4) -- card coming from cardGenerator
    playerID(32) -- each bit signifies a different player (enable)
    Reset(1) -- clears tables, new match
	clock(1)

   OUTPUT:
	  action(2)

      (internal running value for each player and then compares to house-player-value)


10. Banker:

   INPUT:
	clock(1)
	reset(1)
    playerID(32) -- each bit signifies a different player (enable)
	bet(10)
	action(2)

  OUTPUT:
    balance(10) -- total chips of enabled player (12 internally)
    numHands(7) -- count down to zero
	Gameover(1)

    (controller waits until all players finish a hand before GAMEOVER; 
	controller writes to playerID; others read)
    
11. CardCounter:

  INPUT:
    card(4)
    reset(1)
	clock(1)
	issued(1) -- card has been issued 

  OUTPUT:
    stats(13*5) -- assuming 4 decks counts up (checks that >= 16)


12. sfields1 and bnelson3: card-generator and card-counter

13. nmichou and nnambiar: score-keeper and banker

14. jpendlet gilbert jwhite25: controller and house-player  (email controller flow to all asap)

15. smart-playerN (start with house-player): bdalton5 ckhor fkuhlman ooyeyele turnmire yadav 

16. smart-plusN: volunteer and start with smart-playerN

17. Arbitrator: Controller group (with veto by DWB)

18. Rewrite old specs for each module and show to one another
    (I/O and some detail, not too much, on behavior).

19. Once ready, develop VHDL and TB for each module and simulate in stand-alone mode.

20. Assemble modules and test and grow the entire capabilities.

21. Begin with house-player module in position-31 and a duplicate in position-0.

22. Then add another duplicate of house-player module in position-1.

23. Simulate all at pre-synthesis first.

24. For each module, synthesis, place/route, post-layout simulation.

25. Repeat assembly of post-layout modules and grow to finished product (post-layout sim).

26. Download and test on prototype.

27. Play contests.