Dice Game in VHDL
Dice Game in VHDL
Dice Game in VHDL
----------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 04/27/2024 01:17:35 PM
-- Design Name:
-- Module Name: DICE_GAME_TOP - Behavioral
-- Project Name:
-- Target Devices:
-- Tool Versions:
-- Description:
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity DICE_GAME_TOP is
Port (
clk, reset: in std_logic;
Rb : in std_logic;
win : out std_logic;
loss : out std_logic
);
end DICE_GAME_TOP;
architecture Behavioral of DICE_GAME_TOP is
-- two counter and adder module
component Counter_Adder
port ( clk: in std_logic;
reset: in std_logic;
Roll: in std_logic;
sum: out integer range 2 to 12);
end component;
-- Pointer Register Module Components
component PointerRegister
port (
Sum : in integer range 2 to 12;
Sp : in std_logic;
LockedSum :out integer range 2 to 12
);
end component;
-- Comparator and test Module Component
component Comparator
port (
Sum,LockedSum:in integer range 2 to 12;
Eq,D7,D711,D2312:out std_logic
);
end component;