Hi, `Display.CopyBlock()' is primarilly used to scroll viewer text up/down. I learnt the code is more general however, capable of skewing horizontally, even diagonally. For diagonal moves, I sometime observe areas left blank, not copied from the source rectangle. It only happens in the last word shifted either left or right. PROCEDURE Test*; CONST X = 50; Y = 50; W = 50; H = 50; DX = 40; DY = 40; BEGIN Display.ReplConst(Display.white, X, Y, W, H, Display.replace); (*fill*) Display.CopyBlock(X, Y, W, H, DX, DY, Display.invert); (*shift down left*) Display.CopyBlock(X, Y, W, H, DX+20, DY+20, Display.invert) (*shift up right*) END Test; I do not understand code fully yet, by tinkering with it, I possibly pinned down the lines where some improvement may happen. PROCEDURE CopyBlock*(); ... IF n >= 0 THEN (*shift right*) ... FOR ... END; SYSTEM.GET(sa0, src); src := ROR(src, n); (*ASR used instead?*) SYSTEM.GET(sa0+d, dst); SYSTEM.PUT(sa0+d, (src * m0) + (dst - m0)) ... ELSE (*shift left*) ... FOR ... END; SYSTEM.GET(sa0+len, src); src := ROR(src, n); (*ASR used instead?*) SYSTEM.GET(sa0+len+d, dst); SYSTEM.PUT(sa0+len+d, (src - m2) + (dst * m2)) END ; -- Tomas Kral <thomas.kral@email.cz>
On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
`Display.CopyBlock()' is primarilly used to scroll viewer text up/down.
Hi, I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why? -- Tomas Kral <thomas.kral@email.cz>
Since we are in the arena of the FPGA; why not move this functionalities to hardware ? A big plus of this kind of platform is co-designing systems with software and hardware. Block the hardware then replicating software solutions is not the best way. Of course, this is the opinion of a hardware designer ;) El 27/09/18 a las 07:59, Tomas Kral escribió:
On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral <thomas.kral@email.cz> wrote:
`Display.CopyBlock()' is primarilly used to scroll viewer text up/down. Hi,
I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why?
-- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento.
Hi, this is by the way something Wirth had done in the past when he designed the Lilith. The Lilith had a self made (out of bit slice processor 2901) processor and its instruction set called M-Code featured also instructions like "Display Dot", "Replicate Pattern", "Bit block transfer" and "Display character". They are mentioned on page 63 of ETH Report Nr 40 - The Personal Computer Lilith. Apr 1981. N. Wirth which you can find at https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/69801/eth-3139-01.pdf?sequence=1&isAllowed=y <https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/69801/eth-3139-01.pdf?sequence=1&isAllowed=y> "Bit block transfer" is what probably was used to scroll with "hardware support". claudio
On 27. Sep. 2018, at 13:47, Walter Gallegos <waltergallegos@vera.com.uy> wrote:
Since we are in the arena of the FPGA; why not move this functionalities to hardware ?
A big plus of this kind of platform is co-designing systems with software and hardware. Block the hardware then replicating software solutions is not the best way.
Of course, this is the opinion of a hardware designer ;)
El 27/09/18 a las 07:59, Tomas Kral escribió:
On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral <thomas.kral@email.cz> <mailto:thomas.kral@email.cz> wrote:
`Display.CopyBlock()' is primarilly used to scroll viewer text up/down. Hi,
I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why?
-- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento. -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Claudio, Thank for the link ! El 27/09/18 a las 10:23, Claudio Nieder escribió:
Hi,
this is by the way something Wirth had done in the past when he designed the Lilith. The Lilith had a self made (out of bit slice processor 2901) processor and its instruction set called M-Code featured also instructions like "Display Dot", "Replicate Pattern", "Bit block transfer" and "Display character". They are mentioned on page 63 of /ETH Report Nr 40 - The Personal Computer Lilith/. Apr 1981. N. Wirth which you can find at https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/69801/eth-3139-01.pdf?sequence=1&isAllowed=y
"Bit block transfer" is what probably was used to scroll with "hardware support".
claudio
On 27. Sep. 2018, at 13:47, Walter Gallegos <waltergallegos@vera.com.uy <mailto:waltergallegos@vera.com.uy>> wrote:
Since we are in the arena of the FPGA; why not move this functionalities to hardware ?
A big plus of this kind of platform is co-designing systems with software and hardware. Block the hardware then replicating software solutions is not the best way.
Of course, this is the opinion of a hardware designer ;)
El 27/09/18 a las 07:59, Tomas Kral escribió:
On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral<thomas.kral@email.cz> wrote:
`Display.CopyBlock()' is primarilly used to scroll viewer text up/down. Hi,
I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why?
-- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento. -- Oberon@lists.inf.ethz.ch <mailto:Oberon@lists.inf.ethz.ch> mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-
Claudio, Walter,
Of course, this is the opinion of a hardware designer ;)
Yes, I can see. I like ST Blitter, it is a nice chip. PO2013 shows how to achieve raster primitives in s/w, it is also didactic. I realised simplest scroll for Oberon system is just copy, no shift, all viewers are word aligned, except last 8 trailing bits. Had the viewers been by one byte shorter.. IF dx = sx THEN SYSTEM.COPY(sa0, sa0+d, len DIV 4) (*scroll, word aligned*) RISC-5 has reduced functionality, I believe in h/w terms it means number of flip/flops - transistors used => how much does it influence price of of a real chip design based on FPGA matrix, while quantity is probably the biggest factor? -- Tomas Kral <thomas.kral@email.cz>
Tomas, On Do, 2018-09-27 at 15:59 +0200, Tomas Kral wrote:
RISC-5 has reduced functionality, I believe in h/w terms it means number of flip/flops - transistors used => how much does it influence price of of a real chip design based on FPGA matrix, while quantity is probably the biggest factor?
the complexity of the core RISC-5 logic is tiny in comparison with the capacity of modern FPGAs, let alone ASICs. Example: My implementation of RISC-5 (including the peripheral controllers) occupies less than 4% of the chip's Logic Elements (and this is a rather old Cyclone IV E). Although I'm no expert in FPGA/ASIC economics I would guess that the functionality of RISC-5 is mostly irrelevant for the cost of the chip. Hellwig
Walter: it is an excellent idea, but devil is in the details. The current implementation of the Wirth video is intentionally very simple. There is a predefined block of general RAM where the CPU writes video bits. Every screen location has an assigned address. The video controller continuously sends this entire video buffer to the video DAC (which is a one bit DAC in the original NW/PR design) without any interpretation. In particular, the concept of the "viewer" is implemented in software, but the video firmware is unaware of this. If you want to scroll up/down within the viewer, then the layout of this viewer within the frame buffer needs to become known to the video hardware controller. One can say that the video controller only knows the entire buffer, and then the single pixel within the buffer. Any intermediate structures, such as rectangles within the buffer, are unknown to the controller. If you wanted to implement the viewer scrolling in HW then the video controller needs to become much more complex. Note that a lot of work in this direction has been done by Pong P. Chu in his newest VHDL and System Verilog SoC books. It would be a good place to start. Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Walter Gallegos [waltergallegos@vera.com.uy] Sent: Thursday, September 27, 2018 7:47 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] FPGA - Display.CopyBlock() Since we are in the arena of the FPGA; why not move this functionalities to hardware ? A big plus of this kind of platform is co-designing systems with software and hardware. Block the hardware then replicating software solutions is not the best way. Of course, this is the opinion of a hardware designer ;) El 27/09/18 a las 07:59, Tomas Kral escribió: On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral <thomas.kral@email.cz><mailto:thomas.kral@email.cz> wrote: `Display.CopyBlock()' is primarilly used to scroll viewer text up/down. Hi, I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why? -- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento.
Wojtek, Yes, the hardware implementation for video is intentionally simple, I have used similar solutions for OSD menus, but that does not mean that we have to stay with that. I agree, a video controller could be a hard work but implementing in hardware a video controller that supports simple primitives is not necessarily complex, if carefully choose some restrictions. Usually I use a multi port memory controller to create as logical windows as needed. Basically I divide a SDRAM into segments with an arbiter who along with SDRAM refresh manages the accesses of the various buffers build in BRAM. One port is dedicated to video streaming out, the other ports generally be for the CPU or for video streaming in. For example, in a project I have two video streams coming in, four CPU access ports in addition to the video output stream port. This allow a two channel hardware pixel by pixel normalization and image equalization on the fly, impossible to do in software with a cost equivalent CPU. The software adjusts and/or write or read each one of the buffers, each window can be updated without disturbing the rest of the video. This is a very specific use. I agree. My intention with the comment was try to show that keep RSIC5 as is and limit the development to software could be the wrong option. El 27/09/18 a las 11:10, Skulski, Wojciech escribió:
Walter:
it is an excellent idea, but devil is in the details. The current implementation of the Wirth video is intentionally very simple. There is a predefined block of general RAM where the CPU writes video bits. Every screen location has an assigned address. The video controller continuously sends this entire video buffer to the video DAC (which is a one bit DAC in the original NW/PR design) without any interpretation. In particular, the concept of the "viewer" is implemented in software, but the video firmware is unaware of this. If you want to scroll up/down within the viewer, then the layout of this viewer within the frame buffer needs to become known to the video hardware controller.
One can say that the video controller only knows the entire buffer, and then the single pixel within the buffer. Any intermediate structures, such as rectangles within the buffer, are unknown to the controller.
If you wanted to implement the viewer scrolling in HW then the video controller needs to become much more complex. Note that a lot of work in this direction has been done by Pong P. Chu in his newest VHDL and System Verilog SoC books. It would be a good place to start.
Wojtek
________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Walter Gallegos [waltergallegos@vera.com.uy] Sent: Thursday, September 27, 2018 7:47 AM To: oberon@lists.inf.ethz.ch Subject: Re: [Oberon] FPGA - Display.CopyBlock()
Since we are in the arena of the FPGA; why not move this functionalities to hardware ?
A big plus of this kind of platform is co-designing systems with software and hardware. Block the hardware then replicating software solutions is not the best way.
Of course, this is the opinion of a hardware designer ;)
El 27/09/18 a las 07:59, Tomas Kral escribió:
On Mon, 3 Sep 2018 09:13:50 +0200 Tomas Kral <thomas.kral@email.cz><mailto:thomas.kral@email.cz> wrote:
`Display.CopyBlock()' is primarilly used to scroll viewer text up/down.
Hi,
I am experimenting with vertical scroll, I have added extra case just for scroll viewer up/down. In 4-bit colour, when 4 times more data needs to be moved around, I have observed the viewer is erased before scroll up, while it is not erased when scrolled down, why?
-- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento.
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- Walter Daniel Gallegos Programmable Logic Consultoría, Diseño, Entrenamiento. walter@waltergallegos.com | www.waltergallegos.com Tel +598 26 23 44 60 | Cel +598 99 18 58 88 Montevideo, Uruguay El presente correo y cualquier posible archivo adjunto está dirigido únicamente al destinatario del mensaje y contiene información que puede ser confidencial. Si Ud. no es el destinatario correcto por favor notifique al remitente respondiendo anexando este mensaje y elimine inmediatamente el e-mail y los posibles archivos adjuntos al mismo de su sistema. Está prohibida cualquier utilización, difusión o copia de este e-mail por cualquier persona o entidad que no sean las específicas destinatarias del mensaje. This e-mail and any attachment is confidential and is intended solely for the addressee(s). If you are not intended recipient please inform the sender immediately, answering this e-mail and delete it as well as the attached files. Any use, circulation or copy of this e-mail by any person or entity that is not the specific addressee(s) is prohibited.
participants (5)
-
Claudio Nieder -
Hellwig Geisse -
Skulski, Wojciech -
Tomas Kral -
Walter Gallegos