在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 3246|回复: 4

[讨论] VCS syntax error

[复制链接]
发表于 2018-2-1 05:22:03 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
in my design folder I have these verilog files:bandrate_generate.v  
ceshi_uart_test.v  
ceshi_uart.v  
uart_rx.v  
uart_tx.v

I used this command line to compile the test case:
vcs ceshi_uart.v bandrate_generate.v uart_rx.v uart_tx.v ceshi_uart_test.v -y . +libext.+v

and got error message:
Error-[SE] Syntax error
  Following verilog source has syntax error :
  "bandrate_generate.v", 5: token is 'module'
  module bandrate_generate ( input clk, input rst_n, input [1:0] state, output
  band_tick);
        ^
bandrate_generate
/*
* file name: bandrate_generate.v
* module bandrate_generate #(parameter bandrate = 9600) (
*/
module bandrate_generate ( input clk, input rst_n, input [1:0] state, output band_tick);
//此处initial语句是可以综合的,因为是预先计算的。
/************* initial the bandrate *******************/

2 warnings
1 error
cpu time: 1.168 seconds to compile


and the bandrate_generate.v read like this:
line 5:
module bandrate_generate ( input clk, input rst_n, input [1:0] state, output band_tick);

#------------------------------------------------#
I don't understand what did it complain. I failed to see anything wrong with the line 5

Please help
发表于 2018-2-2 14:17:35 | 显示全部楼层
bandrate_generate的完整代码能否贴一下?可以发图片。
发表于 2018-2-2 22:53:24 | 显示全部楼层
回复 1# xiaoyisimonguo


   有没有加endmodule?
发表于 2018-2-4 20:13:58 | 显示全部楼层
endmodule加了吗?另外vcs是否添加了支持verilog2005命令?
发表于 2023-1-9 15:53:34 | 显示全部楼层
遇到了这个问题,有个看法是,不一定实在module的地方有语法错误。可能是编译这文件之前的错误。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-5-6 22:33 , Processed in 0.020561 second(s), 6 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表