Documentation for architecture GOL/GOLSndWords/a0
VHDL Contents
1 architecture a0 of GOLSndWords is
24
25 type states is (doIdle1, doIdle2, doData);
26 signal state : states;
27 signal RqData : std_logic;
28 signal Toggle : std_logic;
29 signal Cycle : unsigned (6 downto 0);
30 signal ForceIdle : std_logic;
31
32 begin
33
34 Data <= LWD;
35 EAV <= Toggle;
36
37 RqData <= '1' when (WDE = '0' and EnSD = '1') else '0'; ForceIdle <= '1' when (Cycle(4 downto 0) = 31) else '0';
40 prTrx:
43 process (XClk, Rst_n)
44 begin
45 if (Rst_n = '0') then
46 Toggle <= '0';
47 CAV <= '0'; DAV <= '0'; RqD <= '0'; state <= doIdle1;
51 Cycle <= (others => '0');
52 elsif (rising_edge(XClk)) then
53 if (Toggle = '1') then
54 Toggle <= '0';
55 case state is
56 when doIdle1 =>
57 CAV <= '0'; DAV <= '0'; RqD <= '0'; state <= doIdle2;
61 when doIdle2 =>
62 CAV <= '0'; DAV <= '0'; if (RqData = '1') then
65 RqD <= '1'; state <= doData;
67 else
68 RqD <= '0'; state <= doIdle1;
70 end if;
71 when doData =>
72 CAV <= '0'; DAV <= '1'; Cycle <= Cycle + 1;
75 if (ForceIdle = '1') then
76 RqD <= '0'; state <= doIdle1;
78 elsif (RqData = '1') then
79 RqD <= '1'; state <= doData;
81 else
82 RqD <= '0'; state <= doIdle1;
84 end if;
85 when others =>
86 CAV <= '0'; DAV <= '0'; RqD <= '0'; state <= doIdle1;
90 end case;
91 else
92 RqD <= '0'; Toggle <= '1';
94 end if;
95 end if;
96 end process;
97
98 end architecture a0 ;