小程序求教

2019-03-25 09:53发布

module count4(clk,reset,out);
  input clk,reset;
  output [3:0]out;
  reg [3:0]out;
  wire clk,reset;
  always @(posedge clk)
  begin
         if(reset)  out<=4'b0000;
         else out<=out+4'b0001;
  end
endmodule //'include "count4.v"; module count4_tp;
  reg clk,reset;
  wire out;
  parameter DELY=200;
  initial #DELY clk=0;
  initial #DELY reset=0;
  count4 mycount(.clk(clk),.reset(reset),.out(out));
  always #DELY clk=~clk;
endmodule 为什么out没有输出啊??? 还有就是 为什么'include 这个不能用?用的时候有这样的错误提示:* Error: E:/Wordspace/work/count4/count4_tp.v(1): near "'i": Illegal base specifier in numeric constant.
** Error: E:/Wordspace/work/count4/count4_tp.v(1): near "'i": syntax error, unexpected "BASE", expecting "class"
求高手指教!!!
  此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
18条回答
panzhonghb
1楼-- · 2019-03-27 08:42
include前面的'改为`试试看
leomeng
2楼-- · 2019-03-27 08:59
 精彩回答 2  元偷偷看……
jjkwz
3楼-- · 2019-03-27 09:49
看过您的回复感受到您是FPGA的高手啊,真的是厉害,以后有问题就过来请教您了!
eeleader
4楼-- · 2019-03-27 12:09

一起学习!

常见泽1
5楼-- · 2019-03-27 15:22
楼主最近研究的不少啊 随处可见身影
leomeng
6楼-- · 2019-03-27 16:42
不懂就的问 不懂就的学 每天进步一点点  点水可穿石

一周热门 更多>