Author Topic: Pin like interruption on Altera FPGA  (Read 1302 times)

0 Members and 1 Guest are viewing this topic.

Offline marcelogadottiTopic starter

  • Newbie
  • Posts: 5
  • Country: br
  • Electrical Engineer and Ham Radio
Pin like interruption on Altera FPGA
« on: May 11, 2021, 07:49:12 pm »
Is there any way to emulate MCU interruption on FPGA using VHDL?

My application needs a high response time, sending the modification of the pin status to the UART.
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Pin like interruption on Altera FPGA
« Reply #1 on: May 11, 2021, 09:28:11 pm »
Is there any way to emulate MCU interruption on FPGA using VHDL?

My application needs a high response time, sending the modification of the pin status to the UART.

Logic can respond to a change in a signal -- an "interrupt" -- pretty much immediately.
 

Offline marcelogadottiTopic starter

  • Newbie
  • Posts: 5
  • Country: br
  • Electrical Engineer and Ham Radio
Re: Pin like interruption on Altera FPGA
« Reply #2 on: May 12, 2021, 06:22:46 pm »
I think I will use AND logic to check any pin change and trigger an UART event to send the value, like interruptions.
 

Offline Palmitoxico

  • Regular Contributor
  • *
  • Posts: 55
  • Country: br
  • no
Re: Pin like interruption on Altera FPGA
« Reply #3 on: May 12, 2021, 10:02:04 pm »
The concept of interrupts only makes sense when we are talking about something executing code. FPGAs typically don't execute 'code', unless you are implementing a MCU softcore into it.
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: Pin like interruption on Altera FPGA
« Reply #4 on: May 13, 2021, 05:54:10 am »
The UART will be much slower than the FPGA, so you run a risk of missing transitions, or at least introducing latency.

Consider time stamping the events at putting them into a FIFO to be streamed through the UART.

Oh, and pay due attention.to synchonizing and debouncing your inputs.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf