From f8d3dbc8c0f1c59a0546998cb9365e5c291dca07 Mon Sep 17 00:00:00 2001 From: fossee Date: Tue, 3 Sep 2019 11:07:32 +0530 Subject: added examples and modified server --- Example/bin_to_gray/bin_to_gray.vhdl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Example/bin_to_gray/bin_to_gray.vhdl (limited to 'Example/bin_to_gray') diff --git a/Example/bin_to_gray/bin_to_gray.vhdl b/Example/bin_to_gray/bin_to_gray.vhdl new file mode 100644 index 0000000..542f7ec --- /dev/null +++ b/Example/bin_to_gray/bin_to_gray.vhdl @@ -0,0 +1,21 @@ +LIBRARY ieee; +USE ieee.std_logic_1164.ALL; + +entity bin_to_gray is +port( + bin : in std_logic_vector(3 downto 0); -- binary input + G : out std_logic_vector(3 downto 0) -- gray code output + ); +end bin_to_gray; + + +architecture gate_level of bin_to_gray is + +begin + +G(3) <= bin(3); +G(2) <= bin(3) xor bin(2); +G(1) <= bin(2) xor bin(1); +G(0) <= bin(1) xor bin(0); + +end gate_level; \ No newline at end of file -- cgit From 76241122c16990ee003df89391c85ee478ea0dca Mon Sep 17 00:00:00 2001 From: rahul Date: Tue, 22 Oct 2019 11:27:47 +0530 Subject: Examples --- Example/bin_to_gray/bin_to_gray.vhdl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Example/bin_to_gray') diff --git a/Example/bin_to_gray/bin_to_gray.vhdl b/Example/bin_to_gray/bin_to_gray.vhdl index 542f7ec..d6045e8 100644 --- a/Example/bin_to_gray/bin_to_gray.vhdl +++ b/Example/bin_to_gray/bin_to_gray.vhdl @@ -3,8 +3,8 @@ USE ieee.std_logic_1164.ALL; entity bin_to_gray is port( - bin : in std_logic_vector(3 downto 0); -- binary input - G : out std_logic_vector(3 downto 0) -- gray code output + bin : in std_logic_vector(3 downto 0); + G : out std_logic_vector(3 downto 0) ); end bin_to_gray; -- cgit