|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 mariohi 于 2011-12-16 09:16 编辑
最近写了端状态机的程序,状态参数用的独热码,定义如下:
parameter[15:0]
IDLE =16'b0000000000000001,
READ_STATUS_CMD =16'b0000000000000010,
READ_STATUS_CMD_OVER =16'b0000000000000100,
REQ_DONE_JUDGE =16'b0000000000001000,
UNLOCK_BLOCK_CMD =16'b0000000000010000,
UNLOCK_BLOCK_CMD_OVER =16'b0000000000100000,
UNLOCK_BLOCK_DONE =16'b0000000001000000,
ERASE_BLOCK_CMD =16'b0000000010000000,
ERASE_BLOCK_CMD_OVER =16'b0000000100000000,
ERASE_BLOCK_DONE =16'b0000001000000000,
WRITE_WORD_CMD =16'b0000010000000000,
WRITE_WORD_CMD_OVER =16'b0000100000000000,
WRITE_WORD_DONE =16'b0001000000000000,
READ_WORD_CMD =16'b0010000000000000,
READ_WORD_CMD_OVER =16'b0100000000000000,
DATA_COMP =16'b1000000000000000;
不知为什么最后一个状态总是进入不了,好像忽略了,改成用二进制的就没问题,还有将=16'b0000000000000000,一下依次类推,也没问题。。。
神马情况??? |
|