inout reg [15:0] Fsmc_data;
reg id_temp;
always @(negedge Fsmc_NOE or negedge rst_n)
begin
case ({Fsmc_addr, Fsmc_NBL0, Fsmc_NBL1, Fsmc_NE3, Fsmc_NOE, Fsmc_NWE})
13'b0000111100001:
begin //addr=0x6800000F NBL=0 NE3=0 NOE=0 NWE=1 read
id_temp <= ~id_temp;
Fsmc_data <= {id_temp,11'b0,id};
end
13'b0001000000001:
begin //addr=0x68000010 NBL=0 NE3=0 NOE=0 NWE=1 read
Fsmc_data <= 16'h5a5a;
end
default: begin
Fsmc_data <= Fsmc_data;
id_temp <= id_temp;
end
endcase
end
如上,这段逻辑,目前要实现的是 NOE下降沿状态下,Fsmc_data的数据高位翻转一次,但实际功能不对,不知道是哪里问题,麻烦大神帮忙看看。
你写一个testbench,仿真一下,不就很简单的事情吗?