在电机反馈中有2个正交信号a、b。现在希望用cpld输出C,频率是原来2倍。
比如:
a __|¯¯|__|¯¯|__|¯¯
b ¯|__|¯¯|__|¯¯|__|¯
c _|¯|_|¯|_|¯|_|¯|_|¯|_
可不可以这样:
always @(a or b)
c=~c;
还是:
not gate1(a1,a);
not gate2(b1,b);
and gate3(c1,a,b);
and gate4(c2,a1,b1);
or gate5(c,c1,c2);