Forum Discussion
Altera_Forum
Honored Contributor
10 years agoThe difference between simulation and reality and warning (332060)
Hello, i am writing to you because i have some differences between simulation and reality. Before I start to write about warning mentioned above, I would like to tell about symptoms. I assign ...
Altera_Forum
Honored Contributor
10 years agoInitial value assignments in (reg [5:0] init= 6’d32; ) will not synthesize. If you need to initialize a register, use reset pin and assign its initial value when that reset activates.
For your example, try the following code: output [5:0] out; reg [5:0] init; assign init = 6’d32; assign out=init; The output will be 6'd32 constantly. For clock constraining, you should consider the worst case frequency of your switch and define a clock with the highest frequency which may occur. Keep in mind however that this is NOT a good practice. Instead use synchronous sampling of the switch using a sufficiently high speed clock source.