Added plotPattern.py for the new pattern generator for the new firmware (6 loops, 6 waits)

This commit is contained in:
2022-11-18 10:30:25 +01:00
parent 39a87ffcd9
commit 33e2155db1
5 changed files with 710 additions and 0 deletions

View File

@ -0,0 +1,4 @@
BIT0 output0 1
BIT1 output1 1
BIT2 output2 1
BIT3 output3 1

View File

@ -0,0 +1,97 @@
//define signals and directions (Input, outputs, clocks)
#define output0 0
setoutput(output0);
#define output1 1
setoutput(output1);
#define output2 2
setoutput(output2);
#define output3 3
setoutput(output3);
#define input0 4
setinput(input0);
#define input1 5
setinput(input1);
#define input2 6
setinput(input2);
#define input3 7
setinput(input3);
#define PW pw()
#define SB(x) setbit(x)
#define CB(x) clearbit(x)
#define CLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw()
#define LCLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw();clearbit(CLKBIT); pw()
#define CLOCKS(x) for (i=0;i<x;i++) {clearbit(CLKBIT);pw(); setbit(CLKBIT); pw();}
#define STOP setstop();
#define START setstart();
#define REPEAT(x) for (i=0;i<(x);i++) {pw();}
#define DOFOR(x) for (j=0;j<(x);j++) {
// }
#define INST0 CB(output3);CB(output2);CB(output1);CB(output0);PW;
#define INST1 CB(output3);CB(output2);CB(output1);SB(output0);PW;
#define INST2 CB(output3);CB(output2);SB(output1);CB(output0);PW;
#define INST3 CB(output3);CB(output2);SB(output1);SB(output0);PW;
#define INST4 CB(output3);SB(output2);CB(output1);CB(output0);PW;
#define INST5 CB(output3);SB(output2);CB(output1);SB(output0);PW;
#define INST6 CB(output3);SB(output2);SB(output1);CB(output0);PW;
#define INST7 CB(output3);SB(output2);SB(output1);SB(output0);PW;
#define INST8 SB(output3);CB(output2);CB(output1);CB(output0);PW;
#define INST9 SB(output3);CB(output2);CB(output1);SB(output0);PW;
#define INST10 SB(output3);CB(output2);SB(output1);CB(output0);PW;
#define INST11 SB(output3);CB(output2);SB(output1);SB(output0);PW;
#define INST12 SB(output3);SB(output2);CB(output1);CB(output0);PW;
START;
INST0;
setwaitpoint(0);
setwaittime(0,5);
INST1;
setstartloop(5);
setnloop(5,2);
INST2;
setstartloop(0);
setnloop(0,2);
INST3;
INST4;
setstoploop(0);
setstoploop(5);
INST5;
INST6;
setwaitpoint(4);
setwaittime(1,0);
INST7;
INST8;
setstartloop(2);
setnloop(2,0);
INST9;
INST10;
setstoploop(2);
INST11;
STOP;
INST12;

View File

@ -0,0 +1,25 @@
patword 0x0000 0x0000000000000000
patword 0x0001 0x0000000000000001
patword 0x0002 0x0000000000000002
patword 0x0003 0x0000000000000003
patword 0x0004 0x0000000000000004
patword 0x0005 0x0000000000000005
patword 0x0006 0x0000000000000006
patword 0x0007 0x0000000000000007
patword 0x0008 0x0000000000000008
patword 0x0009 0x0000000000000009
patword 0x000a 0x000000000000000a
patword 0x000b 0x000000000000000b
patword 0x000c 0x000000000000000c
patlimits 0x0000 0x000c
patioctrl 0x000000000000000f
patloop 0 0x0003 0x0005
patnloop 0 2
patloop 2 0x0009 0x000b
patnloop 2 0
patloop 5 0x0002 0x0005
patnloop 5 2
patwait 0 0x0001
patwaittime 0 5
patwait 4 0x0007
patwaittime 4 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB