25use ieee.std_logic_1164.
all;
26use ieee.numeric_std.
all;
81 proc_regs:
process (
CLK)
84 if rising_edge(CLK) then
88 end process proc_regs;
95 variable dbit : slbit := '0';
96 variable ld_ccnt : slbit := '0';
97 variable tc_ccnt : slbit := '0';
98 variable tc_bcnt : slbit := '0';
99 variable ld_dcnt : slbit := '0';
100 variable ld_bcnt : slbit := '0';
101 variable ce_bcnt : slbit := '0';
102 variable iact : slbit := '0';
103 variable ival : slbit := '0';
104 variable ierr : slbit := '0';
122 if unsigned(r.ccnt) = 0 then
125 if unsigned(r.bcnt) = 9 then
129 if unsigned(r.dcnt) > unsigned("00" & CLKDIV(CDWIDTH-1 downto 1)) then
139 if tc_ccnt = '1' then
152 if tc_ccnt = '1' then
157 if dbit='1' and RXSD='1' then
172 if tc_ccnt = '1' then
182 if tc_ccnt = '1' then
190 n.sreg := dbit & r.sreg(7 downto 1);
191 if tc_ccnt = '1' then
192 if tc_bcnt = '1' then
201 if tc_bcnt = '1' then
209 if tc_ccnt = '1' then
214 if dbit='1' and RXSD='1' then
235 if tc_ccnt = '1' then
255 if ld_ccnt = '1' then
258 n.ccnt := slv(unsigned(r.ccnt) - 1);
261 if ld_dcnt = '1' then
262 n.dcnt(CDWIDTH downto 1) := (others=>'0');
266 n.dcnt := slv(unsigned(r.dcnt) + 1);
270 if ld_bcnt = '1' then
271 n.bcnt := (others=>'0');
273 if ce_bcnt = '1' then
274 n.bcnt := slv(unsigned(r.bcnt) + 1);
285 end process proc_next;
slv( CDWIDTH downto 0) :=( others => '0') dcntzero
regs_type := regs_init R_REGS
(s_idle,s_colb0,s_endb0,s_colbx,s_endbx,s_colb9,s_endb9) state_type
regs_type :=( s_idle, ccntzero, dcntzero,( others => '0'),( others => '0')) regs_init
slv( CDWIDTH- 1 downto 0) :=( others => '0') ccntzero
in CLKDIV slv( CDWIDTH- 1 downto 0)
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 7 downto 0) slv8