71use ieee.std_logic_1164.
all;
72use ieee.numeric_std.
all;
134 datrd : slv(127 downto 0);
135 datwr : slv(127 downto 0);
257 report "assert(MAWIDTH <= 32): unsupported MAWIDTH"
260 report "assert(MWIDTH = 8 or 16): unsupported MWIDTH"
266 if rising_edge(CLK) then
274 end process proc_regs;
285 variable irb_ack : slbit := '0';
286 variable irb_busy : slbit := '0';
287 variable irb_err : slbit := '0';
288 variable irb_dout : slv16 := (others=>'0');
289 variable irbena : slbit := '0';
291 variable iappcmd : slv3 := (others=>'0');
292 variable iappen : slbit := '0';
293 variable iappwren : slbit := '0';
294 variable iappwend : slbit := '0';
295 variable iappref : slbit := '0';
296 variable iappzq : slbit := '0';
298 variable ncrpat : slv16 := (others=>'0');
299 variable nwrpat : slv16 := (others=>'0');
309 irb_dout := (others=>'0');
328 if r.rbsel='1' and irbena='1' then
336 if r.rbsel = '1' then
338 case RB_MREQ.addr(4 downto 0) is
346 n.cwait := (others=>'0');
347 n.rwait := (others=>'0');
349 n.state := s_rdcwait;
352 n.cwait := (others=>'0');
353 n.rwait := (others=>'0');
355 n.state := s_wrcwait;
362 n.xwait := (others=>'0');
363 if r.refpend = '0' then
371 n.xwait := (others=>'0');
372 if r.zqpend = '0' then
380 n.cwait := (others=>'0');
381 n.rwait := (others=>'0');
383 n.state := s_cmdwait;
386 n.cwait := (others=>'0');
387 n.rwait := (others=>'0');
389 n.state := s_wrenwait;
451 if r.rbsel='0' or irbena='0' then
457 n.state := s_rdrwait;
459 n.cwait := slv(unsigned(r.cwait) + 1);
465 n.rwait := slv(unsigned(r.rwait) + 1);
466 if r.rbsel='0' or irbena='0' then
480 if r.rbsel='0' or irbena='0' then
489 n.cwait := slv(unsigned(r.cwait) + 1);
497 if r.rbsel='0' or irbena='0' then
507 n.cwait := slv(unsigned(r.cwait) + 1);
514 if r.rbsel='0' or irbena='0' then
522 n.cwait := slv(unsigned(r.cwait) + 1);
533 if r.rbsel = '1' then
534 case RB_MREQ.addr(4 downto 0) is
587 n.crsreg := ncrpat(n.crsreg'range);
588 n.wrsreg := nwrpat(n.wrsreg'range);
594 n.dvalcnt := slv(unsigned(r.dvalcnt) + 1);
598 if r.refpend = '1' or r.zqpend = '1' then
599 n.xwait := slv(unsigned(r.xwait) + 1);
615 if r.caco_1 = '1' then
616 n.initime := (others => '0');
617 if r.inicnt /= x"ff" then
618 n.inicnt := slv(unsigned(r.inicnt) + 1);
621 if r.initime /= x"ffff" then
623 n.initime := slv(unsigned(r.initime) + 1);
632 if r.uirst_1 = '0' then
633 n.rsttime := (others => '0');
634 if r.rstcnt /= x"ff" then
635 n.rstcnt := slv(unsigned(r.rstcnt) + 1);
638 if r.rsttime /= x"ffff" then
640 n.rsttime := slv(unsigned(r.rsttime) + 1);
668 end process proc_next;
std_logic_vector( 14 downto 0) slv15
std_logic_vector( 3 downto 0) slv4
std_logic_vector( 4 downto 0) slv5
std_logic_vector( 11 downto 0) slv12
std_logic_vector( 2 downto 0) slv3
std_logic_vector( 31 downto 0) slv32
std_logic_vector( 15 downto 0) slv16
std_logic_vector( 7 downto 0) slv8
slv5 := "01000" rbaddr_crpat
slv3 := "001" migui_cmd_read
slv5 := "00001" rbaddr_stat
slv5 := "10100" rbaddr_datrd4
slv5 := "00100" rbaddr_addrl
integer range 127 downto 112 df_word7
integer range 31 downto 16 df_word1
integer := 12 cntl_rbf_wren
integer range 47 downto 32 df_word2
slv3 := "000" migui_cmd_write
slv5 := "00110" rbaddr_temp
slv5 := "01010" rbaddr_cwait
slv5 := "01011" rbaddr_rwait
integer := 1 stat_rbf_wrdy
slv5 := "10011" rbaddr_datrd3
slv5 := "10101" rbaddr_datrd5
integer range 63 downto 48 df_word3
integer := 6 stat_rbf_zqpend
slv5 := "10001" rbaddr_datrd1
slv5 := "01100" rbaddr_xwait
integer := 4 stat_rbf_rdend
integer range 79 downto 64 df_word4
slv5 := "11111" rbaddr_datwr7
slv5 := "10010" rbaddr_datrd2
slv5 := "01110" rbaddr_rsttime
integer range 3 downto 0 cntl_rbf_func
integer range 4 downto 0 conf_rbf_mwidth
slv5 := "00011" rbaddr_mask
integer range 111 downto 96 df_word6
slv5 := "10111" rbaddr_datrd7
integer range 9 downto 5 conf_rbf_mawidth
slv5 := "01001" rbaddr_wrpat
slv5 := "01101" rbaddr_ircnt
integer := 5 stat_rbf_refpend
slv5 := "10000" rbaddr_datrd0
regs_type := regs_init R_REGS
integer range 7 downto 0 ircnt_rbf_inicnt
integer range 15 downto 0 df_word0
integer := 3 stat_rbf_uirst
slv5 := "00010" rbaddr_conf
integer := 2 stat_rbf_caco
integer := 0 stat_rbf_crdy
slv5 := "11110" rbaddr_datwr6
slv5 := "11100" rbaddr_datwr4
(s_idle,s_rdcwait,s_rdrwait,s_wrcwait,s_cmdwait,s_wrenwait) state_type
slv5 := "10110" rbaddr_datrd6
integer range 95 downto 80 df_word5
integer range 15 downto 13 cntl_rbf_cmd
slv5 := "11011" rbaddr_datwr3
slv5 := "11000" rbaddr_datwr0
slv5 := "11101" rbaddr_datwr5
slv5 := "00000" rbaddr_cntl
slv5 := "11010" rbaddr_datwr2
regs_type :=( s_idle, '0',( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'),( others => '0'), '0', '0', '0', '0', '0') regs_init
integer := 11 cntl_rbf_dwend
slv5 := "01111" rbaddr_initime
integer range 15 downto 8 ircnt_rbf_rstcnt
slv5 := "00111" rbaddr_dvalcnt
slv5 := "11001" rbaddr_datwr1
slv5 := "00101" rbaddr_addrh
out APP_WDF_MASK slv( MWIDTH- 1 downto 0)
in APP_RD_DATA_VALID slbit
in MIG_INIT_CALIB_COMPLETE slbit
in MIG_UI_CLK_SYNC_RST slbit
RB_ADDR slv16 := slv( to_unsigned( 2#0000000000000000#, 16) )
in APP_RD_DATA slv( 8* MWIDTH- 1 downto 0)
in MIG_DEVICE_TEMP_I slv12
out APP_WDF_DATA slv( 8* MWIDTH- 1 downto 0)
out APP_ADDR slv( MAWIDTH- 1 downto 0)