<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><div></div><div><span style="font-family:Arial,Helvetica,sans-serif">Gray - that would be fantastic! I'd love to look more into it</span><br></div><div><span style="font-family:Arial,Helvetica,sans-serif"><br></span></div><div>Jorg - thank you, that module simplifies things a lot. Would it be possible for you to walk me through how it works in more detail? I'm not following every line - for instance what does SYSTEM.LDPSR do?</div><div>
</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Adding to Jörg's post, below, I have a simple eight channel interrupt controller in the FPGA hardware as "front end" to the single interrupt of the RISC5 CPU, including the corresponding Oberon driver of course. It adds one clock cycle of latency, IIRC. Let me know if you're interested. It requires some minor changes to the RISC5 CPU, though.
-- gray</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 6 May 2021, at 19:53, Joerg wrote:<br>><i> Hi Jeff
</i>
><i>
</i>
><i> The interrupt signal is handed over by the HW to the RISC5 CPU in RISC5Top.v.
</i>
><i> The interrupt signal in the CPU is called .irq, and the current RISC5Top.v hands over periodic interrupts with the Verilog code below
</i>
><i> RISC5 riscx(.clk(clk), .rst(rst), *.irq(limit),*
</i>><i> .rd(rd), .wr(wr), .ben(ben), .stallX(vidreq),
</i>
><i> .adr(adr), .codebus(codebus), .inbus(inbus),
</i>
><i> .outbus(outbus));
</i>
><i>
</i>><i> assign limit = (cnt0 == 24999);
</i>><i>
</i>
><i> But you are totally free to set the CPU’s .irq signal on other HW conditions, e.g. a packet on the Ethernet board arrived or the temperature sensor says the meat is tender.
</i>
><i>
</i>
><i> Below I attached an older mail on an “simple” API to facilitate programming with interrupts. Instead of Kernel.Install you would call Interrupt.Install to install the interrupt handler.
</i>
><i>
</i>
><i> br
</i>
><i> Jörg
</i></blockquote></pre><br class="gmail-Apple-interchange-newline"></div>