最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Q3a: FSM

2023-08-29 15:47 作者:lljjggxx  | 我要投稿

Q3a: FSM

https://hdlbits.01xz.net/wiki/Exams/2014_q3fsm

module?top_module?(

????input?clk,

????input?reset,???//?Synchronous?reset

????input?s,

????input?w,

????output?z

);


????localparam?

????????A????=?3'd0,

????????B???=??3'd1,?

????????C???=??3'd2,

????????D???=??3'd3,

????????E???=??3'd4;


????reg?[2:0]?state,?next_state;


????reg?[2:0]?W_VA;

????

???always?@?(*)

????????case?(state)

????????????A:?next_state?=?s?B:A;

????????????B:?next_state?=?C;

????????????C:?next_state?=?D;

????????????D:?next_state?=?E;

????????????E:?next_state?=?C;

????????????default?next_state?=?A;

????????endcase


????always?@?(posedge?clk)

????????if?(reset)

????????????state?<=?A;

????????else

????????????state?<=?next_state;


????always?@?(posedge?clk)

????????case?(next_state)

????????????C:W_VA?<=?{2'b00,w}?;

????????????D:W_VA?<=?{W_VA[2],w,W_VA[0]};

????????????E:W_VA?<=?{w,W_VA[1:0]};

????????????default?W_VA?<=?3'b000;

????????endcase

????assign?z?=??next_state?==?C?&&?((W_VA==3'b011)??||?(W_VA==3'b101)?||?(W_VA==3'b110));?????

endmodule



Q3a: FSM的評論 (共 條)

分享到微博請遵守國家法律
腾冲县| 康定县| 昂仁县| 平远县| 上栗县| 彩票| 磴口县| 凌云县| 固镇县| 灌云县| 霍林郭勒市| 牟定县| 清苑县| 如皋市| 密云县| 海宁市| 柏乡县| 枞阳县| 筠连县| 兴义市| 仁布县| 集贤县| 阿克陶县| 麟游县| 景洪市| 巴中市| 西昌市| 宜州市| 新巴尔虎右旗| 和平县| 天柱县| 沧源| 塔河县| 山西省| 沾益县| 九江县| 昌都县| 鹿泉市| 萨嘎县| 天峨县| 菏泽市|