关于verilog数组赋值问题
求大神指点:部分代码如下:always@(posedgeCLK)if(data_en)FIFO_data1<=mem[j];elseFIFO_data1<=8'bz;al...
求大神指点:部分代码如下:
always @(posedge CLK) if(data_en) FIFO_data1<=mem[j]; else FIFO_data1<=8'bz; always @(posedge CLK) if(data_en&&(j<1023)) j<=j+1; else j<=0; always @(posedge CLK) begin if(count1<24'd1023) begin mem[i]<=FIFO_data; count1<=count1+1; i<=i+1; data_en<=0; end else begin data_en<=1; i<=0; count1<=2000; end end FIFO_data1的输出应该为mem当中的值,起码应该是8位啊,为何出现下面的情况; 展开
always @(posedge CLK) if(data_en) FIFO_data1<=mem[j]; else FIFO_data1<=8'bz; always @(posedge CLK) if(data_en&&(j<1023)) j<=j+1; else j<=0; always @(posedge CLK) begin if(count1<24'd1023) begin mem[i]<=FIFO_data; count1<=count1+1; i<=i+1; data_en<=0; end else begin data_en<=1; i<=0; count1<=2000; end end FIFO_data1的输出应该为mem当中的值,起码应该是8位啊,为何出现下面的情况; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |