Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Immanuel, Yehowshua U @ 2020-03-15 18:19 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyaCDW575g4V7NQbiXhp+wLJR+EqaYjNHfHgpjnS7ENnQ@mail.gmail.com>

> massively - and provided us with a way to test it, so that when it
> comes to implementing it in hardware, the *hardware* can be verified
> immediately.

So it sounds like the only benefit of RISCV was the RISCV spike emulator which allowed us to test our SimpleV proposal.

I’m still not clear how keeping RISCV compatibility helps us?

It seems to me like excuses to keep RISCV around than an actual need to continue with it.

Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 258] New: Finish implementing support for Power in simple-soft-float
From: bugzilla-daemon @ 2020-03-15 18:02 UTC (permalink / raw)
  To: libre-riscv-dev

http://bugs.libre-riscv.org/show_bug.cgi?id=258

            Bug ID: 258
           Summary: Finish implementing support for Power in
                    simple-soft-float
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: programmerjake@gmail.com
          Reporter: programmerjake@gmail.com
                CC: libre-riscv-dev@lists.libre-riscv.org
            Blocks: 241
   NLnet milestone: ---

need to finish implementing NaN payload propagation
need to implement additional non-standard FPU exceptions


Referenced Bugs:

http://bugs.libre-riscv.org/show_bug.cgi?id=241
[Bug 241] OpenPOWER SImulation is needed of standards
-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 241] OpenPOWER SImulation is needed of standards
From: bugzilla-daemon @ 2020-03-15 17:34 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-241-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=241

cand@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cand@gmx.com

--- Comment #7 from cand@gmx.com ---
https://github.com/lioncash/DolphinPPCTests
https://github.com/JustinCB/macemu/blob/master/SheepShaver/src/kpx_cpu/src/test/test-powerpc.cpp

Some Power unit test links.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Hendrik Boom @ 2020-03-15 16:57 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAC2bXD7h90TXSCeFAM41NW-VbTizpWVueDu8KrmLHxBaX-7a=A@mail.gmail.com>

On Sat, Mar 14, 2020 at 11:13:23PM -0700, Jacob Lifshay wrote:
> On Sat, Mar 14, 2020, 22:10 Hendrik Boom <hendrik@topoi.pooq.com> wrote:
> 
> > On Sat, Mar 14, 2020 at 08:17:07PM -0700, Jacob Lifshay wrote:
> > > The software side will be a little harder but still relatively easy, we
> > > need to implement support for translating Linux system calls from the
> > > RISC-V interface to the internal calls, as well as implementing the
> > > syscalls for switching modes between ISAs -- that's like 80% of the work
> > on
> > > the Linux Kernel side. For userspace, we can have just executing RISC-V
> > ELF
> > > executables as a MVP, later, we can implement the stuff in the dynamic
> > > linker to handle having both Power and RV code loaded in the same process
> > > -- I'm thinking we should use a system similar to Wine and Darling (like
> > > Wine but macOS on Linux) where they have two dynamic linkers in the same
> > > process. Will have to figure that out.
> >
> > Is the multiarch feature of Linux of any use here?
> 
> 
> I don't think so, since it would allow switching between ppc64le and
> ppc32le (or some other 32-bit variant of Power).
> 
>   I think it
> > allows a choice of architecture for each *process*.  So we'd
> > just have to have two sets of libraries.  We wouldn't have to link
> > any code that contains both architectures.
> >

> 
> We can do that just fine, however, since all our custom extensions are only
> in the Power side, RISC-V programs wouldn't be able to use the custom
> extensions so that means Vulkan (and our other user-space drivers) would be
> very slow or not run at all.

Whatever is done initially, it looks like openGL shaders will 
eventually run on the Power side, no matter which side the openGL 
program runs in. 

For RISC-V openGL programs, this looks rather like the present-day 
situation, where the graphics processor has its own machine code.

For Power openGL programs, this separation is unnecessary.

-- hendrik

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 241] OpenPOWER SImulation is needed of standards
From: bugzilla-daemon @ 2020-03-15 16:17 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-241-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=241

--- Comment #6 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #5)
> http://pearpc.sourceforge.net/
> 
> another one to investigate

pear is, honestly, looking a lot simpler to work with, although it's going to
take some unit tests like those in riscv-isa-tests to get it into shape.

see
http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-March/005091.html

to get whatever we need into shape it will go like this:

* get "basic" (non-GUI) ability to run "bare-metal" programs.  this involves
either overloading a system call (writing one), peek/poke to a memory address
and having the emulator say "writes to this address are directed to stdout,
reads from this address result in characters from stdin being accepted".

* start writing some *really* simple unit tests (20-50 lines of assembler) that
test "addic", "mul", etc. etc.

* begin the process of allowing dynamic (runtime) emulation of 64-bit
instructions (not a static emulator-compile-time option)

* *recompile* the unit tests using a 64-bit ppc compiler and test that those
still work

* start adding "basic" SimpleV support (a 48-bit instruction with the 16-bit
"SV" Prefix) which does *NOT* support element-width.  just a straight for-loop
on integer math.

* write unit tests - in assembler - for SVPrefix add, addic, mul etc.

* move slowly forward adding full IEEE754 FP support (using Jacob's algorithmic
library, so that we have *proper* POWER IEEE754 emulation, not "x86" IEEE754
rules)

* add in elwidth support, predication, and so on, basically replicate the
traillazing done in the spike-sv emulator.


at the same time:

* add support for dynamic LE and BE (unit tests for the same)

* attempt to compile up more recent linux kernels, boot loaders (yaboot), in
particular track down why Debian 8.0 PPC ISO cannot recognise (find) yaboot
files on the ISO

* see if the MMU (TLB) code is adequate to run a 64-bit OS

* after the 64-bit bare-metal unit tests all pass, attempt to run larger
programs and even a linux kernel.


we *might* also want to consider porting the spike pk library to powerpc.  it's
a "bare minimum POSIX environment" which will allow the absolute bare minimum
of POSIX applications to function.  or, finding something else suitable to
port.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] [OT] Minecraft garbage collection
From: Luke Kenneth Casson Leighton @ 2020-03-15 12:11 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD6TiN_Bc4bVjhE2LNsG5dGwK7-cHfx8TKgB2d9+CSGWyQ@mail.gmail.com>

On Sun, Mar 15, 2020 at 6:41 AM Jacob Lifshay <programmerjake@gmail.com> wrote:

> Pretty pictures: https://hackaday.io/project/7018/gallery

oooo :)

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] pearpc simulator running
From: Luke Kenneth Casson Leighton @ 2020-03-15 12:09 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyDV3_2qg2zNKrXg02KDVkKysHVE37j58piWhravXEuyw@mail.gmail.com>

i've just managed to get pearpc running (clang, ./configure
--enable-cpu=generic), and it "boots" the Mandrake-9 PPC 32 (BE)
installation ISO perfectly well.

reading up, historically, it could not boot linux 2.6 kernels (only 2.4).

qemu:
https://wiki.qemu.org/Documentation/Platforms/POWER

that looks... relevant to running kvm, very much less relevant to a
cycle-accurate simulator *however*, we *may* be able to pick up tips
on how to implement an MMU (and a 64-bit UNIX TLB).

there's a set of buildroot configs for ppc 32-bit and 64-bit:
https://github.com/maximeh/buildroot/tree/master/board/qemu/

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Luke Kenneth Casson Leighton @ 2020-03-15 11:22 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD6oEtNj=Mj1=5B=+_XHZ7GKaH4=m8xnFzT27=UVofM7Qg@mail.gmail.com>

On Sun, Mar 15, 2020 at 7:59 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> On Sat, Mar 14, 2020, 21:01 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
> wrote:
>
> > 3) where is the port of softfloat-3 that supports POWER IEEE754 format?
> >
>
> You can use simple-soft-float which is (modulo possible bugs) entirely
> correct for Power except that it might propagate NaN payloads incorrectly
> since NaN payload propagation is only partially implemented and that it
> needs to have the additional 20-30 lines of trivial code added to record
> the cause for generating a NaN (because Power has more than the standard
> list of FP exception conditions).

yes.  could you add that?  it's important.  if you need a POWERPC
64-bit system to log in to in order to check that they're correct (by
doing "real" FP on a "real" POWER9 system) i can ask around.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Luke Kenneth Casson Leighton @ 2020-03-15 11:20 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <E23AD06A-36A2-4322-98E3-20FBEC559026@gatech.edu>

On Sun, Mar 15, 2020 at 7:19 AM Immanuel, Yehowshua U
<yimmanuel3@gatech.edu> wrote:

> > 1) where are the unit tests?
> > 2) where is the simulator?
> > 3) where is the port of softfloat-3 that supports POWER IEEE754 format?
>
> So what I’m hearing is that spike combined with risk-isa-tests has sped up the development process.

massively - and provided us with a way to test it, so that when it
comes to implementing it in hardware, the *hardware* can be verified
immediately.

bear in mind that the full hardware will run (in nmigen simulation
form) at *seconds* per cycle.  compiling with iverilog will be better
but nothing like an FPGA.

each level of additional complexity and time for compilation means yet
more delay in finishing... and not having unit tests actually means
*we can't declare it finished*.

> Now, we just need a way to map POWER onto Simple-V?

not quite.

1) first we need a suitable POWER simulator.  it needs to be 64-bit,
LE and BE capable, with a full MMU, and capable of running bare-metal
tests as well as a full GNU/Linux 64-bit OS (even if that's in-memory,
like spike)
2) we then need a full set of bare-metal unit tests
3) *then* we add SImple-V to POWER at the *specification* level
4) *then* we implement Simple-V in the POWER simulator
5) *then* we implement bare metal unit tests capable of running in the
POWER simulator
6) *then* we implement POWER in hardware
7) *then* we run the unit tests from step 2 under the hardware
8) *then* we add SimpleV to POWER in hardware
9) *then* we run the unit tests from step 5 under the hardware

it's a hell of a lot of work - a lot more than with RISC-V.  with
RISC-V the fact that spike and the unit tests exist *and work* is a
massive, massive head-start, where not only do we not have to do the
research to get that working, we can use it by examining even the
source code of the simulator to actually see what's going on [spike
actually implements RISC-V UNIX Platform TLBs, and throws full and
correct page-fault exceptions].


> How does the decoder Michael is working on fit in?

it's a decoder.  if you don't have it, you can't decode POWER
instructions.  it's an essential part.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Jacob Lifshay @ 2020-03-15  7:59 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyzS-OTunVK_3B_RQi3wb1Bd6gfcSWTR4_aBJbrq=kXpQ@mail.gmail.com>

On Sat, Mar 14, 2020, 21:01 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:

> 3) where is the port of softfloat-3 that supports POWER IEEE754 format?
>

You can use simple-soft-float which is (modulo possible bugs) entirely
correct for Power except that it might propagate NaN payloads incorrectly
since NaN payload propagation is only partially implemented and that it
needs to have the additional 20-30 lines of trivial code added to record
the cause for generating a NaN (because Power has more than the standard
list of FP exception conditions).

To operate on the Power f32-in-f64 format all you need to do is convert all
inputs to f32 (check manual for exact operation), do the operation in f32
format, then convert back to f64 (conversion is lossless).

Additional benefits include: not needing compile-time flag changes to
switch between Power and RISC-V modes (everything is dynamically
adjustable).

The code is written on top of the algebraic numbers library I wrote (gives
us a type that behaves like an infinite-precision real number) and in a
straight-forward manner (no fancy math to make it faster), hopefully making
the internal algorithms easier to prove correct (assuming the algebraics
library gives the correct answer).

There are tested Python bindings.

I did test it against softfloat3 for RISC-V, all tests pass.

source:
https://salsa.debian.org/Kazan-team/simple-soft-float

autogenerated Rust docs:
https://docs.rs/simple-soft-float/0.1.0/simple_soft_float/

Jacob

>
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Immanuel, Yehowshua U @ 2020-03-15  7:18 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD7h90TXSCeFAM41NW-VbTizpWVueDu8KrmLHxBaX-7a=A@mail.gmail.com>

> * take spike, and add SimpleV (done - took 2-3 months appx)
> * take riscv-isa-tests, and add SimpleV unit tests (done - took about 1 month)
> * implement a core in hardware by taking an existing core and adding
> in our engine.
> * run the EXACT SAME BARE METAL UNIT TESTS.
> 
> hardware is bootstrapped.  it's done in an incremental fashion, *one*
> unknown at a time.
> 
> now let's look at POWER.
> 
> 1) where are the unit tests?
> 2) where is the simulator?
> 3) where is the port of softfloat-3 that supports POWER IEEE754 format?

So what I’m hearing is that spike combined with risk-isa-tests has sped up the development process.

Now, we just need a way to map POWER onto Simple-V?
How does the decoded Michael is working on fit in?

Yehowshua
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] [OT] Minecraft garbage collection
From: Jacob Lifshay @ 2020-03-15  6:41 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200315054756.e3cxsahmx63szd6y@topoi.pooq.com>

On Sat, Mar 14, 2020, 22:48 Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> On Sat, Mar 14, 2020 at 10:42:55PM -0700, Jacob Lifshay wrote:
> >
> > Incidentally, I am also writing a custom garbage collector in Rust for
> the
> > next version of my Minecraft-style game engine (Voxels) -- I'm using a 3D
> > variant of the hashlife algorithm (see wikipedia) which uses a garbage
> > collector except that the more garbage is kept around the faster it runs
> > (opposite of most GCs) since it is used to cache computations.
>
> That looks both interesting and useful!
>

Thanks!

>
for a early-alpha working version using hashlife (newer than 0.7), see
https://github.com/programmerjake/hashlife3d

I'm currently working (really slowly due to spending most my time on
Libre-SOC) on rewriting the core hashlife algorithm to be multithreaded
using a work-stealing scheduler:
https://github.com/programmerjake/parallel-hashlife-rust

for a decently playable (think Minecraft pre-1.0) old game version written
in C++ -- doesn't use hashlife (the previously mentioned project with
incomprehensible occasional random crashes):
https://github.com/programmerjake/voxels-0.7

compiled versions for Linux, Windows, and Android:
https://github.com/programmerjake/voxels-0.7/releases

Pretty pictures: https://hackaday.io/project/7018/gallery

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Jacob Lifshay @ 2020-03-15  6:13 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200315051018.svaw4aor7ifwn725@topoi.pooq.com>

On Sat, Mar 14, 2020, 22:10 Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> On Sat, Mar 14, 2020 at 08:17:07PM -0700, Jacob Lifshay wrote:
> > The software side will be a little harder but still relatively easy, we
> > need to implement support for translating Linux system calls from the
> > RISC-V interface to the internal calls, as well as implementing the
> > syscalls for switching modes between ISAs -- that's like 80% of the work
> on
> > the Linux Kernel side. For userspace, we can have just executing RISC-V
> ELF
> > executables as a MVP, later, we can implement the stuff in the dynamic
> > linker to handle having both Power and RV code loaded in the same process
> > -- I'm thinking we should use a system similar to Wine and Darling (like
> > Wine but macOS on Linux) where they have two dynamic linkers in the same
> > process. Will have to figure that out.
>
> Is the multiarch feature of Linux of any use here?


I don't think so, since it would allow switching between ppc64le and
ppc32le (or some other 32-bit variant of Power).

  I think it
> allows a choice of architecture for each *process*.  So we'd
> just have to have two sets of libraries.  We wouldn't have to link
> any code that contains both architectures.
>

We can do that just fine, however, since all our custom extensions are only
in the Power side, RISC-V programs wouldn't be able to use the custom
extensions so that means Vulkan (and our other user-space drivers) would be
very slow or not run at all.

Therefore, we should build ISA to ISA interfaces to allow a RISC-V function
to call and be called by a Power function -- my current plan is to have the
program make a syscall to switch between ISAs.

maybe have syscalls something like:

// Power side
void call_riscv_from_power(void (*riscv_function)(void *), void *arg);

// RISC-V side
void call_power_from_riscv(void (*power_function)(void *), void *arg);

We would still have to worry about the differences between RISC-V and Power
ABIs such as memory layouts and handling stack unwinding and backtraces.

The current plan is for Kernel-mode to be entirely Power and it can switch
to RV when switching to user mode as well as any interrupt, exception, or
syscall will switch to Power mode and run the appropriate Kernel code.

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [OT] Minecraft garbage collection
From: Hendrik Boom @ 2020-03-15  5:47 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAC2bXD6YqKtHmLLhN6NPfCQtd=+JZEtE9VfHj9aispT3kQt18Q@mail.gmail.com>

On Sat, Mar 14, 2020 at 10:42:55PM -0700, Jacob Lifshay wrote:
> 
> Incidentally, I am also writing a custom garbage collector in Rust for the
> next version of my Minecraft-style game engine (Voxels) -- I'm using a 3D
> variant of the hashlife algorithm (see wikipedia) which uses a garbage
> collector except that the more garbage is kept around the faster it runs
> (opposite of most GCs) since it is used to cache computations.

That looks both interesting and useful!

-- hendrik

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] benefits of rust
From: Jacob Lifshay @ 2020-03-15  5:42 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200315051821.ha7d2ngus6x73rzb@topoi.pooq.com>

On Sat, Mar 14, 2020, 22:18 Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> The one drawback I see to Rust is that it doesn't have a
> garbage-collected scope or storage class.  There are programming
> techniques that involve complexly tangled data structure.  Rust is
> not good for such problems.
>

Rust has support for reference counted smart pointers in the standard
library (Arc (atomic) and Rc (non-atomic)), where those aren't sufficient,
there are libraries for arenas (what I'm using in Kazan for compiler
data-structures (see shader-compiler-ir in the git repo) -- also used in
the rust compiler itself) as well as experimental libraries for full
garbage collection:
see shifgrethor for one of the more interesting GC libraries written by a
core rust contributor:
https://internals.rust-lang.org/t/shifgrethor-garbage-collection-as-a-rust-library/8597

Incidentally, I am also writing a custom garbage collector in Rust for the
next version of my Minecraft-style game engine (Voxels) -- I'm using a 3D
variant of the hashlife algorithm (see wikipedia) which uses a garbage
collector except that the more garbage is kept around the faster it runs
(opposite of most GCs) since it is used to cache computations.

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] benefits of rust
From: Hendrik Boom @ 2020-03-15  5:18 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAC2bXD7FXkGaZh73qRuzeFYSmCOuA8TcWqgY0TGcDbCO8ARg-Q@mail.gmail.com>

On Sat, Mar 14, 2020 at 07:47:45PM -0700, Jacob Lifshay wrote:
> On Sat, Mar 14, 2020, 11:14 Hendrik Boom <hendrik@topoi.pooq.com> wrote:
> 
> > On Fri, Mar 13, 2020 at 10:13:06AM +0000, Luke Kenneth Casson Leighton
> > wrote:
> >
> > >
> > > 1). bad: it is seriously demeaning to use the phrase "non-paranoid" -
> > > to ACCUSE potential users of rust of "being paranoid".  can i suggest,
> > > jacob, raising that as a severe and high-priority issue with the rust
> > > community to get that removed effective immediate?
> >
> > The whole point of rust is that its static checking is reassurance for
> > the paranoid!
> >
> 
> while that's true, Rust does have other benefits over languages such as
> Python, JavaScript, Java, C#, C, and C++:
> speed, consistency (no GC pauses), native execution, low memory usage,
> basically nearly all the gotchas are caught by the compiler at compile-time
> (unlike C and C++ and, to a lesser extent, other languages) so if it
> compiles then it's likely to work, much more powerful type deduction, the
> ability to extend the interface of any type, not needing all the special
> cases that come with C++ constructors, vastly improved composability,
> accessible and easy to use library ecosystem, very friendly community, much
> easier to parallelize code, etc.
> 
> Static checking is not just for the paranoid, since the checking enables
> programmers to make faster programs by using rust's composability to use
> faster more complex algorithms that wouldn't be practically feasible to get
> correct in a language such as C or Python.
> 
> Here's an example where someone was able to use b-trees instead of the
> simpler avl trees because rust's checking and composability meant that it
> wasn't extremely hard to get correct (as it would have been in C):
> http://dtrace.org/blogs/bmc/2018/09/28/the-relative-performance-of-c-and-rust/

There are many applications that would be better coded in Rust than 
C.

The one drawback I see to Rust is that it doesn't have a 
garbage-collected scope or storage class.  There are programming 
techniques that involve complexly tangled data structure.  Rust is 
not good for such problems.

-- hendrik

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Hendrik Boom @ 2020-03-15  5:10 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD6j_Swv4iOPMGC3ZgYpc8+ThqoFnOXqpXGkk4a1e_0Nqw@mail.gmail.com>

On Sat, Mar 14, 2020 at 08:17:07PM -0700, Jacob Lifshay wrote:
> On Sat, Mar 14, 2020, 18:01 Immanuel, Yehowshua U <yimmanuel3@gatech.edu>
> wrote:
> 
> > Hello Jacob,
> >         I’m running through the numbers and studying LibreSOC’s potential
> > markets, and how we’d market the dual architecture.
> > Just how feasible is the dual architecture we’re currently embarking on.
> > Luke says its doable.
> > What are your thoughts, and what are the challenges - just trying to get a
> > comprehensive understanding.
> >
> 
> It will be quite easy to do from the hardware side due to the relative
> simplicity of user-mode RV64GC -- basically all we need is to do is
> implement the instruction decoder and clean up the odds and ends that
> result from the semantic differences.
> 
> The software side will be a little harder but still relatively easy, we
> need to implement support for translating Linux system calls from the
> RISC-V interface to the internal calls, as well as implementing the
> syscalls for switching modes between ISAs -- that's like 80% of the work on
> the Linux Kernel side. For userspace, we can have just executing RISC-V ELF
> executables as a MVP, later, we can implement the stuff in the dynamic
> linker to handle having both Power and RV code loaded in the same process
> -- I'm thinking we should use a system similar to Wine and Darling (like
> Wine but macOS on Linux) where they have two dynamic linkers in the same
> process. Will have to figure that out.

Is the multiarch feature of Linux of any use here?  I think it 
allows a choice of architecture for each *process*.  So we'd 
just have to have two sets of libraries.  We wouldn't have to link 
any code that contains both architectures.

Architecture switch would happen at system call and at process 
switch.

-- hendrik 
> 
> We can also build a bare-metal hypervisor-like program to emulate RV system
> mode to allow easier testing (don't need to boot a whole Linux kernel) as
> well as booting a whole RISC-V OS. I'd estimate that it would be less than
> 10kloc of code.
> 
> Jacob
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Luke Kenneth Casson Leighton @ 2020-03-15  4:00 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD6j_Swv4iOPMGC3ZgYpc8+ThqoFnOXqpXGkk4a1e_0Nqw@mail.gmail.com>

On Sun, Mar 15, 2020 at 3:17 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> On Sat, Mar 14, 2020, 18:01 Immanuel, Yehowshua U <yimmanuel3@gatech.edu>
> wrote:
>
> > Hello Jacob,
> >         I’m running through the numbers and studying LibreSOC’s potential
> > markets, and how we’d market the dual architecture.
> > Just how feasible is the dual architecture we’re currently embarking on.
> > Luke says its doable.
> > What are your thoughts, and what are the challenges - just trying to get a
> > comprehensive understanding.
> >
>
> It will be quite easy to do from the hardware side due to the relative
> simplicity of user-mode RV64GC -- basically all we need is to do is
> implement the instruction decoder and clean up the odds and ends that
> result from the semantic differences.

pretty much.  the RV64GC decoder would map onto the exact same
internal operations (the ones that anton blanchard started), and we
would expand those as necessary.

however that's not the main problem

we actually have a serious "bootstrap" problem in terms of implementing POWER.

here's how it works with RISC-V:

* take spike, and add SimpleV (done - took 2-3 months appx)
* take riscv-isa-tests, and add SimpleV unit tests (done - took about 1 month)
* implement a core in hardware by taking an existing core and adding
in our engine.
* run the EXACT SAME BARE METAL UNIT TESTS.

hardware is bootstrapped.  it's done in an incremental fashion, *one*
unknown at a time.

now let's look at POWER.

1) where are the unit tests?
2) where is the simulator?
3) where is the port of softfloat-3 that supports POWER IEEE754 format?

and on top of this *NON-EXISTENT* (or barely adequate) code, we want
to add a vectorisation system, *and then implement it in hardware*?

that's a minimum of *five* extremely large unknowns.

we therefore have two potential approaches (which we may have to do in
parallel):

1) getting a power isa cycle-accurate simulator plus unit tests is
absolutely essential.

2) getting the core working by bootstrapping up in only *one* unknown
at a time, and that means RISC-V.

as (1) is a software-only effort, we can continue with (2) to keep
hardware-people busy and occupied.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] LibreSOC - RISCV and POWER dual architecture feasibility
From: Jacob Lifshay @ 2020-03-15  3:17 UTC (permalink / raw)
  To: Immanuel, Yehowshua U; +Cc: Libre-RISCV General Development
In-Reply-To: <6AC4EFD4-AA30-42C7-855A-CE68A62F107F@gatech.edu>

On Sat, Mar 14, 2020, 18:01 Immanuel, Yehowshua U <yimmanuel3@gatech.edu>
wrote:

> Hello Jacob,
>         I’m running through the numbers and studying LibreSOC’s potential
> markets, and how we’d market the dual architecture.
> Just how feasible is the dual architecture we’re currently embarking on.
> Luke says its doable.
> What are your thoughts, and what are the challenges - just trying to get a
> comprehensive understanding.
>

It will be quite easy to do from the hardware side due to the relative
simplicity of user-mode RV64GC -- basically all we need is to do is
implement the instruction decoder and clean up the odds and ends that
result from the semantic differences.

The software side will be a little harder but still relatively easy, we
need to implement support for translating Linux system calls from the
RISC-V interface to the internal calls, as well as implementing the
syscalls for switching modes between ISAs -- that's like 80% of the work on
the Linux Kernel side. For userspace, we can have just executing RISC-V ELF
executables as a MVP, later, we can implement the stuff in the dynamic
linker to handle having both Power and RV code loaded in the same process
-- I'm thinking we should use a system similar to Wine and Darling (like
Wine but macOS on Linux) where they have two dynamic linkers in the same
process. Will have to figure that out.

We can also build a bare-metal hypervisor-like program to emulate RV system
mode to allow easier testing (don't need to boot a whole Linux kernel) as
well as booting a whole RISC-V OS. I'd estimate that it would be less than
10kloc of code.

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] benefits of rust
From: Jacob Lifshay @ 2020-03-15  2:47 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200314181350.hahr4ofrf2dmjxz6@topoi.pooq.com>

On Sat, Mar 14, 2020, 11:14 Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> On Fri, Mar 13, 2020 at 10:13:06AM +0000, Luke Kenneth Casson Leighton
> wrote:
>
> >
> > 1). bad: it is seriously demeaning to use the phrase "non-paranoid" -
> > to ACCUSE potential users of rust of "being paranoid".  can i suggest,
> > jacob, raising that as a severe and high-priority issue with the rust
> > community to get that removed effective immediate?
>
> The whole point of rust is that its static checking is reassurance for
> the paranoid!
>

while that's true, Rust does have other benefits over languages such as
Python, JavaScript, Java, C#, C, and C++:
speed, consistency (no GC pauses), native execution, low memory usage,
basically nearly all the gotchas are caught by the compiler at compile-time
(unlike C and C++ and, to a lesser extent, other languages) so if it
compiles then it's likely to work, much more powerful type deduction, the
ability to extend the interface of any type, not needing all the special
cases that come with C++ constructors, vastly improved composability,
accessible and easy to use library ecosystem, very friendly community, much
easier to parallelize code, etc.

Static checking is not just for the paranoid, since the checking enables
programmers to make faster programs by using rust's composability to use
faster more complex algorithms that wouldn't be practically feasible to get
correct in a language such as C or Python.

Here's an example where someone was able to use b-trees instead of the
simpler avl trees because rust's checking and composability meant that it
wasn't extremely hard to get correct (as it would have been in C):
http://dtrace.org/blogs/bmc/2018/09/28/the-relative-performance-of-c-and-rust/

Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] next tasks
From: whygee @ 2020-03-14 18:49 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxzSvs49X5axA=Qii8sj-U3AzHz1mPzEBOWw44+u3iWrg@mail.gmail.com>

Hi Luke :-)

and happy Pi day !

On 2020-03-14 19:28, Luke Kenneth Casson Leighton wrote:
> actually, although we can leverage the privacy aspect to attract
> motivated developers, the main benefit to end-users is: dramatically
> reduced costs due to no royalties and no massive NREs on hard macros
> that need to be amortised across the cost of the chip.
> 
> the fact that the chip is privacy-respecting is a "side-benefit" for
> the majority of people.  the reduced cost is what will hook them.

May I remind the rule #1 of sales pitches ?
tell it to the right person ;-)
I'm already sold way before this project started ;-)

> l.
yg

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] next tasks
From: Luke Kenneth Casson Leighton @ 2020-03-14 18:28 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <07af6b25b38d1a9c7f0b973e1ebe0279@f-cpu.org>

On Sat, Mar 14, 2020 at 6:23 PM <whygee@f-cpu.org> wrote:

> I think the very existence of this project proves you can never
> reassure a paranoid ;-)

actually, although we can leverage the privacy aspect to attract
motivated developers, the main benefit to end-users is: dramatically
reduced costs due to no royalties and no massive NREs on hard macros
that need to be amortised across the cost of the chip.

the fact that the chip is privacy-respecting is a "side-benefit" for
the majority of people.  the reduced cost is what will hook them.

l.

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] next tasks
From: whygee @ 2020-03-14 18:23 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200314181350.hahr4ofrf2dmjxz6@topoi.pooq.com>

On 2020-03-14 19:13, Hendrik Boom wrote:
> On Fri, Mar 13, 2020 at 10:13:06AM +0000, Luke Kenneth Casson Leighton 
> wrote:
>> 1). bad: it is seriously demeaning to use the phrase "non-paranoid" -
>> to ACCUSE potential users of rust of "being paranoid".  can i suggest,
>> jacob, raising that as a severe and high-priority issue with the rust
>> community to get that removed effective immediate?
> 
> The whole point of rust is that its static checking is reassurance for
> the paranoid!

I think the very existence of this project proves you can never
reassure a paranoid ;-)

> -- hendrik
yg

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* Re: [libre-riscv-dev] next tasks
From: Hendrik Boom @ 2020-03-14 18:13 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDzzojEUrOU3vYcza0qB9rM7asNMnaSCCSfG9rE9Nz4i7A@mail.gmail.com>

On Fri, Mar 13, 2020 at 10:13:06AM +0000, Luke Kenneth Casson Leighton wrote:

> 
> 1). bad: it is seriously demeaning to use the phrase "non-paranoid" -
> to ACCUSE potential users of rust of "being paranoid".  can i suggest,
> jacob, raising that as a severe and high-priority issue with the rust
> community to get that removed effective immediate?

The whole point of rust is that its static checking is reassurance for 
the paranoid! 

-- hendrik

_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

* [libre-riscv-dev] [Bug 241] OpenPOWER SImulation is needed of standards
From: bugzilla-daemon @ 2020-03-14 14:18 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-241-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=241

--- Comment #5 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
http://pearpc.sourceforge.net/

another one to investigate

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

^ permalink raw reply

page:   latest

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git