- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why run into the following test results inaccurate?
//first p module real_number; parameter a=1.2; parameter b=1.5; assign c=a+b; initial begin $display ("result is:",c); # 10 $finish; end endmodule result: x but when running the program: module real_number; parameter a=1.2; parameter b=1.5; //assign c initial begin $display ("result is:",a+b); # 10 $finish; end endmodule we obtain accurate results: 3.7 if you want to write the program first, then how to write? thanks!!!Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page