Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function finde( phi : std_logic_vector( 7 downto 0 ) ) return std_logic_vector is
- variable e: std_logic_vector( 7 downto 0 ):= ( 1=>'1' , others => '0' );
- variable gcdivisor: std_logic_vector( 7 downto 0 ):= ( others => '0' );
- variable one: std_logic_vector( 7 downto 0 ):= ( 0=>'1', others => '0' );
- begin
- for i in 0 to 9 loop
- e := e + "01";
- gcdivisor := gcd( e, phi );
- if (gcdivisor = one ) then
- exit;
- end if;
- end loop;
- return e;
- end finde;
Add Comment
Please, Sign In to add comment