THE modified code, circuit diagram and waveform is attached below.but the result is wrong
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity xorg is
port(f,g:in std_logic;
h
ut std_logic);
end xorg;
architecture axorg of xorg is
begin
h<=f xor g;
end axorg;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity df is
port(d,clk:in std_logic;
q:inout std_logic);
end df;
architecture Behavioral of df is
begin
process(clk)
begin
if(clk'event and clk='1')then
q<=d;
end if;
end process;
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity jj is
GENERIC(n:integer:=3;m:integer:=2);
port(
clk : in STD_LOGIC;
s:in std_logic_vector(m downto 1):="00";
q : inout STD_LOGIC_vector(n downto 1):="111";
rwp:inout STD_LOGIC_vector(1 to n):="000";
cwp:inout STD_LOGIC_vector(1 to m):="00");
end jj;
architecture counter of jj is
type memory is array (n-1 downto 0) of std_logic_vector(m-1 downto 0);
signal store:memory:=(others=>(others=>'1'));
begin
process(clk)
begin
if(clk='1' and clk'event )then
q(1)<=not q
;
for i in 2 to n loop
q(i)<=q(i-1);
end loop;
for i in 1 to n loop
for p in 1 to m loop
store(conv_integer(rwp))(conv_integer(cwp))<= q(i) xor s(p);
rwp<=rwp+'1';
end loop;
rwp<="000";
cwp<=cwp+'1';
end loop;
end if;
end process;
end counter;