質問

I want to send a HTTP request with Verilog HDL using Altera D2-115 I'm implementing a security system using smoke detectors and IR breaker circuits, in case of an alarm the system should send a HTTP request to send an email.

役に立ちましたか?

解決

You want to use a FPGA to do a task that is much better suited for a SOC.

That said, you can turn your FPGA into a SOC: instantiate a NIOS-II processor inside your Altera device, connect it to relevant devices, such as RAM, flash-ROM, SD slot for permanent storage, and of course the Ethernet chip, and write a program for the NIOS-II processor that will send the HTTP request via the Ethernet chip. This implies that you will have to include in your program a TCP/IP stack to actually send any information to the Internet, receive any response and managing the handshaking. It has not to be a complete stack, just TCP, IP and possibly ICMP and ARP. UDP is not needed.

If using the DE2-115 board is a personal option and it's not imposed, you may want to look for a microcontroller with a ready made TCP/IP stack and support for Ethernet. A plain Raspberry Pi is much well suited (and way much cheaper), even if you don't actually need a complete Linux system.

Trying to do all the stuff using only Verilog would mean:

  • Write a design for a FSM that controls the ethernet chip, possibly using SPI for configuration options, and the like.
  • That FSM communicates with a large FSM providing the TCP/IP stack. It's indeed doable, but a huge project by itself.
  • That FSM in turn has to communicate with another FSM which implements the HTTP protocol to send the HTTP request to the remote host.
  • And that FSM will be triggered by a simple FSM which is in charge of polling the IR sensors and smoke detectors. This part is the only one I think it is feasible to do as a digital system in Verilog.
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top