新人求问

[复制链接]
4374|1
 楼主| jujishoudong 发表于 2010-10-28 23:58 | 显示全部楼层 |阅读模式
AN, TI, edge, ge, os
本帖最后由 jujishoudong 于 2010-10-29 12:43 编辑

刚开始学Verilog,写的简单的一个testbench有错误,请教各位
`timescale 10ns/100ps
`include "and1.v"
and1  dd(a,b,c);
module tt;
  reg  clk,a,b;
  output c;
  initial  
    begin
      clk=0;
      a=1;
      b=0;
    end
    always  #10 clk=~clk;
    [email=always@(posedge]always  @(posedge[/email] clk)
      begin
       #2 a={$random}%2;
       #10  b={$random}%2;
      end      
  endmodule
错误提示:near "and1": syntax error, unexpected "IDENTIFIER", expecting "class"
岚369 发表于 2011-5-14 19:58 | 显示全部楼层
语法错误
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

5

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部