]> jspc29.x-matter.uni-frankfurt.de Git - trb3.git/commitdiff
bypass logic
authorTobias Weber <toweber86@gmail.com>
Sun, 3 Jun 2018 08:50:12 +0000 (10:50 +0200)
committerTobias Weber <toweber86@gmail.com>
Sun, 3 Jun 2018 08:50:12 +0000 (10:50 +0200)
mupix/Mupix8/sources/Gray2Binary.vhd

index fb94162a959a3d129b011422af485664753af31e..a16f3de2c7524ba86094542fdbbe9aab5127a156 100644 (file)
@@ -13,6 +13,7 @@ entity gray_to_binary is
   port (
     clk     : in  std_logic;            -- clk input
     reset   : in  std_logic;            -- reset input
+    bypass  : in  std_logic;            -- bypass logic
     gray_in : in  std_logic_vector (NBITS - 1 downto 0);  -- gray counter input
     bin_out : out std_logic_vector (NBITS - 1 downto 0)  -- binary counter output
     );
@@ -33,7 +34,11 @@ begin
         for i in NBITS - 2 downto 0 loop
           decoding(i) := gray_in(i) xor decoding(i + 1);
         end loop;
-        bin_out <= decoding;
+        if bypass = '1' then
+            bin_out <= gray_in;
+        else
+            bin_out <= decoding;
+        end if;
       end if;
     end if;
   end process;