Forum Discussion
Altera_Forum
Honored Contributor
10 years agoThanks for your answer. I'm sorry to reply with such a delay, I didn't received any notification email ... And I started to work on an other part of my system ... Now I will check ever day ;)
Yes I wrote a tiny VHDL module for Qsys :library ieee;
use ieee.std_logic_1164.all;
ENTITY interrupt_generator IS
PORT(
irq : OUT std_logic;
key : IN std_logic
);
END interrupt_generator;
ARCHITECTURE a_interrupt_generator OF interrupt_generator IS
BEGIN
irq <= not key;
END a_interrupt_generator; It's plugged in Qsys as you can see in my first post (in the attached file). The conduit signal is directly connected to one of the push-buttons in my top-level VHDL. I have modified the original dts adding those lines in the soc node hps_0_arm_gic_0: intc@fffed000 {
compatible = "arm,cortex-a9-gic";
# interrupt-cells = <0x3>;
interrupt-controller;
reg = <0xfffed000 0x1000 0xfffec100 0x100>;
linux,phandle = <0x2>;
phandle = <0x2>;
};
fpgaint0: fpgaint@0 {
compatible = "altr,fpgaint-0.1";
interrupt-parent = < &hps_0_arm_gic_0 >;
label = "fpgaint0";
interrupts = <0 40 1>;
};
fpgaint1: fpgaint@1 {
compatible = "altr,fpgaint-0.1";
interrupt-parent = < &hps_0_arm_gic_0 >;
label = "fpgaint1";
interrupts = <0 41 1>;
};
fpgaint2: fpgaint@2 {
compatible = "altr,fpgaint-0.1";
interrupt-parent = < &hps_0_arm_gic_0 >;
label = "fpgaint2";
interrupts = <0 42 1>;
}; I copy-pasted it from one template and different forum's topics. I don't understand the values of this line : reg = <0xfffed000 0x1000 0xfffec100 0x100>; If I think right (is it really <addr value addr value> ?), why the values are 0x1000 and 0x100. In an Altera Document : "Using the ARM Generic Interrupt Controller", the enable bits are shown on bits 0 of ICCICR and ICDDCR, so 0x1 for both. To enable my interrupt (the fisrt one) should I add, in the line reg=, 0xfffed108 0x100 (for GIC ID 72) or 0xfffed104 0x100 (ID 40) ? Now I compile dts with the dtc command, and copy it to the sd card. Should I be able to see something happenning with cat /proc/stat at this stage (something like a counter incremented every time I hit the push button ?) ? (My complete dts is in the attached file) I don't understand what you mean by "reserved the memory your writing to! (dts)" Merci beaucoup