Question: Write a VHDL code that meets the following requirements: design a music box, which satisfies the minimum requirements below. 1 . Users are able to

Write a VHDL code that meets the following requirements: design a music box, which satisfies the minimum requirements below.
1. Users are able to select and switch between any one of the three
modes (Mode A, Mode B and Mode C) to play music.
2. Stop button/switch works for all three modes.
3. LEDs work for all three modes.
4.7-Segment Display works for all three modes.
5. Only one mode can be active at any time.
6. Your system should handle when users dont follow rules. (Error
Handling: Your system should never break down.)
Mode A (Default Mode):
1. Music is played by switches.
2. Putty on your PC should show the tones being played timely.
(You need to tune the frequency for sending each
(numbered) note character back to Putty so that the melody
is readable from Putty.)
Mode B:
1. Music is played from Bram.
2. Putty on your PC should show the tones being played timely.
Mode C:
1. Music is played by users entering numbered music notation on
Putty.
2. Each numbered music notation transmitted from Putty should
play 0.5 seconds.
3. Each numbered music notation entered should be echoed
back to Putty. (Lab 2)
4. The system should handle when users enter invalid
characters. components entities: entity receiver is
port (
clk : in std_logic; -- clock input
reset : in std_logic; -- reset, active high
sdata : in std_logic; -- serial data in
pdata : out std_logic_vector(7 downto 0); -- parallel data out
ready : out std_logic -- ready strobe, active high
);
end receiver; entity transmitter is
port ( clk : in std_logic; -- clock input
reset : in std_logic; -- reset, active high
pdata : in std_logic_vector(7 downto 0); -- parallel data in
load : in std_logic; -- load signal, active high
busy : out std_logic; -- busy indicator
sdata : out std_logic); -- serial data out
end transmitter; entity SwitchPiano is
Port (
clk : in std_logic; -- clock input
reset : in std_logic; -- reset, active high
switch : in std_logic_vector(7 downto 0); --8 switches
stop : in std_logic;
LED : out std_logic_vector(7 downto 0);
freq : out std_logic; -- Audio output
gain : out std_logic; -- Gain control
shutdown : out std_logic -- Shutdown control
);
end SwitchPiano; entity AutoPiano is
Port (
Clk : in STD_LOGIC;
switch : in STD_LOGIC_VECTOR (7 downto 0);
stop : in STD_LOGIC;
freq : out STD_LOGIC;
LED : out STD_LOGIC_VECTOR (7 downto 0);
gain : out STD_LOGIC;
shutdown : out STD_LOGIC;
an: out STD_LOGIC_VECTOR(3 downto 0);
cat: out STD_LOGIC_VECTOR(6 downto 0);
note_in : in STD_LOGIC_VECTOR(3 downto 0)-- Input note from memory
);
end AutoPiano;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!