I'm trying to write my own verilog custom IP in Vivado for interfacing with an AD7606 ADC (8 channels, 16 bits, simultaneous sampling). The basic idea of my timing diagram is as follows:
-Raise the CONVSTART pin from an EXTERNAL source (conversion will start on a positive edge)
[Verilog module starts in an IDLE state]
1.Wait for the negative edge of the "BUSY" input pin from the AD7606
2. Drop !CS (chip select) LOW
3. Drop !RD (read) LOW, wait at least 100 nanosec
4. Raise !RD high, read channel 1 result, wait a least 100 nanosec
[Repeat steps 3 and 4 seven more times to read channels 2 through 8]
5. Raise !CS high
I am making the above into a verilog state machine. I know that I need a clock (100MHz on my board) for the 100 nanosec delay states. My state machine STARTS with the negative edge of the BUSY input (step 2), but it also needs to accept the clock.
--> I don't think I can use both edges "always @(posedge clk)" and "always @(negedge BUSY)" to drive my state machine. How can I, somehow, combine these to trigger my state machine?
Question
rt54321
Greetings All!
I'm trying to write my own verilog custom IP in Vivado for interfacing with an AD7606 ADC (8 channels, 16 bits, simultaneous sampling). The basic idea of my timing diagram is as follows:
-Raise the CONVSTART pin from an EXTERNAL source (conversion will start on a positive edge)
[Verilog module starts in an IDLE state]
1.Wait for the negative edge of the "BUSY" input pin from the AD7606
2. Drop !CS (chip select) LOW
3. Drop !RD (read) LOW, wait at least 100 nanosec
4. Raise !RD high, read channel 1 result, wait a least 100 nanosec
[Repeat steps 3 and 4 seven more times to read channels 2 through 8]
5. Raise !CS high
I am making the above into a verilog state machine. I know that I need a clock (100MHz on my board) for the 100 nanosec delay states. My state machine STARTS with the negative edge of the BUSY input (step 2), but it also needs to accept the clock.
--> I don't think I can use both edges "always @(posedge clk)" and "always @(negedge BUSY)" to drive my state machine. How can I, somehow, combine these to trigger my state machine?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.