Loading ...
Sorry, an error occurred while loading the content.

24254Re: [LEON_SPARC] [MODELSIM] AHB slave index error after add e new core

Expand Messages
  • Magnus Hjorth
    Aug 29, 2014
      Hello,

      ahb_slv_out_type has these fields, see lib/grlib/amba/amba.vhd.

      type ahb_slv_out_type is record
      hready : std_ulogic; -- transfer done
      hresp : std_logic_vector(1 downto 0); -- response type
      hrdata : std_logic_vector(AHBDW-1 downto 0); -- read data bus
      hsplit : std_logic_vector(NAHBMST-1 downto 0); -- split completion
      hirq : std_logic_vector(NAHBIRQ-1 downto 0); -- interrupt bus
      hconfig : ahb_config_type; -- memory
      access reg.
      hindex : integer range 0 to NAHBSLV-1; -- diagnostic
      use only
      end record;

      Regards,
      Magnus

      Magnus Hjorth
      Hardware Engineer
      Aeroflex Gaisler AB
      Aeroflex Microelectronic Solutions – HiRel
      Kungsgatan 12
      SE-411 19 Gothenburg, Sweden
      Phone: +46 31 7758655
      mhjorth@...
      www.Aeroflex.com/Gaisler

      On 08/29/2014 11:20 AM, thierry.public1@... [LEON_SPARC] wrote:
      >
      > Hi,
      >
      > Thank for reply.
      >
      > I have not ahbledAh_out.hconfig and ahbledAh_out.hindex fields beacause
      > it is ahb_slv_out_type signal.
      >
      > regards
      >
      > Thierry
      >
      >
      >
      > ---In leon_sparc@yahoogroups.com, <mhjorth@...> wrote :
      >
      > Hello,
      >
      > Are you driving the ahbledAh_out.hconfig output with your hconfig
      > constant? And are you driving ahbledAh_out.hindex signal with the hindex
      > generic value?
      >
      > Regards,
      > Magnus
      >
      > On 08/29/2014 10:15 AM, thierry.public1@...
      > <mailto:thierry.public1@...> [LEON_SPARC] wrote:
      > >
      > > Hi,
      > >
      > > I try to add a new personal core on global designe but I have a problem.
      > > I did next operations :
      > >
      > > *1]* I add new vendor on devices.vhd :
      > > constant VENDOR_THIERRY1 : amba_vendor_type := 16#EB#;
      > >
      > > *2]* I add new core name on devices.vhd :
      > > constant THIERRY_LEDCTRL : amba_device_type := 16#098#;
      > >
      > > *3]* I specify directory names of my lib on libs.txt, dirs.txt and
      > > vhdlsyn.txt
      > >
      > >
      > > *4]* I creat my slave IP to plug on AHB bus like this :
      > >
      > > _* lib : _
      > >
      > > library ieee;
      > > use ieee.std_logic_1164.all;
      > > use ieee.numeric_std.all, ieee.std_logic_unsigned.all;
      > > library grlib;
      > > use grlib.amba.all;
      > > use grlib.devices.all;
      > > use grlib.stdlib.all;
      > >
      > > _*entity :_
      > >
      > > entity ahb_led is
      > > generic (
      > > hindex1 : integer := 0;
      > > paddr : integer := 0;
      > > hmask : integer := 16#fff# );
      > > port (
      > > ahbledRst : in std_ulogic;
      > > ahbledClk : in std_ulogic;
      > > ahbledBus_V15Out:out std_logic_vector (15 downto 0);
      > > ahbledTest_V15Out:out std_logic_vector (15 downto 0);
      > > ahbledAhb_In : in ahb_slv_in_type;
      > > ahbledAh_Out : out ahb_slv_out_type );
      > > end;
      > >
      > >
      > > _*Plug and play config :_
      > >
      > > architecture rtl of ahb_led is
      > >
      > > constant HCONFIG: ahb_config_type := (
      > > 0=>ahb_device_reg (VENDOR_THIERRY1, THIERRY_LEDCTRL,0,0,0),
      > > 4 => ahb_membar(paddr, '0', '0', hmask),
      > > others => X"00000000"); -- plug and play config
      > >
      > >
      > > *5]* after add my personal .vhd file on project I make an instance of my
      > > IP on leon3mp.vhd like this :
      > >
      > > _*declaration :_
      > >
      > >
      > > component ahb_led is
      > > generic (
      > > hindex1 : integer ;
      > > paddr : integer ;
      > > hmask : integer );
      > > port (
      > > ahbledRst : in std_ulogic;
      > > ahbledClk : in std_ulogic;
      > > ahbledBus_V15Out:out std_logic_vector (15 downto 0);
      > > ahbledTest_V15Out:out std_logic_vector (15 downto 0);
      > > ahbledAhb_In : in ahb_slv_in_type;
      > > ahbledAh_Out : out ahb_slv_out_type );
      > > end component;
      > >
      > >
      > > _* add nbslave :_
      > >
      > > __
      > >
      > > ------------------------------------------------
      > > --- AHB CONTROLLER ------------------------------
      > > -----------------------------------------------------
      > >
      > > ahb0 : ahbctrl -- AHB arbiter/multiplexer
      > >
      > >
      > > generic map (defmast => CFG_DEFMST, split => CFG_SPLIT,
      > > rrobin => CFG_RROBIN, ioaddr => CFG_AHBIO, ioen => IOAEN,
      > > nahbm => CFG_NCPU+CFG_AHB_UART+CFG_AHB_JTAG+CFG_SVGA_ENABLE,
      > > devid => ALTERA_DE2, *_nahbs => 9_*)-- <=== origin : nahbs => 8
      > >
      > > port map (rstn, clkm, ahbmi, ahbmo, ahbsi, ahbso);
      > >
      > >
      > > _* instance :_
      > >
      > > led0 : ahb_led
      > > generic map (
      > > hindex1 => 8,
      > > paddr => 16#A00#,
      > > hmask => 16#FFF#)
      > > port map (
      > > ahbledRst => rstn,
      > > ahbledClk => clkm,
      > > ahbledBus_V15Out => compteurLED1xDO,
      > > ahbledTest_V15Out => compteurTestVector1xDO,
      > > ahbledAhb_In => ahbsi,
      > > ahbledAh_Out => ahbso(8) );
      > >
      > > *6]* The compilation with quartus and modelsim are good.
      > >
      > > But when I launch the simu with 'make vsim-launch' I have this echo on
      > > modelsim terminal (my IP is slv8) :
      > >
      > >
      > > run -a
      > > # ** Note: Cyclone II PLL is enabled
      > > # Time: 0 ps Iteration: 2 Instance:
      > > /testbench/d3/clkgen0/sden/altpll0/CYCLONEII_ALTPLL/M3
      > > # LEON3 Altera DE2-EP2C35 Demonstration design
      > > # GRLIB Version 1.3.4, build 4140
      > > # Target technology: altera , memory library: inferred
      > > # ahbctrl: AHB arbiter/multiplexer rev 1
      > > # ahbctrl: Common I/O area at 0xfff00000, 1 Mbyte
      > > # ahbctrl: AHB masters: 4, AHB slaves: 9
      > > # ahbctrl: Configuration area at 0xfffff000, 4 kbyte
      > > # ahbctrl: mst0: Aeroflex Gaisler LEON3 SPARC V8 Processor
      > > # ahbctrl: mst1: Aeroflex Gaisler AHB Debug UART
      > > # ahbctrl: mst2: Aeroflex Gaisler JTAG Debug Link
      > > # ahbctrl: mst3: Aeroflex Gaisler SVGA frame buffer
      > > # ahbctrl: slv0: European Space Agency LEON2 Memory Controller
      > > # ahbctrl: memory at 0x00000000, size 512 Mbyte, cacheable, prefetch
      > > # ahbctrl: slv1: Aeroflex Gaisler AHB/APB Bridge
      > > # ahbctrl: memory at 0x80000000, size 1 Mbyte
      > > # ahbctrl: slv2: Aeroflex Gaisler LEON3 Debug Support Unit
      > > # ahbctrl: memory at 0x90000000, size 256 Mbyte
      > > # ahbctrl: slv3: Aeroflex Gaisler PC133 SDRAM Controller
      > > # ahbctrl: memory at 0x40000000, size 8 Mbyte, cacheable, prefetch
      > > # ahbctrl: I/O port at 0xfff00100, size 256 byte
      > > # ahbctrl: slv7: Aeroflex Gaisler Test report module
      > > # ahbctrl: memory at 0x20000000, size 1 Mbyte
      > > # ahbctrl: slv8: Unknown vendor Unknown Device
      > > # ahbctrl: memory at 0xa0000000, size 1 Mbyte
      > > # ** Failure: AHB slave index error on slave 8. Detected index value 0
      > > # Time: 2 ns Iteration: 0 Process: /testbench/d3/ahb0/diag File:
      > > ../../lib/grlib/amba/ahbctrl.vhd
      > > # Break in ForLoop loop at ../../lib/grlib/amba/ahbctrl.vhd line 960
      > >
      > >
      > > This error corresponding to the next line on ahbctrl.vhd :
      > >
      > > assert (slvo(i).hindex = i) or (icheck = 0)
      > > report "AHB slave index error on slave " & tost(i) &
      > > L960=> ". Detected index value " & tost(slvo(i).hindex)
      > > severity failure;
      > > if mcheck /= 0 then
      > > for j in 0 to i loop
      > > for k in memmap(i)'range loop
      > > if memmap(i)(k).stop /= zero32(memmap(i)(k).stop'range) then
      > > for l in memmap(j)'range loop
      > > assert ((memmap(i)(k).start >= memmap(j)(l).stop) or
      > > (memmap(i)(k).stop <= memmap(j)(l).start) or
      > > (mcheck /= 2 and (memmap(i)(k).io xor
      > > memmap(j)(l).io) = '1') or
      > > (i = j and k = l))
      > > report "AHB slave " & tost(i) & " bank " & tost(k) &
      > > " intersects with AHB slave " & tost(j) & " bank "
      > > & tost(l)
      > > severity failure;
      > > end loop;
      > > end if;
      > > end loop;
      > > end loop;
      > >
      > > My questions :
      > >
      > > Where can I modify leon3mp.vhd to add correctly my IP ?
      > >
      > > Why have I an Unknown vendor and Unknown Device on my IP (slv8) ?
      > >
      > > Best regards
      > > Thierry
      > >
      > >
      >
      >
    • Show all 10 messages in this topic