OpenCores
URL https://opencores.org/ocsvn/openarty/openarty/trunk

Subversion Repositories openarty

[/] [openarty/] [trunk/] [sw/] [host/] [manping.cpp] - Diff between revs 33 and 51

Show entire file | Details | Blame | View Log

Rev 33 Rev 51
Line 10... Line 10...
// Creator:     Dan Gisselquist, Ph.D.
// Creator:     Dan Gisselquist, Ph.D.
//              Gisselquist Technology, LLC
//              Gisselquist Technology, LLC
//
//
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
//
// Copyright (C) 2015-2016, Gisselquist Technology, LLC
// Copyright (C) 2015-2017, Gisselquist Technology, LLC
//
//
// This program is free software (firmware): you can redistribute it and/or
// This program is free software (firmware): you can redistribute it and/or
// modify it under the terms of  the GNU General Public License as published
// modify it under the terms of  the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License, or (at
// by the Free Software Foundation, either version 3 of the License, or (at
// your option) any later version.
// your option) any later version.
Line 23... Line 23...
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
// ANY WARRANTY; without even the implied warranty of MERCHANTIBILITY or
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for more details.
// for more details.
//
//
// You should have received a copy of the GNU General Public License along
// You should have received a copy of the GNU General Public License along
// with this program.  (It's in the $(ROOT)/doc directory, run make with no
// with this program.  (It's in the $(ROOT)/doc directory.  Run make with no
// target there if the PDF file isn't present.)  If not, see
// target there if the PDF file isn't present.)  If not, see
// <http://www.gnu.org/licenses/> for a copy.
// <http://www.gnu.org/licenses/> for a copy.
//
//
// License:     GPL, v3, as defined and found on www.gnu.org,
// License:     GPL, v3, as defined and found on www.gnu.org,
//              http://www.gnu.org/licenses/gpl.html
//              http://www.gnu.org/licenses/gpl.html
Line 215... Line 215...
        delay = (1<<(delay))-32;
        delay = (1<<(delay))-32;
        m_fpga->writeio(R_NETSCOPE, (delay));
        m_fpga->writeio(R_NETSCOPE, (delay));
}
}
 
 
int main(int argc, char **argv) {
int main(int argc, char **argv) {
        int     skp=0, port = FPGAPORT;
 
        bool    config_hw_mac = true, config_hw_crc = true;
        bool    config_hw_mac = true, config_hw_crc = true;
        FPGA::BUSW      txstat;
        FPGA::BUSW      txstat;
        int     argn;
        int     argn;
        unsigned        checksum;
        unsigned        checksum;
        unsigned        urand[16], nu = 0;
        unsigned        urand[16], nu = 0;
Line 233... Line 232...
                // number generator--but don't fail if we can't.
                // number generator--but don't fail if we can't.
                fp = fopen("/dev/urandom", "r");
                fp = fopen("/dev/urandom", "r");
                if (fp != NULL) {
                if (fp != NULL) {
                        int nr = fread(urand, sizeof(short), 16, fp);
                        int nr = fread(urand, sizeof(short), 16, fp);
                        fclose(fp);
                        fclose(fp);
 
                        if (nr<0)
 
                                printf("Could not generate random numbers from /dev/urandom!\nTest may not be valid.\n");
                }
                }
        }
        }
 
 
 
 
        FPGAOPEN(m_fpga);
        FPGAOPEN(m_fpga);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.