07-17-2018 10:54 AM
I am new to FPGA and Mojo. What I am trying to do is generate a 20 MHz clock frequency from mojo and output it through an I/O pin and feed that signal to a function generator. I went through Spartan-6 documentation on clocking, but I guess that was a bit heavy. Are there any other resources online on how to do it? What is the best way to do that?
07-17-2018 01:13 PM
Let's start with two important questions.
1. What clocks are going into your FPGA?
2. What kind of signal does your function generator require? What voltage level? How is it terminated (50 ohms or high impedance)?
07-17-2018 08:05 PM
1. The default clock is 50 MHz, but I am currently using a 150 MHz clock from FPGA for my project.
2. I need a pulse from my signal generator. I normally work around 3V -3.5V, and it is terminated by 50 Ohms impedance.
07-17-2018 09:01 PM
By going though your initial post for generation of 20 MHz signal, use a clocking wizard IP in the Tool. Generate the 20 MHz. This signal can be send through IO. I did not understand the second post, you need to receive a pulse?
Following screen shot may help you.
07-18-2018 07:31 AM - edited 07-18-2018 07:33 AM
Thank you for the screenshot. I need square pulses from the function generator.
I am using Coregen from Mojo's IDE, which I think is pretty much the same things as the one in ISE.
So, I did generate a 20 MHz clock using Coregen. Now, in my Mojo IDE, there is the core that I generated. Now, how do I ouput this signal through one of the I/O pins in my Mojo? Thank you again.
I have attached the .txt file for the verilog code generated by coregen.
07-18-2018 04:43 PM
To help, we need to know what kind of signal your function generator expects as an input, not what you want to get out of the function generator. Does it expect a square wave clock or a sine wave reference? What voltage range should the signal have? Is the function generator's input terminated in 50 ohms?
What is the output circuit of the Mojo? Does the FPGA drive the connector pins directly or does the signal go through another chip? What kind of connector is on the Mojo? Does the function generator have a BNC connector or something else?
07-19-2018 07:01 AM
Hi, the function generator expects a square wave pulse as an input (anywhere around 5V should be fine). And yes, I think its input is terminated at 50 ohms.
I am pretty sure that the FPGA drives the connector I/O pins directly and the way I am thinking about taking an output signal is to plug a 2 pin female BNC connector on the I/O pins of the mojo which is then connected to the generator by a BNC cable.
07-19-2018 07:49 AM
The maximum IO voltage for a Spartan 6 is 3.3V and that's if the VCCO for the bank driving the signal is powered by 3.3V. I don't have a copy of the S6 select IO users guide handy, but I think the most a pin can source or sink is 24mA. 5 volts into 50 ohms is 100 mA. If the function generator can run on a 3.3V input and your VCCO is 3.3V, you might be able to make this work if you gang a few (4 to 6) outputs together and set the drive strength to 24 mA. You may exceed the simultaneously switching outputs recommendation, (or not) but it might work.
08-15-2018 03:56 AM