A common cause of skin cancer is when two adjacent thymine (T) base pairs are fused together by an incoming ultraviolet ray. This causes the strand to be mis-read, which under the right circumstances causes the cell to go haywire.

Write a VHDL module which streams the genome through, and asserts (makes high) the foundtt signal every time the module emits a T which is part of a pair of Ts. It should be able to handle more than two in sequence, such as TTT or TTTT.

Adenine A00
Thymine T01
Guanine G10
Cytosine C11


library IEEE; use IEEE.std_logic_1164.all; entity gene_findtt is port( clk : in std_logic; nuc_in : in std_logic_vector(1 downto 0); -- Input nucleotide nuc_out : out std_logic_vector(1 downto 0); -- Input nucleotide foundtt : out std_logic -- Whether the output nucleotide is part of a pair of thymines ); end; architecture synth of gene_findtt is begin end;

Are you confident about this change? (select one to recompile)

Compiler/test output: