Hi, It sounded here recently, the idea of clipping. My understanding is that any dot screen trajectory, needs asserting against min/max, to be well within sensible bounds. I am thinking along these lines. PROCEDURE Handle(F: Display.Frame; VAR M: Display.FrameMsg); BEGIN CASE F OF Frame: CASE M OF Oberon.InputMsg: IF ~ F.focus THEN Oberon.PassFocus(); (*acquire focus*) F.focus := TRUE; Clip(F) (*clipping ON*) END | Oberon.ControlMsg: IF M.id = Oberon.defocus THEN (*give up focus*) F.focus := FALSE; Clip(NIL) (*clipping OFF*) END END (*M*) END (*F*) END Handle; I wish to do actual clipping H/W. How difficult this could be, if not too silly an idea? Many thanks for reading this. -- Tomas Kral <thomas.kral@email.cz>
VAR F: Display.Frame Clip(F) (*clipping ON*) Clip(NIL) (*clipping OFF*)
RISC-5 has some reserved address space from $FFFF00 to $FFFFFF, some used by H/W mapped registers for I/O. I was thinking, to use some of those for `VID.v' clipping. Procedure `Clip()' would fiddle with some of these reserved addresses. Is it worthwhile, or just bad idea, difficult, complex or costing many cycles, and stalling CPU? -- Tomas Kral <thomas.kral@email.cz>
Thomas: the textbooks by Pong P. Chu discuss the video controller implementation which is doing image blending in hardware (firmware, actually). The idea is close to what you are suggesting, I think. Both these books, one in VHDL and the other in Verilog, are very well written and worth reading. I believe that good inspiration on clipping in hardware can come from reading these chapters. Go to RiskFive.com and select the "Web Resources" section. The first two "Books and Articles" are the ones I am referring to. Thanks, Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Tomas Kral [thomas.kral@email.cz] Sent: Sunday, March 3, 2019 1:26 PM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] System-V - Frame Clipping
VAR F: Display.Frame Clip(F) (*clipping ON*) Clip(NIL) (*clipping OFF*)
RISC-5 has some reserved address space from $FFFF00 to $FFFFFF, some used by H/W mapped registers for I/O. I was thinking, to use some of those for `VID.v' clipping. Procedure `Clip()' would fiddle with some of these reserved addresses. Is it worthwhile, or just bad idea, difficult, complex or costing many cycles, and stalling CPU? -- Tomas Kral <thomas.kral@email.cz> --
Tomas Clipping in HW is a looong way to go. Remember: Currently the interface to the display HW is a plain memory access to the video framebuffer. All primitives like Dot, ReplConst and so on implemented in Display.Mod (and Line, Circle, Elipses implemented in Display1.Mod not included by default in PO13) are written in Oberon. Before implementing clipping in HW you would have to implement these primitives in HW. After having done that, then you can think of clipping those primitives. Basically you have to implement a GPU in Verilog... Jörg
Am 04.03.2019 um 06:32 schrieb Skulski, Wojciech <skulski@pas.rochester.edu>:
Thomas:
the textbooks by Pong P. Chu discuss the video controller implementation which is doing image blending in hardware (firmware, actually). The idea is close to what you are suggesting, I think. Both these books, one in VHDL and the other in Verilog, are very well written and worth reading. I believe that good inspiration on clipping in hardware can come from reading these chapters.
Go to RiskFive.com and select the "Web Resources" section. The first two "Books and Articles" are the ones I am referring to.
Thanks, Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Tomas Kral [thomas.kral@email.cz] Sent: Sunday, March 3, 2019 1:26 PM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] System-V - Frame Clipping
VAR F: Display.Frame Clip(F) (*clipping ON*) Clip(NIL) (*clipping OFF*)
RISC-5 has some reserved address space from $FFFF00 to $FFFFFF, some used by H/W mapped registers for I/O.
I was thinking, to use some of those for `VID.v' clipping.
Procedure `Clip()' would fiddle with some of these reserved addresses.
Is it worthwhile, or just bad idea, difficult, complex or costing many cycles, and stalling CPU?
-- Tomas Kral <thomas.kral@email.cz> --
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Hi Joerg, Realising the task is not an easy one, especially for me, not being a HW man. That already contradicts to PO2013 spirit, getting it simple. But actually in SW I am toying with simple graph primitives because of `DIY DLogs'.
Before implementing clipping in HW you would have to implement these primitives in HW.
Did you mean these primitives implemented in SW [HW], to clip them in HW? My naive idea of HW clip would be, to populate HW registers with F.X, F.Y, F.X+F.W, F.Y+F.H. Then some `magic' address calculation blocks will let through to display buffer only certain mem access. Nothing to be drawn outside bounds. -- Tomas Kral <thomas.kral@email.cz>
>Before implementing clipping in HW you would have to implement these >primitives in HW. Did you mean these primitives implemented in SW [HW], to clip them in HW? No. HW primitives can be clipped in HW or SW. SW primitives to be clipped in SW. My naive idea of HW clip would be, to populate HW registers with F.X, F.Y, F.X+F.W, F.Y+F.H. Then some `magic' address calculation blocks will let through to display buffer only certain mem access. Nothing to be drawn outside bounds. Unfortunately, that's not easily possible, as memory wraps around from line to line. A simple test "if point is inside allowed region" is not enough. For HW to clip, you need a Line primitive in HW. A simple Dot primitive in HW checking for memory bounds is not enough. -- Tomas Kral <thomas.kral@email.cz> -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
On Mon, 4 Mar 2019 10:06:44 +0100 Jörg <joerg.straube@iaeth.ch> wrote:
Unfortunately, that's not easily possible, as memory wraps around from line to line.
Thank you Joerg, I now refrain from the idea of HW clip all too clearly, will rather stick to SW clip. I will experiment with `Clip(F)', `Clip(NIL)' inside `Display1.Mod', It actually consolidates graph primitives, some based on input from the list here, simplified for PO2013, currently does not support brush idea, vectors, etc. -- Tomas Kral <thomas.kral@email.cz>
Hi Wojtek, Thank you for docs pointers. Of the suggested read, I have so far `FPGA Prototyping by Verilog Examples: Xilinx Spartan-3 Version', not started reading yet :-( -- Tomas Kral <thomas.kral@email.cz>
Tomas: the Spartan-3 book which you have is a very good introduction to the PO2013 because it uses the same Spartan-3 board which NW and PR used to implement the original. There is a very good discussion of the asynchronous memory in this book. Pipistrello and the (now defunct) Oberon Station used the same architecture and the same asynchronous memory. So this book is very relevant if you are using one of these boards. The Spartan-3 book presented many peripherals, such as UART or PS/2. Most FPGA firmware textbooks provide such collections of pieces, presented as design examples. The new books go a long way beyond this approach. The goal of the new books is to build a complete System On Chip. In addition to individual pieces, Professor Chu provides a very clear and complete discussion of system integration using an on-chip bus for data exchange. I really like his minimalistic bus named FPro because it is teaching the essence while leaving the embellishments out. I can only wish that the new Oberon System On Chip will use Professor Chu's firmware and run the Oberon software. If you have not yet started the Spartan-3 book then I would advise to rather put your effort into reading the new ones. Thank you, Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Tomas Kral [thomas.kral@email.cz] Sent: Monday, March 4, 2019 3:42 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] System-V - Frame Clipping Hi Wojtek, Thank you for docs pointers. Of the suggested read, I have so far `FPGA Prototyping by Verilog Examples: Xilinx Spartan-3 Version', not started reading yet :-( -- Tomas Kral <thomas.kral@email.cz>
participants (4)
-
Jörg -
Jörg Straube -
Skulski, Wojciech -
Tomas Kral