I'm writting a code and I have 2 dumb questions:
1- Is it a bad practice to use "initial" in the module description?
I'm asking this because I have a frequency divider with 2 signals (clk_in and clk_out). If I want to see the behaviour in simulation, I have to give an initial value to clk_out, otherwise clk_out will always keep as X. Then, I used "initial" instead of using a reset signal.
2- Why the code without initializing the output works fine in the FPGA but it doesn't in simulation?
My code basically do this: Clk_out <= ~Clk_out;
Thanks in advance.
No comments:
Post a Comment