结构推理 用ISP技术设计一个巴克码信号发生器,要求自动产生周期性的111010序列。用ABEL-HDL语言写出设计源文件。
【正确答案】module buk CLK,RST pin; Q0..Q2 pin istype 'reg'; OUT pin Q=[QO..Q2]; S0=[0,0,0]; Sl=[0,0,1]; S2=[0,1,0]; S3=[0,1,1]; S4=[1,0,0]; S5=[1,0,1]; S6=[1,1,0]; X=.X. state_diagram Q state S0: if RST= =0 then Sl with OUT=1; else S0; state Sl: if RST= =0 then S2 with OUT=1; else S0; state S2: if RST= =0 then S3 with OUT=1; else S0; state S3: if RST= =0 then S4 with OUT=0; else S0; state S4: if RST= =0 then S5 with OUT=0; else S0; state S5: if RST= =0 then S6 with OUT=1; else S0; state S6: if RST= =0 then S0 with OUT=0; else S0; equations Q.c=CLK; end
【答案解析】