Hi, my device consists of MCU, MAX V CPLD and sensor device. MAX V CPLD is used to interface sensor to MCU. I have a code in VHDL for MAX V CPLD: entity Device is
port (
clk16: in std_logic...
Hi,
May I know if there is any reason that you are putting the "Start" as bidirectional? Will there be any issue if you are driving '0' and the MCU is driving '1'? I think there is some issue on the implementation where you are not implementing it correctly in your design. The other thing is that you are waiting for "Start" to be '0' before you drive it to '0'. I do not think that Quartus is synthesis the code correctly as there will be a confusion here.
Let me explain the start signal (for now I renamed it start/finished as it better describes it purpose).
Here is schematic:
Normally, no chip is pulling the line low - both chips sets the pin with start/finished line to high impedance input. When MCU wants CPLD to start its job it configures start/finished pin to output and writes 0 to it (pulls it low) for at least one clock period so the CPLD is able to catch that. CPLD detects this "start condition" and pulls the line low also to tell MCU that it is working. When the job is done, it again configures start/finished pin to high impedance input which means rising edge will happen on the line (as no chip is pulling it low) which can be detected by MCU...
If what I have written can't be implemented in CPLD then that is good news for me as it means the problem is solved. I can move start <= '0'; to the next state (that happens just one clock period after, that is perfectly OK) and extend MCU's start pulse to 2 clock periods (so there is no rising edge meaning false job done). But of course, I would like to be sure that this is the problem.