-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmattest.mat
87 lines (70 loc) · 1.26 KB
/
mattest.mat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
pinmaps
{
cs:DIO2,
clk:DIO1,
enable:DIO5
}
pingroups
{
pgroup0 : DIO11,DIO22,DIO33,DIO44;
pgroup1 : DIO85,DIO94,DIO84,DIO83;
pgroup2 : DIO55,DIO66,DIO77,DIO88
}
timeset
{
tset0 : 10.555 s;
tset1 : 0.00000002 s
}
voltagelevels
{
cs : vil=0.0,vih=3.3,vol=1.6,voh=1.7,vtermm=2.0;
pgroup0 : vil=0.0,vih=3.3,vol=1.6,voh=1.7,vterm=2.0
}
/*
multi-line comment -> skipped
*/
//single line comment -> skipped
def functionwhatever123 ()
{
timeset tset0 ;
set cs=0,clk=1,pgroup0=0010;
read cs,clk;
if cs=1,clk=0
{
set cs=1,clk=0;
if cs=1,clk=0
{
read cs,clk;
}
}
else{
set enable=1;
}
if cs=1,clk=0{
read cs,clk;
}
goto label_example;
inc pgroup0,1:0110;
label_example:
dec pgroup1,1100:0010;
}
def main ()
{
timeset tset1 ;
repeat 16 : set cs=1,clk=0;
//set cs=1,clk=0;
functionwhatever123();
loop 1125
{
set cs=1,clk=0;
set cs=0,clk=1;
loop 11
{
set enable=1,cs=0;
}
}
while cs=1,clk=1
{
set cs=0,clk=0,pgroup0=0000;
}
}