aboutsummaryrefslogtreecommitdiff
path: root/basys3/basys3.srcs/apu_tb_note_to_frequency.vhd
diff options
context:
space:
mode:
authorUnavailableDev <69792062+UnavailableDev@users.noreply.github.com>2023-02-19 12:30:12 +0100
committerGitHub <noreply@github.com>2023-02-19 12:30:12 +0100
commit1420c05147eda3290de666fbb3642022b2596600 (patch)
tree4c465a32c61b34c146d78df229fd4d1b30fc2072 /basys3/basys3.srcs/apu_tb_note_to_frequency.vhd
parent08efcdf63f78bbf78587b4d6e93d492abd4988f4 (diff)
parentf866622276090889e16e117add53384a98c4a9a7 (diff)
Merge pull request #14 from UnavailableDev/dev
apu note 2 freq
Diffstat (limited to 'basys3/basys3.srcs/apu_tb_note_to_frequency.vhd')
-rw-r--r--basys3/basys3.srcs/apu_tb_note_to_frequency.vhd40
1 files changed, 40 insertions, 0 deletions
diff --git a/basys3/basys3.srcs/apu_tb_note_to_frequency.vhd b/basys3/basys3.srcs/apu_tb_note_to_frequency.vhd
new file mode 100644
index 0000000..385071e
--- /dev/null
+++ b/basys3/basys3.srcs/apu_tb_note_to_frequency.vhd
@@ -0,0 +1,40 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+library UNISIM;
+use UNISIM.VComponents.all;
+
+entity apu_tb_note_to_frequency is
+end entity;
+
+architecture Behavioral of apu_tb_note_to_frequency is
+
+ component apu_note_to_frequency is
+ port (
+ data : in std_logic_vector(7 downto 0);
+ freq : out std_logic_vector(11 downto 0) --frequency
+ );
+ end component;
+
+ signal data : std_logic_vector(7 downto 0) := (others => '0');
+ signal freq : std_logic_vector(11 downto 0) := (others => '0');
+
+ signal OK : boolean := false;
+
+begin
+ UUT: apu_note_to_frequency
+ port map (
+ data => data,
+ freq => freq
+ );
+
+ TB: process
+ begin
+ for I in 0 to 255 loop
+ data <= std_logic_vector(to_unsigned(I, 8));
+ wait for 4 ps;
+ end loop;
+ end process;
+
+end architecture; \ No newline at end of file