changcomeon 发表于 2010-10-5 19:31:27

求助!

module TSL(a,b,cs,L);
   input a,b,cs;
        output L;
        reg L;
        if(cs)
   and and1(L1,a,b);
        not not1(L,L1);
        else
        L=1'bz;
        endmodule
这个代码哪里有问题啊?
ERROR:HDLCompilers:26 - "TSL.v" line 26 expecting 'endmodule', found 'if'

chenliang1116 发表于 2010-10-6 19:33:24

if语句后面超过1条语句以上需要加begin-end加以顺序执行!
页: [1]
查看完整版本: 求助!