Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] website title
From: Jacob Lifshay @ 2020-05-06  5:40 UTC (permalink / raw)
  To: Libre-RISCV General Development

I noticed the title for the wiki is still libreriscv, we should change it
to Libre-SOC.

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] daily status update 05may2020
From: Jacob Lifshay @ 2020-05-06  1:24 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDwbe8bVrqR9OpBYR-Xfp-K7XGi=YStbuF-s8jwU2z1O6w@mail.gmail.com>

On Tue, May 5, 2020 at 3:48 AM Luke Kenneth Casson Leighton
<lkcl@lkcl.net> wrote:
> that's it.  what is everyone else doing?

I saw the phoronix article that the wayland book is now freely
available, so I ended up reading it since it will be useful for
implementing wayland support in Kazan later.
https://www.phoronix.com/scan.php?page=news_item&px=Wayland-Book-Free

I mentioned that our project extensively uses reset_less=True with
combinatorial signals on the now-closed nmigen bug about adding
warnings for that case:
https://github.com/nmigen/nmigen/issues/379

I ended up adding the DEFERRED status to the bugzilla installation,
since that way bugs will still show up in the lists of open bugs but
it's obvious from a glance that we aren't worrying about them right
now.

I'm in the midst of figuring out the load/store code Luke wrote, so
you may not see much activity right away.

I read through some of the latest progress on all of PyO3, rust's
RFCs, gitlab-rust, and a few others.

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] [Bug 216] LOAD STORE buffer needed
From: bugzilla-daemon @ 2020-05-06  1:11 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-216-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=216

--- Comment #35 from Jacob Lifshay <programmerjake@gmail.com> ---
The proposed single-op-at-a-time interface would work through PortInterface,
since you already wrote a lot of the code needed to work with it.

-- 
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 216] LOAD STORE buffer needed
From: bugzilla-daemon @ 2020-05-06  1:09 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-216-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=216

--- Comment #34 from Jacob Lifshay <programmerjake@gmail.com> ---
What do you think of the idea to write a single-op-at-a-time memory interface
with all the caches & stuff to work with the rest of the SoC?

it will be much simpler to get right and not take as much time, then, after
that works, we can work on the much more complex multi-op version. That way, we
will have something that works even if the multi-op version doesn't end up
working in time for the october tape out.

-- 
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] daily status update 05may2020
From: Cole Poirier @ 2020-05-06  0:54 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDy45Y2g3LBY_gCVHM3Ngnw0Kx5ssawvOyuNZ1D-HhOn=g@mail.gmail.com>

> On May 5, 2020, at 3:03 PM, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> 
> On Tuesday, May 5, 2020, Cole Poirier <colepoirier@gmail.com> wrote:
> 
>> 
>> I worked on the coriolis2 chroot setup script. The basics are finally
>> working properly, now I’m starting to add the libraries and tools that must
>> be compiled from source.
> 
> 
> fantastic.
> 
> if you coordinate with yehowshua he can link it on the docs pages.
> 
> remember though yehowshua there exists HDL_workflow and the coriolis2 pages
> so duplicating or superceding those, not productive.

In the process of scripting HDL_workflow.coriolis2 I’ve found a good number of things in the coriolis2 part of the workflow that conflict with each other or don’t quite work. I’m planning on finishing my testing of that section tomorrow, so I will coordinate with Yehowshua when I make my modifications to the HDL_Workflow.coriolis2  wiki via this bug report "Bug 291 - HDL Workflow and Coriolis2 chroot automated setup scripts” <https://bugs.libre-soc.org/show_bug.cgi?id=291>.

Cole
_______________________________________________
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 257] Implement demo Load/Store queueing algorithm
From: bugzilla-daemon @ 2020-05-06  0:36 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-257-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=257

--- Comment #31 from Jacob Lifshay <programmerjake@gmail.com> ---
idea review messages on list:
http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2020-May/006293.html

idea on wiki:
https://libre-soc.org/3d_gpu/architecture/alternative-design-idea/

-- 
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 216] LOAD STORE buffer needed
From: bugzilla-daemon @ 2020-05-06  0:33 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-216-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=216
Bug 216 depends on bug 257, which changed state.

Bug 257 Summary: Implement demo Load/Store queueing algorithm
https://bugs.libre-soc.org/show_bug.cgi?id=257

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |DEFERRED
         Resolution|WONTFIX                     |---

-- 
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 257] Implement demo Load/Store queueing algorithm
From: bugzilla-daemon @ 2020-05-06  0:33 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-257-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=257

Jacob Lifshay <programmerjake@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |DEFERRED
         Resolution|WONTFIX                     |---

--- Comment #30 from Jacob Lifshay <programmerjake@gmail.com> ---
deferred for after oct 2020 tape out

-- 
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] load/store execution queue idea
From: Jacob Lifshay @ 2020-05-06  0:23 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxCOYfpj6u0w8Nr+r6CWvz24ukQNUU5U1cXrPAVtWK46A@mail.gmail.com>

Will respond to all these concerns later, once there is more free time.

On Fri, May 1, 2020 at 4:25 AM Luke Kenneth Casson Leighton
<lkcl@lkcl.net> wrote:
>
> On Fri, May 1, 2020 at 3:54 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> > I filled out some notes on my load/store execution queue idea here:
> > https://libre-soc.org/3d_gpu/architecture/alternative-design-idea/
>
> excellent.
>
> > The design should be suitable for the final 28nm SoC and should be
> > able to execute 4 loads or 4 stores or 4 AMOs or 4 fences per cycle,
> > completely adjustable to some other number if we desire. This totally
> > replaces the memory dependency matrix.
>
> hmm.   the MDM is specifically designed to identify separate and
> distinct LD-batches from ST-batches from Atomic-batches, in an
> extremely gate-efficient fashion.  we don't need TSO, we just need to
> preserve the order of batches (and also identify overlaps).
>
>
> > One downside is it doesn't
> > support forwarding from stores to later loads without going through
> > the L1 cache.
>
> that's ok.
>
> ok, a critical aspect to understand about Computational Units: they do
> *not* proceed until the "purpose" that they manage is entirely finished.
> they then *notify* the Dependency Matrices that the "result" is done
> (available), and *then* they drop their "busy" flag, ready for re-use for
> another operation.
>
> this is the total opposite of a pipeline or queue, where you chuck data
> at it, abdicate responsibility for its management, and at some arbitrary
> point in the future, the result comes out, but by that time everything
> has moved on.
>
> an out-of-order scheduling system *cannot* - in any way - permit that
> to happen.  the results would be catastrophic.
>
> therefore in the ALU Computational Units which manage a pipeline
> (or pipelines), we *must* have equal or greated CompUnits than
> there is pipeline depth.
>
> * greater than that is ok: instructions will be able to run ahead.
>   the DESIRE to run instructions (and the order as a DAG) is
>   recorded, however their ACTUAL execution must wait until
>   there is a free pipeline slot.
> * less than that is NOT really ok (a waste of silicon) because there
>   is not enough to track the progress of each and every operation
>   going through each and every pipeline stage.
>
> when it comes to managing Memory, the implications are as follows:
>
> * to have more LD/ST Computation Units than there are "Cells"
>   is likewise ok.  instructions will be able to run ahead.
> * to have LESS LD/ST CUs than there are "Cells" is *NOT* ok,
>   because the ComputationUnits will NEVERRRRR issue a
>   LD or ST until it knows - absolutely and without any shadow of
>   doubt - that the operation it monitors has 100% absolute guaranteed
>   completed.
>
> so that's really crucial information that has implications for the
> design of the LD/ST Buffer, important as context, below.
>
>
> notes:
>
> 1) the cell arrangement still needs an 8-input (8 LD/ST Computation Units)
> to 4-output (head of each "column" of each queue) multiplexer.
> unless i've misunderstood, that alone is a killer.
>
> dropping each of the 8-input queue entries into the first 8 cells *then*
> performing shifting, *that* is okay.  but allowing each and every single
> one of those 8 LD/ST CompUnits to write to cells 0-4? the wiring alone
> is insane.
>
> assume 128 bits per operation (48 address, 64 data, some control lines
> let's round it up to 128 bits): with 128-wide data paths times 8 LD/ST
> Comp Units times *4* to be able to arbitrarily write to any one of
> 4 "top row" cells?  that's a MASSIVE 4096 wires!
>
> we can't possibly have that many wires.
>
> if you meant that the queue width should match the number of LD/ST
> Units - 8-wide because we need 8 LD/ST CompUnits (we might be
> able to get away with only 6) - then the remaining entries will actually
> remain permanently empty, because there *has* to be a direct
> one-to-one match between LD/ST CompUnits and the LD/ST that
> it "manages".
>
> so there would only be 8 LD/STs, and a row depth of 1.
>
> if however we do 2-ports per CompUnit (to cover misaligned), then there
> would be an 8-wide by 2-row arrangement of Cells.
>
> with only a Cell Depth of 1 or 2, the purpose *of* the Cells is defeated
> entirely.  there's no need for shifting: the entries might as well stay
> where they are.
>
> this particularly because even for the "misalignment" case, the LD/ST
> CompUnit is *NEVERRR* going to place anything other than the
> 2 requests it is responsible for into the queue:
>
> * first one covering the lower part of the misaligned request
> * second one covering the upper part.
>
> no matter how many columns (assuming that there is one
> per LDSTCU) all other rows *will* remain empty.
>
> and if the columns are halved (4 wide to cover 8 LD/ST CUs)
> now we have a much more serious problem: the total data bandwidth
> is shrunk to only 4x 64-bit operations *and* there is a multiplexing
> problem actually getting data into the first 2 rows (actually, now,
> 4 rows if there are 2 ports per LD/ST CU, one for lower-misaligned
> one for upper-misaligned).
>
> do we stall the requests if they do not have access?  that means
> that opportunities to keep the L1 cache-line requests 100% full
> are missed, where the current design can *even catch misaligned
> element-strided data requests* and can 100% merge them into
> a full cache-line request.
>
>
>
> "and the L1 cache line address it would use is broadcast to all cells."
>
> this is a full XOR-comparison of the entire address, against every single cell.
>
> if the address is 48 bits and there are 12 cells, using bits 3 and above of
> the address will require 528 XOR gates.
>
> if we want *two* L1 cache line addresses simultaneously (rather than
> going to 256-bit-wide L1 cache lines), that's *two* broadcasts, each 528
> XOR gates.
>
>
> 2) how are overlapping addresses detected?  or, more to the point,
> how are non-overlapping addresses detected such that they can be
> passed through as a group, and given the opportunity to be done in
> parallel?
>
> 3) how would misaligned addresses handled?
>
> 4) i'm not seeing how requests could be merged into "100% full cache
> line" requests, which the current design is capable of doing, by using
> simple bit-wise ANDing and ORing.  the Abstract Prefix Sum class
> doesn't look obvious as to how that happens, and is likely to be
> much more costly than a simple AND and OR network.
>
> 5) how are clashes of addresses *inter-row* detected?  if Cell 0 has a ST
> of 8-bits to address 0x0001 and Cell 1 has a ST of 8 bits to address
> 0x0002 (a 7 byte overlap), how is this detected *in the row*?
>
> in the column it is fine, because only one row is ever done at once
> (which has implications for mis-aligned data requests, there will never
> be a 100% merge opportunity)
>
>
> all of these things took several *months* to factor in to the design, in
> several stages.  it's massively complex and inter-dependent.
>
> l.
>
> _______________________________________________
> 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] experimental code & monorepo
From: Jacob Lifshay @ 2020-05-06  0:08 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyvYgO0SUAQMuwuFPEpi7u4snbUJ1NxrKMuocBqmQeJEQ@mail.gmail.com>

On Sun, May 3, 2020 at 4:03 AM Luke Kenneth Casson Leighton
<lkcl@lkcl.net> wrote:
>
> On Sun, May 3, 2020 at 5:49 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
> >
> > Additionally, I'd advocate for all HDL code (at least soc, ieee754fpu, and
> > nmutil) to be moved to one repo
>
> > and using submodules for often updated external dependencies (nmigen at
> > least),
>
> the experience we've had - already - of using submodules is a royal
> pain in the neck.  commits which involve changing of files *and*
> changing submodules do *not* merge properly, and i actually had to use
> rebase --skip for the first time - ever - in order to recover the
> repository.  this lost some work by michael.

One potential workaround would be to have a server-side git hook that
rejects commits that have changes to a submodule and other files
(other than .gitmodules) in the same commit.

> i'm inclined to suggest (as we discussed on the coriolis2 bug,
> briefly) that an *independent* top-level repo be created that "joins"
> *all* source code - and tools - together.  this to *never*, under any
> circumstances, have actual files added to it (with the exception of a
> README, saying "please read documentation at location X and please do
> not edit this file further").

That could work, but would be difficult to use when developing code.

> > since that helps tie all the code together so one commit id is
> > sufficient to describe the state of all the code that's tightly
> > interconnected. See LLVM switching to a monorepo for an example of how this
> > is a good idea.
>
> if the IEEE754 FP code had not been designed - from the start - to be
> a general-purpose independent library and toolkit, i would agree
> immediately with that.
>
> however it was never intended - ever - right from the start - to be a
> specific hard-coded isolated our-use-only FP library.
>
> <snip>
>
> all three are therefore actually independent projects.  putting their
> source into a single repository has detrimental implications.  it also
> results in confusion about what the roles of each of those three
> independent projects is.

That's seems to work out just fine and even be outright beneficial for
LLVM, where they have many loosely associated libraries/programs all
in the same git repo.

A short list of projects that are mostly unrelated to each other but
are still in the LLVM monorepo:

clangd: a LSP server for adding C++ language support to IDEs
lldb: a interactive debugger
flang: a FORTRAN frontend for LLVM
libc: a WIP C standard library
mlir: a IR originally designed for machine learning, but is now quite
a bit more generic
yaml2obj: a program that converts a YAML description of an object file
to the binary form

Basically all of them can (and are) used nearly independently of the rest.

As long as we state so in all the readmes and other docs, it should be
pretty unambiguous that ieee754fpu can be used independently of most
of the rest of our code. We could even provide a read-only git repo
that mirrors the ieee754fpu directory.

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] daily status update 05may2020
From: Luke Kenneth Casson Leighton @ 2020-05-05 22:53 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <17a2f3a3-c0b3-d437-9ab2-01e67171c461@gmail.com>

On Tuesday, May 5, 2020, Michael Nolan <mtnolan2640@gmail.com> wrote:

> On 5/5/20 3:11 PM, Tobias Platen wrote:
>
>> Today I was mostly reading documentation for the add[o][.], subf[o][.],
>> adde*, subfe*, addze*, neg*, mullw*, divw* instructions that I will
>> implement tomorrow in the simulator.
>>
>
> Which simulator are we using now? There's internalop_sim.py and the
> autogenerated one in decoder/isa.


autogenerated.  good catch michael.  no need to implement code that already
exists.

unit tests need to be written for them however, to confirm that they work.
that funnily enough is more work as you have to test corner cases esp. on
carryin and out.

l.



-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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] daily status update 05may2020
From: Michael Nolan @ 2020-05-05 22:04 UTC (permalink / raw)
  To: Tobias Platen, Luke Kenneth Casson Leighton
  Cc: Libre-RISCV General Development
In-Reply-To: <20200505211144.3fd6a072fe38842b0315d94e@platen-software.de>

On 5/5/20 3:11 PM, Tobias Platen wrote:
> Today I was mostly reading documentation for the add[o][.], subf[o][.], adde*, subfe*, addze*, neg*, mullw*, divw* instructions that I will implement tomorrow in the simulator.

Which simulator are we using now? There's internalop_sim.py and the 
autogenerated one in decoder/isa.

--Michael


_______________________________________________
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] daily status update 05may2020
From: Luke Kenneth Casson Leighton @ 2020-05-05 22:03 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <1000F427-D4EB-4005-868D-CD4956FADBDF@gmail.com>

On Tuesday, May 5, 2020, Cole Poirier <colepoirier@gmail.com> wrote:

>
> I worked on the coriolis2 chroot setup script. The basics are finally
> working properly, now I’m starting to add the libraries and tools that must
> be compiled from source.


fantastic.

if you coordinate with yehowshua he can link it on the docs pages.

remember though yehowshua there exists HDL_workflow and the coriolis2 pages
so duplicating or superceding those, not productive.

Alain, Jacob?




-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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] daily status update 05may2020
From: Luke Kenneth Casson Leighton @ 2020-05-05 22:00 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <7e3497f5-96ba-af11-f5f5-b50e773f3419@gmail.com>

On Tuesday, May 5, 2020, Michael Nolan <mtnolan2640@gmail.com> wrote:

>
> I worked some on the floating point pipelined cordic, adding FPPipeContext
> tracking so it could be integrated with the FPU. I also fixed
> test_decoder_gas, and began working on adding branches to the pseudocode
> simulator. Basic branches (b, ba) should work, conditional ones and branch
> with link, not so much.


still excellent.  coordinating with tobias, working in separate areas you
should do fine.

if it would help, check in pearpc see how it's done.  generic subdirectory
not the JIT ones.  alain should know where.

at least with the simulator there is no need to be concerned about pipeline
latency.

l.




-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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] daily status update 05may2020
From: Luke Kenneth Casson Leighton @ 2020-05-05 21:55 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <20200505211144.3fd6a072fe38842b0315d94e@platen-software.de>

On Tuesday, May 5, 2020, Tobias Platen <libre-soc@platen-software.de> wrote:

> Today I was mostly reading documentation for the add[o][.], subf[o][.],
> adde*, subfe*, addze*, neg*, mullw*, divw* instructions that I will
> implement tomorrow in the simulator.


fantastic, that's really helpful.

l.


-- 
---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68
_______________________________________________
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] daily status update 05may2020
From: Cole Poirier @ 2020-05-05 21:13 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDwbe8bVrqR9OpBYR-Xfp-K7XGi=YStbuF-s8jwU2z1O6w@mail.gmail.com>

> On May 5, 2020, at 3:48 AM, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> 
> i'm going to start doing daily status updates on the list,
> "kanban-style".  it would be good if everyone else did as well, as we
> can keep in touch and see what's going on.
> 
> ...
> 
> that's it.  what is everyone else doing?
> 
> l.

I worked on the coriolis2 chroot setup script. The basics are finally working properly, now I’m starting to add the libraries and tools that must be compiled from source.

Cole
_______________________________________________
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] daily status update 05may2020
From: Michael Nolan @ 2020-05-05 20:26 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDwbe8bVrqR9OpBYR-Xfp-K7XGi=YStbuF-s8jwU2z1O6w@mail.gmail.com>

On 5/5/20 6:47 AM, Luke Kenneth Casson Leighton wrote:
> i'm going to start doing daily status updates on the list,
> "kanban-style".  it would be good if everyone else did as well, as we
> can keep in touch and see what's going on.

I worked some on the floating point pipelined cordic, adding 
FPPipeContext tracking so it could be integrated with the FPU. I also 
fixed test_decoder_gas, and began working on adding branches to the 
pseudocode simulator. Basic branches (b, ba) should work, conditional 
ones and branch with link, not so much.

--Michael


_______________________________________________
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] daily status update 05may2020
From: Tobias Platen @ 2020-05-05 19:11 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <CAPweEDwbe8bVrqR9OpBYR-Xfp-K7XGi=YStbuF-s8jwU2z1O6w@mail.gmail.com>

Today I was mostly reading documentation for the add[o][.], subf[o][.], adde*, subfe*, addze*, neg*, mullw*, divw* instructions that I will implement tomorrow in the simulator.

On Tue, 5 May 2020 11:47:32 +0100
Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:

> i'm going to start doing daily status updates on the list,
> "kanban-style".  it would be good if everyone else did as well, as we
> can keep in touch and see what's going on.
> 
> yesterday i got the preliminary / testing L0CacheBuffer up and
> running: the important bit being the PortInterface class which
> connects to the LD/ST Computational Units.
> 
> today i'll be working on the redesigned LD/ST Computational Unit which
> has 3R-2W (indexed and update) capability.
> https://libre-soc.org/3d_gpu/ld_st_comp_unit.jpg
> 
> the L0CacheBuffer is on the critical path even for testing of the
> LDSTCompUnit, because there are several LDSTCompUnits, all connecting
> to the (one) L0CacheBuffer.
> 
> that's it.  what is everyone else doing?
> 
> l.
> 
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev@lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev


-- 
Tobias Platen <libre-soc[at]platen-software[dot]de>

_______________________________________________
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] CORDIC importance
From: Luke Kenneth Casson Leighton @ 2020-05-05 18:25 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <e520ea72-aa03-a844-bb54-3d3db177bd99@gmail.com>

On Tue, May 5, 2020 at 6:33 PM Michael Nolan <mtnolan2640@gmail.com> wrote:
>
> Luke,
>
> I know we're tight on time for the tapeout in October. Is there
> something that would be better for me to work on right now than the cordic?

actually probably yes - although we do really need SIN, COS (etc.)

* cyclic buffer for the regfile.  https://bugs.libre-soc.org/show_bug.cgi?id=296
* simulator (still needed, to "track" the hardware so i know what to
design!) in particular, the branch unit.  which first needs carry-in
and carry-out (CR0 etc.)
* an actual pipelined ALU, that expands on the alu_hier.py concept and
adds more functions - however it also needs to use PartitionedSignal.
this can default to "all off" initially.
* a 128-to-64 Wishbone Arbiter.  take in 128 bit read/write requests,
split them into 2 separate 64-bit Wishbone read/write requests, but
use a bit per half (HI-64, LO-64) to indicate "we do or do not" need
this half to go out.

later (not much later) we will need:

* a RADIX MMU lookup system (POWER-compliant)
* a TLB that caches RADIX lookups

you're almost certainly going to find a nmigen or migen Wishbone
Arbiter out there somewhere already, there may even be one in minerva
already.

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] Finished Scoreboard
From: Immanuel, Yehowshua U @ 2020-05-05 18:20 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <690DF9FB-783E-49DB-9D86-0233D34F57B8@gatech.edu>

Maybe we could say finished by Mid-June - but more than that would really be pushing things I think.

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] Finished Scoreboard
From: Yehowshua @ 2020-05-05 18:18 UTC (permalink / raw)
  Cc: Libre-RISCV General Development
In-Reply-To: <CAPweEDxJ1HYkOYcn58jUtuUjz6q2jossMdRw54xhN4aANkW0mQ@mail.gmail.com>

Well I’d like to be realistic. I’ve done large RTL projects before - if the scoreboard isn’t ready to do by June, we may have to look into the minimum viable product for October. Having a multi cycle non-pipelined CPU is way better than no CPU.

Luke, given only you have the knowledge to do the Scoreboard at the moment, it’d be wise to put eggs in more than one basket. Also, it takes at least a semester to fully comprehend the scoreboard architecture, so we can’t just add people to help you.

Just some things to keep in mind.

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] CORDIC importance
From: Michael Nolan @ 2020-05-05 17:33 UTC (permalink / raw)
  To: Luke Kenneth Casson Leighton; +Cc: Libre-RISCV General Development

Luke,

I know we're tight on time for the tapeout in October. Is there 
something that would be better for me to work on right now than the cordic?

Thanks,

Michael


_______________________________________________
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 208] implement CORDIC in a general way sufficient to do transcendentals
From: bugzilla-daemon @ 2020-05-05 17:30 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-208-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=208

--- Comment #54 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #53)
> ok what else can we throw in here?  LOG1P is probably a good thing to try
> 
> i know - somewhere - i've seen a python implementation of vector mode.
> it also specified, as you can see, the three other modes: circular,
> linear, hyperbolic.
> 
> ah!  i know why we want to keep the two answers: see p39 of that
> thesis: you can use them (with some post-processing) to do
> tan.

Yep, that was my thought. 

> "vector" mode the vector is rotated to be flat against the x-axis,
> recording the angle (Z) needed to do so.
> 
> 
> if you can drop that into a repository, get it working, write a
> few simple experiments and see how it operates in each of the 6
> modes, we're on a roll :)

I can give it a whirl I suppose

-- 
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 208] implement CORDIC in a general way sufficient to do transcendentals
From: bugzilla-daemon @ 2020-05-05 17:02 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-208-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=208

--- Comment #53 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #52)
> (In reply to Luke Kenneth Casson Leighton from comment #50)
> > btw 12 stages is too many, because we need a minimum of one FunctionUnit
> > "managing" (matching up) source operands and results.
> > 
> > each extra Function Unit added creates an Order N^2 increase in the overall
> > size of the Dependency Matrices.
> > 
> > so - and i don't mean right now - if this can be either:
> > 
> > * cut into two separate pipelines (partial data fed back as a micro-op)
> > * number of combinatorial blocks increased to 5 or 6
> > 
> > we stand a chance of keeping the FU count down (8 is ok).
> > 
> > have to think that through carefully, how to do micro-ops.
> 
> Sure. I don't know about splitting it up into multiple uops,

neither do i at the moment!  i think i might have got confused about
sharing the MUL unit with FPMUL.

>  but reducing
> the number of stages is pretty easy. I added a parameter to the module
> called rounds_per_stage which governs how many cordic rounds go in each
> pipeline stage. Increasing that number will decrease the number of pipeline
> stages.

fantastic, that's exactly the kind of parameterisation _we_ need,
however as a general-purpose IEEE754 FP library, it's exactly
the kind of parameterisation that other _users_ need :)

> 
> (In reply to Luke Kenneth Casson Leighton from comment #51)
> > the other option:
> > 
> > keep the long pipeline lengths: we *know* that there's more stages than
> > there are FUs, and that's just "tough luck".  we know that with only
> > 8 FUs and 12 pipeline stages, 4 of those at any one time will run
> > empty, and we just... live with that.
> 
> I was going to ask if we could do something like this. Since I don't think
> the cordic will be used *that* often, this seems like a reasonable thing to
> do.

yehyeh.

ok what else can we throw in here?  LOG1P is probably a good thing to try

this is a great explanation:
http://www.mclenegan.com/public/thesis.pdf

section 4.4.1 explains "rotation mode"

however we also need *vector* mode (4.4.2)

i know - somewhere - i've seen a python implementation of vector mode.
it also specified, as you can see, the three other modes: circular,
linear, hyperbolic.

ah!  i know why we want to keep the two answers: see p39 of that
thesis: you can use them (with some post-processing) to do
tan.

also, see circular-vectoring mode, it ends up computing the
normal distance and... and the angle?  ohh, that's for... darn
what was it... it's for arcs.  there's a name for this... sorry
i forget what it's called right now.

https://www.ijert.org/vhdl-implementation-of-cordic-algorithm-for-wireless-lan

this version, p14, explains much clearer that "rotate" mode goes
by angle and computes x,y

"vector" mode the vector is rotated to be flat against the x-axis,
recording the angle (Z) needed to do so.

this one is a survey of CORDIC algorithms:
http://www.ee.ic.ac.uk/pcheung/teaching/ee3_DSD/crdcsrvy.pdf

it shows - *briefly* - how to use them to do different things, but
it also, by being a survey, has some really useful insights into
various optimisations.

so can i suggest, first adding the infrastructure back in to allow
cancellation and operations (ctx), then see if you can add one extra
"mode" (the m=-1, m=0, m=1 thing seems trivial which will give the
circular, linear and hyperbolic modes, respectively).

"circular" mode is covered with the output being SIN/COS.

ah ha!  here's a useful suite of implementations (annoyingly being
in jupiter)
https://github.com/suyashmahar/cordic-algorithm-python/blob/master/cordic_implementation.ipynb

extractign the two modes:


circular = 1
linear = 0
hyperbolic = -1



def ROM_lookup(iteration, coordinate):
    if (coordinate == circular):
        return math.degrees(math.atan(2**(-1*iteration)))
    elif (coordinate == linear):
        return 2**(-1*iteration)
    elif (coordinate == hyperbolic):
        return (math.atanh(2**(-1*iteration)))

def rotation_mode(x, y, z, coordinate, iterations):
    a = 0.607252935;   # = 1/K

    x_val_list = []
    y_val_list = []
    z_val_list = []
    iterations_list = []

    i = 0;                  # Keeps count on number of iterations

    current_x = x         # Value of X on ith iteration 
    current_y = y         # Value of Y on ith iteration
    current_z = z         # Value of Z on ith iteration

    di = 0

    if (coordinate == hyperbolic):
        i = 1
    else:
        i = 0

    flag = 0

    if (iterations > 0):
        while (i < iterations):
            if (current_z < 0):
                di = -1
            else:
                di = +1
            next_z = current_z - di * ROM_lookup(i, coordinate)
            next_x = current_x - coordinate * di * current_y * (2**(-1*i))
            next_y = current_y + di * current_x * 2**(-1*i)

            current_x = next_x
            current_y = next_y
            current_z = next_z

            x_val_list.append(current_x)
            y_val_list.append(current_y)
            z_val_list.append(current_z)

            iterations_list.append(i)

            if (coordinate == hyperbolic):
                if ((i != 4) & (i != 13) & (i!=40)):
                    i = i+1
                elif (flag == 0):
                    flag = 1
                elif (flag == 1):
                    flag = 0
                    i = i+1
            else:
                i = i+1
    return { 'x':x_val_list, 'y':y_val_list, 'z':z_val_list,
'iteration':iterations_list, }


ahhh, i recognise this code :)  i've seen it before.  
def vector_mode(x, y, z, coordinate, iterations):
    a = 1.2075;   # = 1/K

    x_val_list = []
    y_val_list = []
    z_val_list = []
    iterations_list = []

    i = 0;                  # Keeps count on number of iterations

    current_x = x         # Value of X on ith iteration 
    current_y = y         # Value of Y on ith iteration
    current_z = z         # Value of Z on ith iteration

    di = 0

    # This is neccesary since result for i=0 doesn't exists for hyperbolic 
    # co-ordinate system.
    if (coordinate == hyperbolic):
        i = 1
    else:
        i = 0

    flag = 0

    if (iterations > 0):
        while (i < iterations):
            di = -1*math.copysign(1, current_y);#*current_x);
            next_x = current_x - coordinate * di * current_y * (2**(-1*i))
            next_y = current_y + di * current_x * 2**(-1*i)
            next_z = current_z - di * ROM_lookup(i, coordinate)

            current_x = next_x
            current_y = next_y
            current_z = next_z

            x_val_list.append(current_x)
            y_val_list.append(current_y)
            z_val_list.append(current_z)

            iterations_list.append(i)

            if (coordinate == hyperbolic):
                if ((i != 4) & (i != 13) & (i!=40)):
                    i = i+1
                elif (flag == 0):
                    flag = 1
                elif (flag == 1):
                    flag = 0
                    i = i+1
            else:
                i = i+1
    return { 'x':x_val_list, 'y':y_val_list, 'z':z_val_list,
'iteration':iterations_list }

if you can drop that into a repository, get it working, write a
few simple experiments and see how it operates in each of the 6
modes, we're on a roll :)

-- 
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 208] implement CORDIC in a general way sufficient to do transcendentals
From: bugzilla-daemon @ 2020-05-05 16:28 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-208-13@https.bugs.libre-soc.org/>

https://bugs.libre-soc.org/show_bug.cgi?id=208

--- Comment #52 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #50)
> btw 12 stages is too many, because we need a minimum of one FunctionUnit
> "managing" (matching up) source operands and results.
> 
> each extra Function Unit added creates an Order N^2 increase in the overall
> size of the Dependency Matrices.
> 
> so - and i don't mean right now - if this can be either:
> 
> * cut into two separate pipelines (partial data fed back as a micro-op)
> * number of combinatorial blocks increased to 5 or 6
> 
> we stand a chance of keeping the FU count down (8 is ok).
> 
> have to think that through carefully, how to do micro-ops.

Sure. I don't know about splitting it up into multiple uops, but reducing the
number of stages is pretty easy. I added a parameter to the module called
rounds_per_stage which governs how many cordic rounds go in each pipeline
stage. Increasing that number will decrease the number of pipeline stages. 

(In reply to Luke Kenneth Casson Leighton from comment #51)
> the other option:
> 
> keep the long pipeline lengths: we *know* that there's more stages than
> there are FUs, and that's just "tough luck".  we know that with only
> 8 FUs and 12 pipeline stages, 4 of those at any one time will run
> empty, and we just... live with that.

I was going to ask if we could do something like this. Since I don't think the
cordic will be used *that* often, this seems like a reasonable thing to do.

-- 
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