verilog程序出错 求大神们指导啊
module vga_csm_pb(clk_i,req0_i,ack0_o,adr0_i,dat0_i,dat0_o,we0_i,req1_i,ack1_o,adr1_i,dat1_i,dat1_o,wel_i);parameter DWIDTH=32;
parameter AWIDTH=8;
input clk_i;
inputadr0_i;
inputdat0_i;
output dat0_o;
input we0_i;
input req0_i;
outout ack0_o;
inputadr1_i;
inputdat1_i;
output dat1_o;
input we1_i;
input req1_i;
output ack1_o;
wire acc0,acc1;
reg dacc0,dacc1;
wire sel0,sel1;
reg ack0,ack1;
wire mem_q;
assign acc0=req0_i;
assign acc1=req1_i && !sel0;
always@(posedge clk_i)
begin
dacc0 <= #1 acc0 & !ack0_o;
dacc1 <= #1 acc1 & !ack1_o;
end
assign sel0 = acc0 && !dacc0;
assign sel1 = acc1 && !dacc1;
always (posedge clk_i)
begin
ack0 <=#1 sel0 && !ack0_o;
ack1 <=#1 sel1 && !ack1_o;
end
wiremem_adr=sel0 ? adr0_i : adr1_i;
wiremem_d=sel0 ? dat0_i : dat1_i;
wire mem_we =sel0 ? req0_i && we0_i:req1_i &&we1_i;
generic_spram#(AWIDTH,DWIDTH)clut_mem(
.clk(clk_i),
.ret(1'b0),
.ce(1'b1),
.we(mem_we),
.oe(1'b1),
.addr(mem_adr),
.di(mem_d),
.do(mem_q)
);
assign dat0_o=mem_q;
assign dat1_0=mem_q;
addign ack0_o=((sel0 && we0_i) || ack0 );
assign ack1_o=((sel1 && we1_i) || ack1 );
endmodule
以上是程序
line 31:vhdl syntax error:found illegal character '@‘
line 33:vhdl syntax error:found illegal character '#‘
line 34:vhdl syntax error:found illegal character '#‘
line 43:vhdl syntax error:found illegal character '#‘
line 44:vhdl syntax error:found illegal character '#‘
line 48:vhdl syntax error:found illegal character '?
line 49:vhdl syntax error:found illegal character '?
line 50:vhdl syntax error:found illegal character '?‘
line 52:vhdl syntax error:found illegal character '#‘
line 54:charater literal "b" must be terminated with an apostrophe
line 55:charater literal "b" must be terminated with an apostrophe
line 57:charater literal "b" must be terminated with an apostrophe 你的文件后缀名是?? 你的文件后缀名是?? 可能是书写的格式不正确。 错误31:在always后要加上“@”符号
错误33,34,43,44,52:意思#非法,在综合模块中不能用“#”符号,次符号 在测试模块中使用
acko_o端口类型应该是inout吧!哪有outout类型啊!输入信号input定义成wire型,寄存器定义成reg型
组合逻辑ASSIGN 变量定义成wire型 使用格式为 assign=a?b:c;
注意书写风格。你的程序很乱,别人都不知道你在写些什么,当写完代码好好检查,首先在通过仿真在做综合,严格按照步骤来;
建议,好好把夏老师书后面的例题一个一个的好好做做,你的进步会很快的
加油 语法错误比较多 ,估计是不仔细
页:
[1]