| 查看: 706 | 回复: 2 | |||
[交流]
【求助】初学者,求大神们看下这段简单的verilog代码 【已解决】 已有2人参与
|
|
初始输出out为0 我是想在20个时钟上升沿之后让out为1 要求使用repeat语句 module add_delay20(out,clock); output reg out; input clock; integer count; initial begin out=1'b0; counter=1; repeat(20) begin always@(posedge clock) count=count+1; end out=1'b1; end endmodule 初试,轻拍 ![]() Error (10170): Verilog HDL syntax error at add_delay20.v(11) near text "always"; expecting "end" 终于搞对了!!!! module add_delay20(out,clock); output reg out; input clock; integer count; initial out=1'b0; initial begin count=1; repeat(20) @(posedge clock) count=count+1; out=1'b1; end endmodule ![]() 真不容易哈哈哈开心![]() [ Last edited by rosary on 2010-11-5 at 10:46 ] |
» 猜你喜欢
系统今天又提示维护了,估计离放榜不远了
已经有5人回复
这个自发加氧反应的机理是什么?
已经有7人回复
J-J-W不为人知的一面
已经有19人回复
没消息就是被刷了呗
已经有14人回复
微信指数没变化,科研之友没阅读
已经有8人回复
时间戳他又来了
已经有12人回复
这种情况还有戏吗
已经有11人回复
同事接到电话了,我却没有
已经有4人回复
准备明年的基金了
已经有5人回复
今年的WR进展到哪一步了?
已经有6人回复

yalefield
金虫 (文坛精英)
老汉一枚
- 应助: 129 (高中生)
- 贵宾: 0.17
- 金币: 21238.9
- 散金: 3440
- 红花: 66
- 帖子: 12101
- 在线: 759.1小时
- 虫号: 96063
- 注册: 2005-10-07
- 专业: 高等教育学
- 管辖: 计算模拟
2楼2010-11-04 16:54:06

3楼2010-11-04 19:09:59














回复此楼