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: Need to keep track of a count inside two separate processes

Status
Not open for further replies.

jerryt

Junior Member level 3
Joined
Jan 26, 2009
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,608
I am working on a tic tac toe design for a class project.

I have one VHDL process running to keep track of anytime the player makes a move.
I have another VHDL process running to keep track of anytime the machine makes a move.

I need to be able to keep track of how many moves are made total. The maximum amount of moves in a tictactoe game is 9 moves. If 9 moves are made I need to enable an LED to tell the player and machine that the game ended in a DRAW (meaning nobody one that game).

Should I create a signal in my design and each time a move is made increment it by one? Then I could have a separate process specifically for figuring out if 9 moves were made or not and if so I would enable the LED.

Any suggestions? I really appreciate everyones help.
 

you will need 2 signals. Player_move and machine_move. you use either of these to increment the "moves" counter
 
  • Like
Reactions: jerryt

    jerryt

    Points: 2
    Helpful Answer Positive Rating
Thanks Tricky - Why couldn't I just use one signal for both of the processes?
 

signals can only be assigned in 1 process, otherwise you get a multiple source drive error.
You can read a signal in many processes however.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top