集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 1826|回复: 1

求高手帮助 谢谢

[复制链接]
kaixglg 发表于 2011-10-25 10:59:07 | 显示全部楼层 |阅读模式
`include "muxtwo.v"
module t;
reg ain,bin,select;
reg clock;
wire outw;
initial
begin
ain=0;
bin=0;
select=0;
clock=0;
end
always #50 clock=~clock;
always @(posedge clock)
begin
#1 ain={$ random%}2;
#3 bin={$ random}%2;
end
always # 10000 select=!select;
muxtwo m(.out(outw),.a(ain),.b(bin),.sl(select));
endmodule
Error (10170): Verilog HDL syntax error at t.v(16) near text $
Error (10170): Verilog HDL syntax error at t.v(16) near text "$";  expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator
Error (10170): Verilog HDL syntax error at t.v(17) near text $
Error (10170): Verilog HDL syntax error at t.v(17) near text "$";  expecting an identifier, or a number, or a system task, or "(", or "{", or unary operator
Error (10112): Ignored design unit "t" at t.v(2) due to previous errors
Error: Quartus II Analysis & Synthesis was unsuccessful. 5 errors, 3 warnings
        Error: Peak virtual memory: 182 megabytes
        Error: Processing ended: Tue Oct 25 10:53:12 2011
        Error: Elapsed time: 00:00:06
        Error: Total CPU time (on all processors): 00:00:03错误在哪啊?
至芯兴洪 发表于 2011-10-28 13:41:55 | 显示全部楼层
行为模块是不可综合的,你这个是测试模块,$与random之间没有空格,多看看书,把基本的弄明白
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|集成电路技术分享 ( 京ICP备20003123号-1 )

GMT+8, 2024-5-10 10:47 , Processed in 0.069581 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表