moyanqd 发表于 2013-8-15 09:59:42

照书上抄的程序不能综合!,大家帮忙看看

module wireExample (BpW,Error,Wait,Valid,Clear);
        input Error,Wait,Valid,Clear;
        output BpW;
        wire BpW;
       
        assign BpW = Error & Wait;
        assign BpW = Valid | Clear;
       
endmodule

错误信息如下

Info: *******************************************************************
Info: Running Quartus II 32-bit Analysis & Synthesis
        Info: Version 12.0 Build 178 05/31/2012 SJ Full Version
        Info: Processing started: Thu Aug 15 09:53:34 2013
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off wireExample -c wireExample
Info (20030): Parallel compilation is enabled and will use 2 of the 2 processors detected
Error (10170): Verilog HDL syntax error at wireExample.v(8) near text "wire";expecting an identifier ("wire" is a reserved keyword )
Error (10112): Ignored design unit "wireExample" at wireExample.v(1) due to previous errors
Info (12021): Found 0 design units, including 0 entities, in source file wireexample.v
Error: Quartus II 32-bit Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings
        Error: Peak virtual memory: 260 megabytes
        Error: Processing ended: Thu Aug 15 09:53:35 2013
        Error: Elapsed time: 00:00:01
        Error: Total CPU time (on all processors): 00:00:01

moyanqd 发表于 2013-8-15 10:23:44

自己根据错误的理解找到了根源是信号只能在一个进程里驱动,如下两句被多个驱动了,可怎么改写程序呢,我刚学FPGA
assign BpW = Error & Wait;
assign BpW = Valid | Clear;

深海烟花 发表于 2013-8-15 11:07:34

assign Bpw = (Error & Wait )| valid | clear;

moyanqd 发表于 2013-8-15 11:17:22

深海烟花 发表于 2013-8-15 11:07 static/image/common/back.gif
assign Bpw = (Error & Wait )| valid | clear;

多谢,错误没有了,RTL图如下

moyanqd 发表于 2013-8-15 11:19:00

深海烟花 发表于 2013-8-15 11:07 static/image/common/back.gif
assign Bpw = (Error & Wait )| valid | clear;

可原图是这样的

moyanqd 发表于 2013-8-15 11:21:06

深海烟花 发表于 2013-8-15 11:07 static/image/common/back.gif
assign Bpw = (Error & Wait )| valid | clear;

这样改是没有了错了,可与原来的意图不一致了,你看怎么弄?

y595906642 发表于 2013-8-15 11:21:44

不同综合器综合结果不同太正常了
但是实现的功能是一样的

moyanqd 发表于 2013-8-15 11:25:03

是不是像图1-6这样的接法,好像本来就不能综合?

深海烟花 发表于 2013-8-15 11:25:39

moyanqd 发表于 2013-8-15 11:21 static/image/common/back.gif
这样改是没有了错了,可与原来的意图不一致了,你看怎么弄?

assign Bpw = (Error & Wait )| (valid | clear); 加个括号试一试。

门前榕树Z 发表于 2013-8-15 11:58:28

这个本来就不可以综合的啊。乖乖 Bpw=error&wait Bpw = valid | clear,这怎么实现嘛?要是这两个门出来的结果不同一个‘1’,一个‘0’,那Bpw到底等于什么?这个是不能综合的。

moyanqd 发表于 2013-8-15 11:58:40

深海烟花 发表于 2013-8-15 11:25 static/image/common/back.gif
assign Bpw = (Error & Wait )| (valid | clear); 加个括号试一试。

加了括号和原来一样,

moyanqd 发表于 2013-8-15 12:16:52

门前榕树Z 发表于 2013-8-15 11:58 static/image/common/back.gif
这个本来就不可以综合的啊。乖乖 Bpw=error&wait Bpw = valid | clear,这怎么实现嘛?要是这两个门出来的 ...

现在我也是这么想的,此书误人

moyanqd 发表于 2013-8-15 12:32:01

大家推荐几本FPGA入门的书籍吧

moyanqd 发表于 2013-8-15 16:52:06

找到理论依据了,依据来源 《Verilog数字系统设计教程(第2版)》
页: [1]
查看完整版本: 照书上抄的程序不能综合!,大家帮忙看看