Announcement

Collapse
No announcement yet.

Problem with Packet Generator Perl Script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Packet Generator Perl Script

    Hello,

    I have downloaded the netfpga package 2.2.0 and also did yum install netfpga-packet_generator.

    But after downloading bitfile to netfpga ( nf_download packet_generator.bit) and then runnng packet_generator.pl, it gives this error-

    Can't locate reg_defines_packet_generator.pm in @INC (@INC contains: /root/netfpga/projects/reference_nic/lib/Perl5 /root/netfpga/projects/cpci/lib/Perl5 /root/netfpga/lib/Perl5 /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5 /usr/share/perl5 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at /usr/local/netfpga/projects/packet_generator/sw/packet_generator.pl line 34.
    BEGIN failed--compilation aborted at /usr/local/netfpga/projects/packet_generator/sw/packet_generator.pl line 34.

    I went through the file but am not sure what to do.

    Please let me know.

    Thanks
    Mrinmay
    Clemson University
    Last edited by MrinmayKalita; 03-04-2011, 05:40 AM.

  • #2
    Hello,

    It looks like the register file might be missing.

    Try running 'nf_register_gen.pl --project packet_generator'. Making sure your NF_ROOT and NF_DESIGN_DIR is correctly assigned.

    This should generate the necessary register files in netfpga/projects/packet_generator/lib.
    Adam Covington
    Research Associate
    Stanford University

    Comment


    • #3
      Hey I did what you mentioned me to do.

      But still then, the same thing is showing up.

      Also, lib (i.e. lib folder) was not created inside packet_generator on running nf_register_gen.pl --project packet_generator nor in the working directory.

      Also, the error which is occurring on running packet_generator.pl [i.e. Can't locate reg_defines_packet_generator.pm in @INC (@INC contains: /root/netfpga/projects/reference_nic/lib/Perl5...] doesn't seem logical as root/netfpga/projects/reference_nic/lib/Perl5 does have reg_defines_packet_generator.pm.

      Just for info,

      my bashrc_addon file inside ~/netfpga is


      if [ "$NF_ROOT" == "" ]; then
      export NF_ROOT=${HOME}/netfpga
      fi

      if [ "$NF_DESIGN_DIR" == "" ]; then
      export NF_DESIGN_DIR=${NF_ROOT}/projects/packet_generator
      fi

      if [ "$NF_WORK_DIR" == "" ]; then
      export NF_WORK_DIR=/tmp/${USER}
      fi

      export PYTHONPATH=${PYTHONPATH}:${NF_ROOT}/lib/python
      export LD_LIBRARY_PATH=${NF_ROOT}/lib/java/NetFPGAFrontEnd/bin:${LD_LIBRARY_PATH}

      if [ ! -d ${NF_WORK_DIR} ]; then
      mkdir ${NF_WORK_DIR}
      fi

      if [ ! -d ${HOME}/.qt ]; then
      mkdir ${HOME}/.qt
      fi

      if [ -f ${NF_ROOT}/bin/nf_profile ]; then
      source ${NF_ROOT}/bin/nf_profile
      fi

      and the .bashrc file in root (~/) is

      alias rm='rm -i'
      alias cp='cp -i'
      alias mv='mv -i'

      # Source global definitions
      if [ -f /etc/bashrc ]; then
      . /etc/bashrc
      fi

      if [ "$NF_ROOT" == "" ]; then
      export NF_ROOT=${HOME}/netfpga
      fi

      if [ "$NF_DESIGN_DIR" == "" ]; then
      export NF_DESIGN_DIR=${NF_ROOT}/projects/packet_generator
      fi

      if [ "$NF_WORK_DIR" == "" ]; then
      export NF_WORK_DIR=/tmp/${USER}
      fi

      export PYTHONPATH=${PYTHONPATH}:${NF_ROOT}/lib/python
      export LD_LIBRARY_PATH=${NF_ROOT}/lib/java/NetFPGAFrontEnd/bin:${LD_LIBRARY_PATH}

      if [ ! -d ${NF_WORK_DIR} ]; then
      mkdir ${NF_WORK_DIR}
      fi

      Also, nf_register_gen.pl --project packet_generator runs okay but gives a few warnings regarding some module specific xmls not availabel for certain modules and ends with
      "Definition for module 'nf2_mac_grp' not loaded at /root/netfpga/bin/nf_register_ gen.pl line 57"

      This is what is exactly said-
      Processing /root/netfpga/lib/verilog/core/io_queues/cpu_dma_queue/xml/cpu_dma_queue.xml...
      WARNING: No module specific XML found for module 'core/io_queues/ethernet_mac'
      Processing /root/netfpga/lib/verilog/core/input_arbiter/rr_input_arbiter/xml/rr_input_arbiter.xml...
      WARNING: No module specific XML found for module 'core/nf2/generic_top'
      WARNING: No module specific XML found for module 'core/nf2/reference_core'
      WARNING: No module specific XML found for module 'core/output_port_lookup/nic'
      WARNING: No module specific XML found for module 'core/sram_arbiter/sram_weighted_rr'
      WARNING: No module specific XML found for module 'core/user_data_path/reference_user_data_path'
      Processing /root/netfpga/lib/verilog/core/io/mdio/xml/mdio.xml...
      WARNING: No module specific XML found for module 'core/cpci_bus'
      Processing /root/netfpga/lib/verilog/core/dma/xml/dma.xml...
      WARNING: No module specific XML found for module 'core/user_data_path/udp_reg_master'
      WARNING: No module specific XML found for module 'core/io_queues/add_rm_hdr'
      Processing /root/netfpga/lib/verilog/core/strip_headers/keep_length/xml/strip_headers.xml...
      Processing /root/netfpga/lib/verilog/core/utils/xml/device_id_reg.xml...
      WARNING: No module specific XML found for module 'core/utils/generic_regs'
      Processing /root/netfpga/projects/packet_generator/include/delay.xml...
      Processing /root/netfpga/projects/packet_generator/include/packet_capture.xml...
      Processing /root/netfpga/projects/packet_generator/include/rate_limiter.xml...
      Processing /root/netfpga/projects/packet_generator/include/sram_rr_output_queues.xml...
      Processing /root/netfpga/projects/packet_generator/include/stamp_counter.xml...
      Definition for module 'nf2_mac_grp' not loaded at /root/netfpga/bin/nf_register_gen.pl line 57

      Running modprobe -d ~/netfpga nf2_mac_grp
      FATAL: Could not load /root/netfpga/lib/modules/2.6.33.8-149.fc13.i686/modules.dep: No such file or directory

      Please let me know.
      Last edited by MrinmayKalita; 02-28-2011, 04:49 AM.

      Comment


      • #4
        Ah, yes. I don't think the packet_generator project has been updated to use the new io_queues on the lastest release.

        I'll see that this is updated. In the meantime, you can update the project.xml manually by doing the following.

        replace:
        core/io_queues/ethernet_mac

        with:
        core/io_queues/ethernet_queue
        contrib/ucsd/gig_eth_mac

        We updated the structure for the ethernet_mac to allow users to swap out the Xilinx TRIMAC core with the user contributed module. This is easily accomplished now by changing the "conrib/ucsd/gig_eth_mac" to "core/io_queues/ethernet_mac" if you would like to use the Xilinx core instead of the user contributed core.

        Apologies for the issue.
        Adam Covington
        Research Associate
        Stanford University

        Comment


        • #5
          Packet_generator problem

          I have problems with packet generator. Would you help me?
          Thanks in advance!

          [root@UCSP sw]# packet_generator.pl

          NetFPGA environment:
          Root dir: /root/netfpga
          Project name: packet_generator
          Project dir: /root/netfpga/projects/packet_generator
          Work dir: /tmp/root

          Can't locate reg_defines_packet_generator.pm in @INC (@INC contains: /root/netfpga/projects/packet_generator/lib/Perl5 /root/netfpga/projects/cpci/lib/Perl5 /root/netfpga/projects/reference_nic/lib/Perl5 /root/netfpga/lib/Perl5 /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5 /usr/share/perl5 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl /usr/lib/perl5/site_perl .) at ./packet_generator.pl line 34.
          BEGIN failed--compilation aborted at ./packet_generator.pl line 34.

          Comment


          • #6
            Hello, it seems like your register file is missing
            Try running 'nf_register_gen.pl --project packet_generator'. Making sure your NF_ROOT and NF_DESIGN_DIR is correctly assigned.

            This should generate the necessary register files in netfpga/projects/packet_generator/lib.

            Look at here
            Last edited by Conleyer; 08-11-2012, 06:46 AM.
            click for info

            Comment


            • #7
              Hello everybody,

              When trying to run packet_generator.pl getting this error:
              [raphael@localhost sw]$ ./packet_generator.pl
              Can't locate NF/Base.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./packet_generator.pl line 19.
              BEGIN failed--compilation aborted at ./packet_generator.pl line 19.

              Comment


              • #8
                Try setting the PERL5LIB environment variable

                Originally posted by rodrigobastos View Post
                Hello everybody,

                When trying to run packet_generator.pl getting this error:
                Hi,
                Try setting the PERL5LIB environment variable before executing the command.

                Code:
                export PERL5LIB="${NF_ROOT}/lib/Perl5:${PERL5LIB}"
                Thanks & Regards
                NELLS K S
                Tech Mahindra

                Comment


                • #9
                  can someone help...i ran into this issue

                  BEGIN failed--compilation aborted at /root/netfpga/bin/nf_register_gen.pl line 11.
                  make[3]: *** [registers] Error 2
                  make[3]: Leaving directory `/root/netfpga/projects/reference_nic/sw'
                  make[2]: *** [sw] Error 2
                  make[2]: Leaving directory `/root/netfpga/projects/reference_nic'
                  make[1]: *** [reference_nic] Error 2
                  make[1]: Leaving directory `/root/netfpga/projects'
                  make: *** [projects] Error 2

                  when i enter
                  cd ~/netfpga
                  make

                  Comment

                  Working...
                  X