2 use ieee.std_logic_1164.all;
7 use techmap.gencomp.all;
10 --use gaisler.ambatest.all;
11 use gaisler.ahbtbp.all;
21 ctrl_in1 : in ahbtbm_ctrl_in_type;
22 ctrl_out1 : out ahbtbm_ctrl_out_type;
23 data : out std_logic_vector(11 downto 0);
24 add : out std_logic_vector(5 downto 0);
25 effect : out std_logic);
28 architecture rtl of bus_huff is
30 type control_reg is record
31 out_cnt : std_logic_vector(31 downto 0);
34 signal apbi : apb_slv_in_type;
35 signal apbo : apb_slv_out_vector := (others => apb_none);
36 signal ahbsi : ahb_slv_in_type;
37 signal ahbso : ahb_slv_out_vector := (others => ahbs_none);
38 signal ahbmi : ahb_mst_in_type;
39 signal ahbmo : ahb_mst_out_vector := (others => ahbm_none);
41 signal kready : std_logic;
42 signal kstrobe : std_logic;
43 signal kdata : std_logic_vector(11 downto 0);
44 signal kaddress : std_logic_vector(5 downto 0);
45 signal samp_fact : std_logic;
46 signal error : std_logic_vector(2 downto 0);
47 signal xmcumax : std_logic_vector(5 downto 0);
48 signal ymcumax : std_logic_vector(4 downto 0);
49 signal incaddy : std_logic_vector(15 downto 0);
50 signal incaddmcux : std_logic_vector(15 downto 0);
51 signal incaddmcuy : std_logic_vector(10 downto 0);
52 signal fbstartadd : std_logic_vector(31 downto 0);
53 signal startgen : std_logic;
54 signal kstrobeq : std_logic;
55 signal kdataq : std_logic_vector(7 downto 0);
56 signal kaddq : std_logic_vector(7 downto 0);
57 signal krddataq : std_logic_vector(7 downto 0);
58 signal krdq : std_logic;
59 -- signal rst : std_ulogic;
61 signal r,rin : control_reg;
67 error <= (others => '0');
69 generic map(shindex => 2, haddr => 16#900#, pindex => 2, paddr => 2, mhindex => 3, hirq => 2)
70 port map (rstn, clk, ahbsi, ahbso(2), apbi, apbo(2), kready, kstrobe, kdata,
71 kaddress, samp_fact, error, xmcumax, ymcumax, incaddy, incaddmcux, incaddmcuy,
72 fbstartadd, startgen, kstrobeq, kdataq, kaddq, krddataq, krdq);
77 generic map (hindex => 4, haddr => 16#800#)
78 port map(rstn, clk, ahbsi, ahbso(4), apbi, apbo);
80 ahbcontroller : ahbctrl -- AHB arbiter/multiplexer
81 generic map (defmast => CFG_DEFMST, split => CFG_SPLIT,
82 enbusmon => 0,rrobin => CFG_RROBIN, ioaddr => CFG_AHBIO)
83 port map (rstn, clk, ahbmi, ahbmo, ahbsi, ahbso);
86 -- generic map (hindex => 7, haddr => 16#a00#, tech => CFG_MEMTECH, kbytes => 24)
87 -- port map (rstn, clk, ahbsi, ahbso(7));
90 generic map(hindex => 0)
91 port map (rstn, clk, ctrl_in1, ctrl_out1, ahbmi, ahbmo(0));
93 cnt_comb : process(r, rstn, kstrobe)
94 variable v : control_reg;
98 v.out_cnt := v.out_cnt + 1;
102 v.out_cnt := (others => '0');
109 if rising_edge(clk) then