Re: [Oberon] Project Oberon, RISC-V Edition
-----Original Message----- From: Oberon [mailto:oberon-bounces@lists.inf.ethz.ch] On Behalf Of Skulski, Wojciech Sent: Monday, 7 December 2020 1:46 PM To: ETH Oberon and related systems Subject: Re: [Oberon] [EXT] Project Oberon, RISC-V Edition
Andreas:
And there is always the FPGA route to consider.
Speaking of RISC-V and FPGA, someone (Peter Matthias I think) once said that Artix-7 100T is sufficient to run a soft version of RISC-V. I also recall seeing such statements somewhere on the RISC-V sites. If this is true, and if you are happy with the soft RISC-V, then you can order RiskFive with Artix 100-T from me. You will need to pay for the production run, but this is peanuts. A couple thousand or so. Then you will have your FPGA board and the production files. If the board goes under at my end, then you can still repeat the production runs basically forever.
Other possible boards include Arty-7 with Artix-7 100T from Digilent. It has more memory, but it is DDR3, so you will need a much more complex firmware. But you need to do it once. Also, you can perhaps find an EE intern or two who can interface DDR3 for you.
There's an article on Digi-Key's site showing how to implement a version of RISC-V on the Arty A7-100: https://www.digikey.com/eewiki/display/LOGIC/Digilent+Arty+A7+with+Xilinx+Ar tix-7+Implementing+SiFive+FE310+RISC-V alternatively via TinyURL: https://tinyurl.com/y2fckokr FYI you can also use the Arty A7-100 board to run the official Project Oberon Workstation using entirely off-the-shelf parts i.e. Digilent's VGA, SDCard and PS/2 PMOD boards and cables. I succeeded in implementing this recently using only the BRAM that is on the Artix-7 100T board running at a clock speed 50% higher than normal (i.e. 37.5 MHz). As this means that the total RAM available is only 512 KB (instead of the usual 1 MB) this does present some challenges. However, it is possible to use the system to compile itself, using all of the standard Project Oberon modules from Prof Wirth's site, even with the limited memory that is available. Regards, Chris Burrows CFB Software https://www.astrobe.com
Chris:
FYI you can also use the Arty A7-100 board to run the official Project Oberon Workstation using entirely off-the-shelf parts i.e. Digilent's VGA, SDCard and PS/2 PMOD boards and cables. I succeeded in implementing this recently using only the BRAM that is on the Artix-7 100T board running at a clock speed 50% higher than normal (i.e. 37.5 MHz). As this means that the total RAM available is only 512 KB (instead of the usual 1 MB) this does present some challenges. However, it is possible to use the system to compile itself, using all of the standard Project Oberon modules from Prof Wirth's site, even with the limited memory that is available.
This is wonderful. I also think that it would pay off to ask some good FPGA programmer (not me, I am not a good one) to interface the DDR3 memory to RISC5 SoC. The interface is in fact available from Open Arty SoC by Dan Gisselquist. You can find him on OpenCores. He is also running a dedicated website. It is a matter of pulling off the DDR3 controller for Arty and then interfacing it to the rest of the system like Joerg and Magnus did for Pipistrello. The downside is that the DDR3 controller is taking lots of FPGA resources which RISC-V also needs. So maybe Genesys 2 would be a better solution for truly ambitious designs. Its Kintex-7 is quite hefty. Wojtek
Hi Wojtek,
I also think that it would pay off to ask some good FPGA programmer (not me, I am not a good one) to interface the DDR3 memory to RISC5 SoC.
Personally I'd prefer you don't use terms like "firmware" and "programmer" when you mean "FPGA configuration" and "hardware designer". Terms, especially such as "firmware", tend to have specific meanings in their fields and it's confusing to drag them into a different one. They are not the same!
The downside is that the DDR3 controller is taking lots of FPGA resources
Not so much, where the hardware resources are there and dedicated on the chip, such as with an Artix or Spartan DDR I/O. I think there are three main things to be addressed: first, try using the Xilinx memory interface generator to create a memory controller for the DDR on the Arty board and see if you can live with all the files it generates, the complexity of which is, of course, anathema to Oberon's philosophy. Second, work out what needs to change about RISC5 to make it use a synchronous memory interface, rather than asynchronous static RAM. And see if, again, you can live with the increased complexity. I've done both of the above and had them working. But not yet in a satisfactory or even remotely publishable way, because of the complexity and the nasty details. And if you are happy with the extra complexity, why not just use RISC-V, or the ARM in a Zynq, for example, in order to leverage all the great resources available for those more complex platforms? And if the hardware doesn't need to be too configurable, very cheap ARM or RISC-V boards exist, as discussed before. Or at least, the configurable hardware doesn't need to have a processor on it. Which brings us to the third thing, which is what is the actual application? Software can be applied to a vast range of areas, many not even imagined when the code was first written. This doesn't happen nearly as much with hardware, as it's considerably less abstract, even when written in a portable hardware-description language. In my experience it helps to have an actual application in mind, rather than be a solution in search of a problem, because with an actual "customer" waiting, a lot of the hard decisions about the hardware get settled much more quickly. Cheers, Paul
Hello: a while ago I put the Oberon System sources under the name Portable Oberon System. Unfortunately, I have no idea how to make these files visible to the world. I looked at "pull requests", "actions", "packages", and all the other crap which Github is pouring on my head, and I have not found an answer to a simple question "how to make the files public". Can someone more knowledgeable than I go there and just release this stuff so anybody can see it? Alternatively, please tell me how I can do it. I just read how to make a release, followed the procedure, and the only file which was released was the readme. I tried number of times. May I say that Github looks like a very bad joke to me? https://github.com/WojtekSkulski/Portable_Oberon_System FYI, these files are the complete NW Oberon System cleaned up of chaos in the lowest level interfaces. If one is thinking of portability then this should have been the first step. Without having a solid base any thinking of portability is a pipe dream. I did it and now I am trying to make it known. There are two "branches" on that website. One is BlackBox format. It really should have been the native Text format, but I did the cleanup under BlackBox. The other "branch" contains ASCII versions of the same files. Honestly these should not be used. Meaningful cleanup requires better formatting tools than plain ASCII. Thank you, Wojtek
Hello Wojtek, Am 07.12.2020 um 22:03 schrieb Skulski, Wojciech:
Hello:
a while ago I put the Oberon System sources under the name Portable Oberon System. There are two "branches" on that website. One is BlackBox format. It really should have been the native Text format, but I did the cleanup under BlackBox. The other "branch" contains ASCII versions of the same files. Honestly these should not be used. Meaningful cleanup requires better formatting tools than plain ASCII.
GitHub thinks there are three: master Default branch Updated 10 months ago by WojtekSkulski Source-files-in-BlackBox-format Updated 10 months ago by WojtekSkulski Source-files-in-ASCII-format Updated 10 months ago by WojtekSkulski The master branch contains only a README, and the two other branches contain the "other" files.
Unfortunately, I have no idea how to make these files visible to the world.
On https://github.com/WojtekSkulski/Portable_Oberon_System/branches click "change default branch" and switch it over to "Source-files-in-BlackBox-format". People who are interested in other branches will find those in the Branches dropdown, but the only branch that is prominently presented on the landing page is the default branch. Optionally delete the "master" branch then.
I looked at "pull requests", "actions", "packages", and all the other crap which Github is pouring on my head,
"Pull Requests" are used to communicate changes that you made to a project that you do not own. So e.g. if I fixed a bug in your code, I could make a pull request that you could review and integrate. Sometimes they are also used in projects with multiple developers for one developer to request review of his changes by another one. So far I have not found any good reason why to create a pull request on a GitHub repository that you own and where you are the only contributor. "Actions" is what others would call continuous integration / continuous testing. There you can add (Unix shell) scripts that are run automatically whenever someone commits code, or whenever somebody creates a pull request. Those scripts could for example try to build the project and create an error if there is a compile time error caused by the change. Or the scripts could automatically convert files of exotic binary file types into HTML (if such converters exist) or even plain text, so that they can be more easily viewed/reviewed on the Web. "Packages" are some newfangled stuff that Oberon purists probably would not want to use. Basically, they are a way to publish things to certain ecosystems (NPM for JavaScript modules, Maven for Java modules, etc.) so that they can be added as a library from some integrated development tools or editors. (So I just say I want to use "junit:junit" and Maven will take care to download the latest library for me and add it to my project). Packages are nothing invented by GitHub, they just provide convenience functions for popular package managers so you don't have to deal with them individually.
and I have not found an answer to a simple question "how to make the files public". Can someone more knowledgeable than I go there and just release this stuff so anybody can see it? Alternatively, please tell me how I can do it.
I could try sending a pull request to pull everything in your branch into the master branch. But I guess it is harder for you to accept this (and still you would then have 2 identical branches) than just cleaning up your branches :-)
I just read how to make a release, followed the procedure, and the only file which was released was the readme.
You probably based the release off the master branch, which only contains the readme. Regards, Michael
Michael: thank you! I made a release with the BlackBox files according to your advice. I tried to change readme.md. Editing this file is provided, but saving the edited version is not provided without making a new branch. So I did not save the edited file. Github can be entertaining. In any case, there are both versions of the Oberon System files, one in the BB format and the other plain ASCII. I created the ASCII files by "save as .txt", so there are no differences other than formatting. I treat the BB versions as master files and the ASCII files as derivatives. I now recall that these files are not original NW files, but rather Andreas' Extended Oberon files from around Feb/2020. I think that NW Oberon is now frozen and we should rather follow Andreas' which is actively developed. This is how I sense the situation. Let me stress that porting Oberon without cleanup will be very inefficient, ineffective, and flaky. I was quite shocked that I had to undertake such an effort after I looked at the low level source. The code was quite terrifying from the porting point of view. Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Michael Schierl [schierlm@gmx.de] Sent: Monday, December 7, 2020 4:39 PM To: oberon@lists.inf.ethz.ch Subject: [EXT] Re: [Oberon] Portable Project Oberon on GitHub Hello Wojtek, Am 07.12.2020 um 22:03 schrieb Skulski, Wojciech:
Hello:
a while ago I put the Oberon System sources under the name Portable Oberon System. There are two "branches" on that website. One is BlackBox format. It really should have been the native Text format, but I did the cleanup under BlackBox. The other "branch" contains ASCII versions of the same files. Honestly these should not be used. Meaningful cleanup requires better formatting tools than plain ASCII.
GitHub thinks there are three: master Default branch Updated 10 months ago by WojtekSkulski Source-files-in-BlackBox-format Updated 10 months ago by WojtekSkulski Source-files-in-ASCII-format Updated 10 months ago by WojtekSkulski The master branch contains only a README, and the two other branches contain the "other" files.
Unfortunately, I have no idea how to make these files visible to the world.
On https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_WojtekSkulski_Portable-5FOberon-5FSystem_branches&d=DwICAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=owr0RLdC_fOB9PIYd_vE6THDziN8958y-DP26b9-7Gg&s=sM2y05GcAIRBIeh4jubvCdr5XqFa4TTwKLbyfhpSgzU&e= click "change default branch" and switch it over to "Source-files-in-BlackBox-format". People who are interested in other branches will find those in the Branches dropdown, but the only branch that is prominently presented on the landing page is the default branch. Optionally delete the "master" branch then.
I looked at "pull requests", "actions", "packages", and all the other crap which Github is pouring on my head,
"Pull Requests" are used to communicate changes that you made to a project that you do not own. So e.g. if I fixed a bug in your code, I could make a pull request that you could review and integrate. Sometimes they are also used in projects with multiple developers for one developer to request review of his changes by another one. So far I have not found any good reason why to create a pull request on a GitHub repository that you own and where you are the only contributor. "Actions" is what others would call continuous integration / continuous testing. There you can add (Unix shell) scripts that are run automatically whenever someone commits code, or whenever somebody creates a pull request. Those scripts could for example try to build the project and create an error if there is a compile time error caused by the change. Or the scripts could automatically convert files of exotic binary file types into HTML (if such converters exist) or even plain text, so that they can be more easily viewed/reviewed on the Web. "Packages" are some newfangled stuff that Oberon purists probably would not want to use. Basically, they are a way to publish things to certain ecosystems (NPM for JavaScript modules, Maven for Java modules, etc.) so that they can be added as a library from some integrated development tools or editors. (So I just say I want to use "junit:junit" and Maven will take care to download the latest library for me and add it to my project). Packages are nothing invented by GitHub, they just provide convenience functions for popular package managers so you don't have to deal with them individually.
and I have not found an answer to a simple question "how to make the files public". Can someone more knowledgeable than I go there and just release this stuff so anybody can see it? Alternatively, please tell me how I can do it.
I could try sending a pull request to pull everything in your branch into the master branch. But I guess it is harder for you to accept this (and still you would then have 2 identical branches) than just cleaning up your branches :-)
I just read how to make a release, followed the procedure, and the only file which was released was the readme.
You probably based the release off the master branch, which only contains the readme. Regards, Michael -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwICAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=owr0RLdC_fOB9PIYd_vE6THDziN8958y-DP26b9-7Gg&s=ujzLit69QZV46A1O-0g0Ya2FcrwhtdfFNMjEiX7hzy0&e=
Wojtek, Am 08.12.2020 um 02:11 schrieb Skulski, Wojciech:
Michael:
thank you! I made a release with the BlackBox files according to your advice. I tried to change readme.md. Editing this file is provided, but saving the edited version is not provided without making a new branch. So I did not save the edited file. Github can be entertaining.
As you are the owner of the repository, you should have two radio buttons: (x) Commit directly to the ... branch. ( ) Create a new branch for this commit and start a pull request. If you select the first one, you can commit directly (provided that you indeed changed anything. The commit button will be grayed out if there are no changes). When editing files in someone else's repository, you indeed have only the second option to create a new branch and send a pull request to the original author. [Searching the Web found some people who had the problem that despite clicking the button, the changes were not saved when trying to commit to the same branch. This was a few years ago and seemed to have happened only in an old (unsupported) version of Firefox, where the validation script triggered some JavaScript bug in that browser. Not sure if you are affected by this, but considering that you earlier told us that you still like to work on XP, I decided to mention it here.] Regards, Michael
Paul: I wrote:
The downside is that the DDR3 controller is taking lots of FPGA resources Your response: Not so much, where the hardware resources are there and dedicated on the chip, such as with an Artix or Spartan DDR I/O.
The table below is from DS176 June 8, 2016, page 10, Zynq-7000 AP SoC and 7 Series Devices Memory Interface Solutions (v4.0). The first number is the number of required look-up tables (LUTs), 2nd is percentage of the chip taken by the interface. The total number of LUTs in Artix-7 35T is 20,800 = 5,200 * 4, where "5200" is the number of "slices", and each slice provides four LUTs. From this table it follows that the DDR3 interface is taking a big cut of the FPGA. I doubt whether the remaining part is sufficient for RISC-V and substantial peripherals. DDR3 SDRAM(2) 14,016 67% DDR2 SDRAM(2) 9,267 45% LPDDR2 SDRAM 3,952 19%
I think there are three main things to be addressed: first, try using the Xilinx memory interface generator to create a memory controller for the DDR on the Arty board and see if you can live with all the files it generates, the complexity of which is, of course, anathema to Oberon's philosophy.
The answer is above. Going this route will require a much larger FPGA. The 35T is loaded to the edge with just the DDR3 controller. I mentioned 100T. Concerning complexity, I am not advocating either DDR3 or RISC-V. I mentioned these because Andreas asked on the forum. There were also complaints concerning lack of appropriate boards. I wanted to say that boards do exist, and then please start looking at the overheads. The bottom line: either let's make our own boards (RiskFive is one), or adopt 3rd party boards with all their goodies. Digilent Arty comes with two variants, 35T and 100T, and with DDR3. Want the board, get the board. They are there. Before you get the board, look at the firmware which will be needed to use that memory. All the info is available.
Second, work out what needs to change about RISC5 to make it use a synchronous memory interface, rather than asynchronous static RAM. And see if, again, you can live with the increased complexity.
If "synchronous" means "ZBT", then I posted the preliminary firmware. It is about the same as the original ProjectOberon. If "synchronous" means DRAM, then the answer is above.
I've done both of the above and had them working. But not yet in a satisfactory or even remotely publishable way, because of the complexity and the nasty details.
I believe that ZBT is the best solution up to 4 MB. HyperRAM is the best between 4 MB and 32 MB, because the DRAM controller is sealed on chip and you do not have to even know it exists. Above 32 MB it is probably DDR2, or DDR3 if you are prepared for the ugliness and the size of the firmware. I will avoid going there.
And if you are happy with the extra complexity, why not just use RISC-V, or the ARM in a Zynq, for example, in order to leverage all the great resources available for those more complex platforms?
Thank you, not now. We developed the BeagleBone derivative with AM5338 running Linux. We have had enough fun with ARM and Linux. My curiosity is more than satisfied. You can see my slides if you search the web for Skulski_SkuTek_SBIR_Xchange_Aug_14_2020_SC0009543.pdf. Thank you, Wojtek
Wojtek The LPDDR of the Pipistrello works nicely. Jörg
Am 08.12.2020 um 03:55 schrieb Skulski, Wojciech <skulski@pas.rochester.edu>:
Paul: I wrote:
The downside is that the DDR3 controller is taking lots of FPGA resources Your response: Not so much, where the hardware resources are there and dedicated on the chip, such as with an Artix or Spartan DDR I/O.
The table below is from DS176 June 8, 2016, page 10, Zynq-7000 AP SoC and 7 Series Devices Memory Interface Solutions (v4.0). The first number is the number of required look-up tables (LUTs), 2nd is percentage of the chip taken by the interface. The total number of LUTs in Artix-7 35T is 20,800 = 5,200 * 4, where "5200" is the number of "slices", and each slice provides four LUTs. From this table it follows that the DDR3 interface is taking a big cut of the FPGA. I doubt whether the remaining part is sufficient for RISC-V and substantial peripherals.
DDR3 SDRAM(2) 14,016 67% DDR2 SDRAM(2) 9,267 45% LPDDR2 SDRAM 3,952 19%
I think there are three main things to be addressed: first, try using the Xilinx memory interface generator to create a memory controller for the DDR on the Arty board and see if you can live with all the files it generates, the complexity of which is, of course, anathema to Oberon's philosophy.
The answer is above. Going this route will require a much larger FPGA. The 35T is loaded to the edge with just the DDR3 controller. I mentioned 100T. Concerning complexity, I am not advocating either DDR3 or RISC-V. I mentioned these because Andreas asked on the forum. There were also complaints concerning lack of appropriate boards. I wanted to say that boards do exist, and then please start looking at the overheads.
The bottom line: either let's make our own boards (RiskFive is one), or adopt 3rd party boards with all their goodies. Digilent Arty comes with two variants, 35T and 100T, and with DDR3. Want the board, get the board. They are there. Before you get the board, look at the firmware which will be needed to use that memory. All the info is available.
Second, work out what needs to change about RISC5 to make it use a synchronous memory interface, rather than asynchronous static RAM. And see if, again, you can live with the increased complexity.
If "synchronous" means "ZBT", then I posted the preliminary firmware. It is about the same as the original ProjectOberon. If "synchronous" means DRAM, then the answer is above.
I've done both of the above and had them working. But not yet in a satisfactory or even remotely publishable way, because of the complexity and the nasty details.
I believe that ZBT is the best solution up to 4 MB. HyperRAM is the best between 4 MB and 32 MB, because the DRAM controller is sealed on chip and you do not have to even know it exists. Above 32 MB it is probably DDR2, or DDR3 if you are prepared for the ugliness and the size of the firmware. I will avoid going there.
And if you are happy with the extra complexity, why not just use RISC-V, or the ARM in a Zynq, for example, in order to leverage all the great resources available for those more complex platforms?
Thank you, not now. We developed the BeagleBone derivative with AM5338 running Linux. We have had enough fun with ARM and Linux. My curiosity is more than satisfied. You can see my slides if you search the web for Skulski_SkuTek_SBIR_Xchange_Aug_14_2020_SC0009543.pdf.
Thank you, Wojtek -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
Joerg:
The LPDDR of the Pipistrello works nicely.
I know. It is great. You need the cache, though. I know you have implemented it. If you look at the table below, higher clock speed brings more complexity. DDR3 requires dedicated phase calibrations of the received signals. Tuning the signals is performed in the memory controller. This logic uses lots of resources. The other memories, which are running slower, have wider timing margins and do not need that much tuning and calibration. From this point of view it pays to stay with the older technologies. I mentioned DDR3 because Andreas asked about the boards. OK, there are boards out there. Arty is inexpensive, so it is a good candidate. But they put DDR3 on that board. So one has to ask how to possibly use it. You can read the discussion on http://opencores.org/project,wbddr3 by Dan Gisselquist. It is a horror story. The numbers in the table are saying the same.
DDR3 SDRAM(2) 14,016 67% DDR2 SDRAM(2) 9,267 45% LPDDR2 SDRAM 3,952 19%
On my next board I will either provide PSRAM or HyperRAM. The refresh is then moved from the FPGA to the memory chip itself. PSRAM can emulate ASRAM, so one can use the present Oberon Verilog with little change. It is also possible to use PSRAM in the synchronous mode to boost the performance. All this without ever worrying about the refresh controller. Wojtek
participants (5)
-
Chris Burrows -
Jörg -
Michael Schierl -
Paul Reed -
Skulski, Wojciech