Synthesis results and different behavior
I made an SPI interface circuit, but the SCLK output is always 'H' and it doesn't work.
It would be helpful if you could give me some hint to solve it.
The survey results are as follows.
1) MOSI and NCS are output normally.
2) Circuits are generated in Technology Map Viewer.
3) It becomes 'H' immediately after configuration is completed, and does not become 'L' even if a reset signal is input.
I will attach the source of the relevant part and the image of Technology Map Viewer, so it would be helpful if you could give me some hints.
In addition, there is "SCLR" in the FF of s_sclk in image1.png, but is it correct to understand that when this is asserted, it synchronizes with CLK and Q = 'L'?
Sorry for the inconvenience, but thank you in advance.
1) Yes. There are many VHDL attributes like this. Just googled this: https://redirect.cs.umbc.edu/portal/help/VHDL/attribute.html
2) Not sure what you mean here, but if your clock is not coded correctly, then nothing is going to work correctly because it will never get to the if checks.
3) rising_edge is part of std_logic, so as long as you're using that library, it will work and is recommended.