applying stimulus to FPGA using PC - fpga

Is there any way I can apply stimulus signals on my FPGA board from my PC itself, and view the output of hardware in any simulation software? I am working on Spartan 3A development board provided by numato labs (elbert V2)
https://numato.com/product/elbert-v2-spartan-3a-fpga-development-board/
It is a relatively small board with few peripherals, so the number of LEDs for output and push-buttons for input is quite less.
I am a newbie to FPGAs but have sound knowledge on verilog. Please help me out with this
Thanks

The board does not have an physical interface intended for use as wired connection/communications (no ethernet, no usb, no uart, etc) to a PC.
These are the easiest ways I can think of for an 'elbert V2' board to communicate with a PC:
The board has a micro SD connector to access files on the micro SD interface. Those files could be accessed by a Verilog simulation.
A USB to UART adapter could be used with the boards GPIO interface.
Here is an example:
https://www.amazon.com/3-3V-UART-Serial-Cable-TTL-232R-3V3/dp/B078GMQPLT
The cable provides 3.3V TTL and the board has 3.3V gpio ports so that is encouraging. Probably just need to connect 3 wires tx/rx/ground.
You would need to design or find UART RTL IP for the FPGA.
Designing the UART would be a good intermediate level Verilog project.
Use procom or similar software on the PC to communicate with the USB/UART com port on the PC and a file. Verilog simulations can access the data in the file.

Related

USB Host Controller for DE10-Standard FPGA (Altera Cyclone V SoC)

I'm Looking for a USB Host Control to connect a USB Keyboard and PS gaming controller to control program functionallity (a game) done on FPGA.
I have built a simple game in VHDL on the DE10 platform, currently controllerd using a keboard connected to the PS/2 interface (and a VHDL controller I have found on-line). Looking to expand the gaming control by connecting a USB keyboard and PS gaming controller, but I can't figure out how to build to the USB host controller in VHDL/find an existing one.
Would appriciate to know if there are exiting USB host controllers in VHDL/BSF/BDF formarts I can use to connect USB devices and get decoded information, or am I in over my head.
Thanks!
You are not only far, far in over your head, but any USB interface will need an analogue section which your FPGA does not** have.
I know from experience that USB PHY-only chips are (almost?) impossible to get.
Also where would you run the USB protocol on? And are you planning to write a USB software stack? Unfortunately these things are not that simple.
I would guess the best option would be to make a VHDL UART interface connected to a USB <=> RS323 converter cable and plug that in a PC/Raspberry-Pi or something else with a keyboard.
**There are FPGAs with a USB PHY but they have the USB digital section too, as well as an on-chip processor.

How to connect multiple devices on avr(atmega16/32) using UART?

atmega 32 has only one (TX/RX) .In case of connecting many devices working with UART what should I do?....Arduino has something called software serial
Is it available in atmega 32 or how to establish it?
One may also use a multiplexer if the peripheral devices do not need to operate at the same time. This is a bit trickier to use due to baud rate changes and such but I have used this approach in one of my projects where I had a serial printer and some other devices which interfaced with the MCU via UART. The drivers for the said devices included calls to switch to the correct output on the multiplexer before communicating with the device.

Lattice iCE40 JTAG

I am new to FPGA and I am trying to get a working JTAG setup on Lattice iCE40 FPGA.
The board I'm using is from Olimex and has iCE40-HX8K FPGA.
I'm using urjtag as PC application and tried with DirtJTAG and USB Blaster clones as programmer (flashed onto STM32 BluePill board).
Olimex board didn't have populated pull-up resistors for JTAG so I soldered them (10k for TMS, TDI and TCK).
But the end result is the same: I cannot get jtag to recognize FPGA, the error is:
jtag> cable UsbBlaster
Connected to libftdi driver.
jtag> detect
warning: TDO seems to be stuck at 1
Checked pinout of the JTAG connector and it's correct. Multimeter tests show that there is no short-circuit, no solder bridges, pullups are correct value and working and as expceted.
Tried my setup with Altera FPGA board and it's working, it will detect the FPGA.
Also, tried eBay UsbBlaster clone and it's not working on iCE40, but works for Altera FPGA.
I can flash the external flash (with other tools and programmer), but I want to be able to use JTAG so I can flash onboard SRAM instead.
Any ideas/hints what might be wrong/what to try next?
iCE40 FPGAs do not have a JTAG interface.

how to have communication between uclinux installed on cortex-m3 and fpga

hi i have a fpga chip having cortex-m3 as hard-ip with it,i installed uclinux on cortex-m3 .
i wrote a c code which turns on 8 leds according to the number i give (it runs good on uclinux ) but now i want to give input number from c code on uclinux and transfer it to fpga ,then fpga will process on it and will glow the Leds,but i havn't find a way to do that(communication between uclinux and fpga).
for e.g. i can communicate with pendrive using uclinux cause i have the driver for it or i can write for any other device but how to show fpga circuit as device to uclinux,
one way i thought was as uclinux can access any address of cortex-m3 using pointers similarly i can do it for fpga ,but i don't understand how a digital circuit on fpga can have addresses.

Sasebo GII virtex5 fpga configuration

I am working with Sasebo GII board that has two FPGAs on it:
Xilinx Spartan and Xilinx Virtex5 (and the board has several separate JTAG interfaces for configuration of fpgas).
I am useing ISE 14.4 under Linux and I have some troubles to configure the Virtex 5 FPGA.
(no problems with Spartan).
I am using "Impact" to send the configuration files to FPGAs.
At the beginning Impact scans the board and finds Spartan FPGA without problems
and I can configure it, but when I plug the cable to the other interface and press scan on Impact it says:
"There are many unknown devices being detected. Press Yes to continue or press No to stop."
If I press the NO option, well, obviously nothing happens :-)
And if I click on YES it fails, I can manually add Virtex5 FPGA, but than it fails to upload the config file to it (and even fails when I try to detect the device ID).
I already tried all JTAG interfaces on the board, nothing.
Same operations work on the same board with SPARTAN FPGA, so I'm stuck. Any ideas ?
Well, I am not familiar with that particular board, but there are many things you can look into when it comes to your JTAG problem.
Check the voltage of your VCC, make sure it has a good value for the board
Make sure your ground connection is well connected and you don't have much impedance
between the connector's GND and the boards GND
Try other JTAG connectors and see if you see any difference in the detection of the
devices.
Try to run the IMPACT in debug mode. Capture the data and see if the patterns look OK
Also something that may not be JTAG related, is to make sure your V5 device has all the powers it needs, if there are any power problems, it may cause the JTAG interface to behave like you explained here.
Also, look on the board and see if there are any switches or jumpers to chose different way of configuring the V5 device. This can be a big issues with multi-FPGA board, maybe the V5 is configured to be programmed from a controller or other devices on the board and the JTAG chain is not set up for programming.
These are just different thoughts, they may help you toward the right direction.
Found this on their site:
User guide for the board
To reprogram the flash ROM (ST45DB16D, U11) for the control FPGA (Spartan-3A), attach the configuration
cable to CN7. For configuration, use the provided mcs file sasebo_gii_ctrl.mcs.
Reprogram the flash ROM (ST45DB16D, U4) for the cryptographic FPGA (Virtex-5 LX30) with the provided
mcs file sasebo_aes_comp_lx30.mcs as well. Connect the configuration cable to CN4.
To configure the FPGA immediately after reprog
ramming of the flash ROM, cycle the power.
Blockquote
This means you can't program the FPGA directly, you need to convert your bit file into MCS file and then load it into the FLASH memory on the board.

Resources