# ** Error: D:/ModelSim PE Student Edition/examples/count1.v(8): 'noout' already exists; must not be redefined as a generate block
# ** Error: D:/ModelSim PE Student Edition/examples/count1.v(8): near "=": syntax error, unexpected '='
这是两个错误,我的程序很简单,是一个计算一组二进制数中1的数目的程序,如下:
module count1s(noin,noout);
input noin;
output noout;
wire[8:1] noin;
reg[3:1] noout;
begin:
noout=0;
while(noin)
begin
if(noin[1])
begin
noout=noout+1;
noin=noin>>1;
end
end
end
本人是新手,非常菜,望不吝赐教。
modelsim的简单错误
答案:2 悬赏:30
解决时间 2021-02-22 07:14
- 提问者网友:浪女天生ˇ性情薄
- 2021-02-21 08:47
最佳答案
- 二级知识专家网友:不羁的心
- 2021-02-21 09:46
改成下面这样就不会错了:
module count1s(noin,noout);
input[8:1] noin;
output[3:1] noout;
reg[3:1] noout;
always@(noin)
begin
noout=0;
while(noin)
begin
if(noin[1])
begin
noout=noout+1;
noin=noin>>1;
end
end
end
endmodule
module count1s(noin,noout);
input[8:1] noin;
output[3:1] noout;
reg[3:1] noout;
always@(noin)
begin
noout=0;
while(noin)
begin
if(noin[1])
begin
noout=noout+1;
noin=noin>>1;
end
end
end
endmodule
全部回答
- 1楼网友:心与口不同
- 2021-02-21 10:24
一般的解决版本是:
1.到网上下载一个破解工具,将系统时间调到2009或者2008等,然后生成一个破解的license,一般名称是license.lic或者license.dat。
2.在我的电脑->属性->高级->环境变量->administrator的环境变量->新建:创建一个环境变量名称lm_license_file,值就是你存放license文件的路径例如d:\program files\modelsim\license.dat具体路径怎么写看license的存放位置。
3.将系统调回正常时间。
你一般下载破解工具的时候都有详细的使用方法。如果还是不能解决问题继续联系
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯