Added GPIO loopback to let outputs cause interrupts

This commit is contained in:
Kip Macsai-Goren 2022-04-18 07:22:49 +00:00
parent 121cc627f6
commit ced763beb6

View File

@ -146,7 +146,7 @@ module gpio (
// chip i/o
// connect OUT to IN for loopback testing
if (`GPIO_LOOPBACK_TEST) assign input0d = GPIOPinsOut & input_en & output_en;
if (`GPIO_LOOPBACK_TEST) assign input0d = GPIOPinsOut & output_en | (GPIOPinsIn & input_en);
else assign input0d = GPIOPinsIn & input_en;
flop #(32) sync1(HCLK,input0d,input1d);
flop #(32) sync2(HCLK,input1d,input2d);