From: hades Date: Thu, 9 Mar 2006 17:53:41 +0000 (+0000) Subject: first state machine X-Git-Tag: oldGBE~790 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8621b3b4a4037c2ad32e501cb81ca56065ea40d3;p=trbnet.git first state machine --- diff --git a/basic.h b/basic.h index 033879d..457c200 100644 --- a/basic.h +++ b/basic.h @@ -40,7 +40,7 @@ using namespace std; #define ERRORMODE 7 -#define STATUSBITS 0,1 +#define STATUSBITS 24,26 #define HEADER_HEADER 0x0 #define HEADER_TERM 0x1 #define HEADER_BUF 0x2 @@ -62,8 +62,10 @@ class STD_LOGIC_ARRAY { unsigned int get_value(int a, int b) { unsigned int bla=0; - for (int i=a,j=1;i=0;i--) { if (bla >= val) { bla -= val; cont[i]=1; + //cout << 1; } else { cont[i]=0; + //cout << 0; } - + //cout << endl; val /=2; } @@ -205,14 +209,23 @@ public: out_vector28 SIGOUT; void Logic(void){ + regarray[pointer_write].WRITE=WRITE; if (counter) EMPTY=0; else EMPTY=1; for (int i=0;i<28;i++) { (regarray[pointer_write].SIGIN(i))=(SIGIN(i)); (SIGOUT(i))=(regarray[pointer_read].SIGOUT(i)); } + + //cout << pointer_write << ":" << pointer_read << ":" << SIGIN.get_value(0,27) << endl; + } void NextCLK(void){ + + for (unsigned int i=0;i