Verilog 存储器输出总是编译报错?有那位专家帮我指导小弟一下?

QuartusII错误提示如下:Error(10137):VerilogHDLProceduralAssignmenterroratcommunication.v(43)... Quartus II 错误提示如下:Error (10137): Verilog HDL Procedural Assignment error at communication.v(43): object "special_data" on left-hand side of assignment must have a variable data type

/*
*
* File name: communiction.v
* File description: PC with CPLD send and receive data frame to execute funtion
* Operating environment: QUARTUS II 9.0,MaxII EPM1270T144C5N
*
* This version: 1.0
* Author: wangdaojin(wangdaojin98462@163.com)
* Previous Author: none
* Complete date:
*
*/
module comunication (
input DS,
input[7:0] UsbData,
output[7:0] special_data,
output[7:0] function_data,
output[7:0] address_data,
output[7:0] operation_data1,
output[7:0] operation_data2,
output[7:0] operation_data3,
output[7:0] operation_data4,
output[7:0] operation_data5
);
reg startCnt;
reg[3:0] ReceiveCount;
reg[7:0] mem1[3:0];

always @ (negedge DS) begin
if(ReceiveCount <= 4'h07)
begin
mem1[ReceiveCount]<= UsbData[7:0];
ReceiveCount <= ReceiveCount+1;
end
else
begin
if(ReceiveCount == 4'h07)
begin
startCnt <= 1'b1;
ReceiveCount <= 4'h00;
special_data <= mem1[0];
end
else ReceiveCount <= 4'h00;
end
end

always @ (posedge startCnt)
begin
function_data <= mem1[1];
address_data <= mem1[2];
operation_data1 <= mem1[3];
operation_data2 <= mem1[4];
operation_data3 <= mem1[5];
operation_data4 <= mem1[6];
operation_data5 <= mem1[7];

startCnt <= 1'b0;
end

endmodule
展开
 我来答
来自大游山正直的琥珀
2010-09-14
知道答主
回答量:18
采纳率:0%
帮助的人:7万
展开全部
special_data 定义时再加个reg啊,
写句reg [7:0] special_data;就行了。。
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式