打印
[verilog]

FSM問題請教

[复制链接]
656|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
syuan08|  楼主 | 2016-12-1 17:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我想要利用FSM寫一個電路,但不知道怎麼寫!
想請各位幫幫忙~
Module name         my_controller
Signal                Direction        Description
clk                         input        System clock
rst_n                  input                reset signal, active low
mc_din[27:0]         input        input raw data
mc_op[3:0]         input        input operation        (instruction)
mc_din_rdy         input        input data ready
ns_ack                 input        The next stage acknowledgement        signal
mc_dout[27:0]         output        output data
mc_dout_rdy         output        output data ready to next stage
mc_surplus [1:0]         output        data transfer surplus
mc_full                 output        current stage full signal to preceding stage

功能需求:
FSM將根據mc_op [3:0]處理輸入數據mc_din [27:0]。
有關輸入數據的四種可能的操作:移位,補碼,補碼和忽略。
接下來將重複或更改的輸出數據由mc_op [1:0]控制。
FSM將產生這些控制信號以控制數據存儲觸發器。
您將需要一個階段管道來存儲處理的輸入數據。
另一方面,如果數據存儲已滿,您的FSM還會向您的前一級產生完整信號以保持輸出數據,並生成到下一級的就緒信號(mc_dout_rdy),以通知它輸出數據已準備就緒,直到下一級確認(ns_ack )。

operation function table
mc_op[3:2](decide the result )                mc_op[1:0]        (control repeat)
00: input data shift 1 bit right                00: output the “input raw data” 1 time
01: do 1’s complement                         01: output the “input raw data” 1 time and “result data” 1 time
10: do 2’s complement                                10: output the “input raw data” 1 time and “result data” 2 times
11: ignore the input data , (no output)
mc_op[1:0] function is also ignoredclk.        11: output the ” input raw data” 1 time and “result data” 3 times


相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

1

帖子

0

粉丝