A ribosome starts building a protein when it encounters the sequence 'ATG', known as a "start codon". It
knows the protein is complete once it encounters one of three "stop codons": TAA, TAG, or TGA. Everything
in between is part of the protein code. (It’s more complicated, of course, but this is the basic gist).
Write a VHDL module which streams the genome through, and asserts the `is_protein` signal every time the module emits a nucleotide which is part of a protein, including the start and end codons.
It should be able to handle all three of the stop codons, and deal with multiple protein sequences back-to-back.
entity gene_protein is
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
is_protein : out std_logic -- Whether the output nucleotide is a cytosine
architecture synth of gene_protein is