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

Subversion Repositories s6soc

[/] [s6soc/] [trunk/] [sw/] [host/] [wbregs.cpp] - Diff between revs 8 and 11

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 8 Rev 11
Line 46... Line 46...
#include <ctype.h>
#include <ctype.h>
#include <string.h>
#include <string.h>
#include <signal.h>
#include <signal.h>
#include <assert.h>
#include <assert.h>
 
 
 
#include "devbus.h"
 
 
 
#ifdef  SIMPLE_DEPPBUS
#include "deppbus.h"
#include "deppbus.h"
 
#else
 
# include "llcomms.h"
 
# include "deppi.h"
 
# include "ttybus.h"
 
 
 
#endif
 
 
// #include "port.h"
// #include "port.h"
#include "regdefs.h"
#include "regdefs.h"
 
 
typedef DEPPBUS FPGA;
#ifdef  SIMPLE_DEPPBUS
 
# define        FPGAOPEN(SN)    new DEPPBUS(SN);
 
#else
 
# define        FPGAOPEN(SN)    new FPGA(new DEPPI(SN))
 
#endif
 
 
FPGA    *m_fpga;
FPGA    *m_fpga;
void    closeup(int v) {
void    closeup(int v) {
        m_fpga->kill();
        m_fpga->kill();
        exit(0);
        exit(0);
Line 73... Line 87...
                        skp++; argn--;
                        skp++; argn--;
                } else
                } else
                        argv[argn] = argv[argn+skp];
                        argv[argn] = argv[argn+skp];
        } argc -= skp;
        } argc -= skp;
 
 
        char    szSel[64];
 
        strcpy(szSel, "SN:210282768825");
 
        m_fpga = new DEPPBUS(szSel);
 
 
 
        signal(SIGSTOP, closeup);
        signal(SIGSTOP, closeup);
        signal(SIGHUP, closeup);
        signal(SIGHUP, closeup);
 
 
        if ((argc < 1)||(argc > 2)) {
        if ((argc < 1)||(argc > 2)) {
                // usage();
                // usage();
Line 92... Line 102...
        unsigned address = addrdecode(argv[0]), value;
        unsigned address = addrdecode(argv[0]), value;
        nm = addrname(address);
        nm = addrname(address);
        if (nm == NULL)
        if (nm == NULL)
                nm = "no name";
                nm = "no name";
 
 
 
        char    szSel[64];
 
        strcpy(szSel, "SN:210282768825");
 
        m_fpga = FPGAOPEN(szSel);
 
 
        if (argc < 2) {
        if (argc < 2) {
                FPGA::BUSW      v;
                FPGA::BUSW      v;
                try {
                try {
                        unsigned char a, b, c, d;
                        unsigned char a, b, c, d;
                        v = m_fpga->readio(address);
                        v = m_fpga->readio(address);

powered by: WebSVN 2.1.0

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