J
JSreeniv
Guest
Hi all,
I wrote a package for converting binary to Manchester format with
"wait" delays and the procedure looks like this
procedure HDR2MANCHESTER(Hdr_Word : in std_logic_vector(4 downto
0);
Hdr_Manch : out
std_logic_vector(9 downto 0));
variable hdr_i : integer;
variable manch_i : integer;
begin
hdr_i:= 5;
manch_i:= 10;
while(hdr_i<=0) loop
while(manch_i<=0) loop
--for hdr_i in 4 downto 0 loop
-- for manch_i in 9 downto 0 loop
if(Hdr_Word(hdr_i) = '0') then
wait for 50 ns;
Hdr_Manch(manch_i):= '0';
wait for 50 ns;
Hdr_Manch(manch_i-1):= '1';
else
wait for 50 ns;
Hdr_Manch(manch_i):= '1';
wait for 50 ns;
Hdr_Manch(manch_i-1):= '0';
hdr_i := hdr_i-1;
manch_i:= manch_i-1;
end if;
end loop;
end loop;
end HDR2MANCHESTER;
My query is if i want give input to Hdr_Word: 00001 (binary) and the
converting that function and assign to a signal which takes final
output.
so how to do:
what to put or how to pass real values
r_out <=HDR2MANCHESTER(??????)....
Please suggest me ....
Thanks
Sreeniv
I wrote a package for converting binary to Manchester format with
"wait" delays and the procedure looks like this
procedure HDR2MANCHESTER(Hdr_Word : in std_logic_vector(4 downto
0);
Hdr_Manch : out
std_logic_vector(9 downto 0));
variable hdr_i : integer;
variable manch_i : integer;
begin
hdr_i:= 5;
manch_i:= 10;
while(hdr_i<=0) loop
while(manch_i<=0) loop
--for hdr_i in 4 downto 0 loop
-- for manch_i in 9 downto 0 loop
if(Hdr_Word(hdr_i) = '0') then
wait for 50 ns;
Hdr_Manch(manch_i):= '0';
wait for 50 ns;
Hdr_Manch(manch_i-1):= '1';
else
wait for 50 ns;
Hdr_Manch(manch_i):= '1';
wait for 50 ns;
Hdr_Manch(manch_i-1):= '0';
hdr_i := hdr_i-1;
manch_i:= manch_i-1;
end if;
end loop;
end loop;
end HDR2MANCHESTER;
My query is if i want give input to Hdr_Word: 00001 (binary) and the
converting that function and assign to a signal which takes final
output.
so how to do:
what to put or how to pass real values
r_out <=HDR2MANCHESTER(??????)....
Please suggest me ....
Thanks
Sreeniv