请各位大神们帮帮忙,用的是quartus ii 9.0 写verilog代码,在编译的时候,老出现下面两个问题:
Error(10500):VHDLsyntaxerroratfifomem.vhd(1)neartext"module";expecting"entity",or"arc...
Error (10500): VHDL syntax error at fifomem.vhd(1) near text "module"; expecting "entity", or "architecture", or "use", or "library", or "package", or "configuration"
Error (10500): VHDL syntax error at fifomem.vhd(13) near text @
代码如下所示:
module fifomem(rdata,wdata,waddr,raddr,wclken,wclk,wfull);
parameter DATASIZE=8;
parameter ADDRSIZE=4;
parameter DEPTH=1<<ADDRSIZE;
output [DATASIZE-1:0] rdata;
input [DATASIZE-1:0] wdata;
input [ADDRSIZE-1:0] waddr,raddr;
input wfull,wclken,wclk;
reg [DATASIZE-1:0] MEM [0:DEPTH-1];
assign rdata=MEM[raddr];
always@(posedge wclk) begin
if(wclken && !wfull) MEM[waddr]<=wdata;
end
endmodule 展开
Error (10500): VHDL syntax error at fifomem.vhd(13) near text @
代码如下所示:
module fifomem(rdata,wdata,waddr,raddr,wclken,wclk,wfull);
parameter DATASIZE=8;
parameter ADDRSIZE=4;
parameter DEPTH=1<<ADDRSIZE;
output [DATASIZE-1:0] rdata;
input [DATASIZE-1:0] wdata;
input [ADDRSIZE-1:0] waddr,raddr;
input wfull,wclken,wclk;
reg [DATASIZE-1:0] MEM [0:DEPTH-1];
assign rdata=MEM[raddr];
always@(posedge wclk) begin
if(wclken && !wfull) MEM[waddr]<=wdata;
end
endmodule 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询