找回密码
 注册
搜索
查看: 656|回复: 1

[讨论] 问一个弱问题(关于测试文件)

[复制链接]
发表于 2006-10-24 17:25:11 | 显示全部楼层 |阅读模式
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date:   15:38:43 10/24/2006
// Design Name:   mpsk
// Module Name:   test.v
// Project Name:  test4
// Target Device:  
// Tool versions:  
// Description:
//
// Verilog Test Fixture created by ISE for module: mpsk
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module test_v;
// Inputs
reg clk;
reg start;
reg datein;
// Outputs
wire dateout;
// Instantiate the Unit Under Test (UUT)
mpsk uut (
  .clk(clk),
  .start(start),
  .datein(datein),
  .dateout(dateout)
);
initial begin
  // Initialize Inputs
  clk = 0;
  start = 0;
  datein = 0;
  // Wait 100 ns for global reset to finish
   
    always #10 clk=~clk;
     //上面这句话编译时为啥会报错?我的modelsim版本是6.1b,软件装的有问题,还是出弱智错误了
  //# ** Error: G:/cyProject/test4/test.v(51): near "always": syntax error, unexpected "always"

// Add stimulus here
   #10 start<=1;
   #60  datein<=1;
   #40  datein<=0 ;
   #20  datein<=1;
   #40  datein<=0;   
end   
      
endmodule
 楼主| 发表于 2006-10-24 17:26:59 | 显示全部楼层
`timescale 1ns / 1ps

////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date:   15:38:43 10/24/2006
// Design Name:   mpsk
// Module Name:   test.v
// Project Name:  test4
// Target Device:  
// Tool versions:  
// Description:
//
// Verilog Test Fixture created by ISE for module: mpsk
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////

module test_v;

        // Inputs
        reg clk;
        reg start;
        reg datein;

        // Outputs
        wire dateout;

        // Instantiate the Unit Under Test (UUT)
        mpsk uut (
                .clk(clk),
                .start(start),
                .datein(datein),
                .dateout(dateout)
        );

        initial begin
                // Initialize Inputs
                clk = 0;
                start = 0;
                datein = 0;

                // Wait 100 ns for global reset to finish
          
    always #10 clk=~clk;
//上面这句话编译时为啥会报错?我的modelsim版本是6.1b,软件装的有问题,还是出弱智错误了
  //# ** Error: G:/cyProject/test4/test.v(51): near "always": syntax error, unexpected "always"[/COLOR]

      //
                // Add stimulus here
          #10 start<=1;
          #60  datein<=1;
          #40  datein<=0 ;
          #20  datein<=1;
          #40  datein<=0;   
        end   
      
endmodule
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-9-29 16:24 , Processed in 0.045963 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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