* [libre-riscv-dev] "simple" core
@ 2020-06-07 23:31 Luke Kenneth Casson Leighton
2020-06-07 23:54 ` Cole Poirier
2020-06-08 0:27 ` Yehowshua
0 siblings, 2 replies; 8+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-06-07 23:31 UTC (permalink / raw)
To: Libre-RISCV General Development
the simple core is taking shape as a combination of all the pipelines,
connected to the (5) types of register files. all unit tests that
have been developed to test *individual* pipelines have been borrowed
through inheritance, to run against the register files, this time.
you can try it out as:
python3 soc/simple/test/test_core.py
core.py really is *very* simple. its execution model is as follows:
* receive instruction
* decode instruction
* identify through bitmasking which pipeline can handle it
* enable *only* the MultiCompUnit managing that pipeline
* wait for it to indicate that it is not busy (this includes regfile writing)
* move on to the next instruction.
each MultiCompUnit, of which there are currently five connected up
(ALU, Logical, ShiftRot, CR, Branch), has a number of "operand in" and
"result out" ports. the register files have been *deliberately*
spec'd to match one-for-one the maximum number of ports of each
regfile type needed.
therefore, for example: whilst no other MCU needs INT 2W (2 write
ports), LDSTCompUnit *does* need 2 write ports and consequently the
INT regfile has been allocated 2W. another example: CR requires
*three* read ports *and* the "full" (32-bit) CR, and consequently the
CR regfile is 4R (1 full, 3 4-bit).
this dramatically simplifies the code needed to connect up the MCUs to
the Regfiles, because the port allocations (resource contention aside)
is one-to-one.
the majority of the code in core.py (at present) involves reorganising
"regspecs" into a dictionary-of-dictionaries-of-lists. the structure
is:
* first dictionary key is the register file TYPE (INT, CR, SPRs)
* second dictionary key is the register port NAME (cr0, ra, rb, XER_so)
* list contains the *Function Unit* and operand/result read/write port
that list (on a per-file, per-regname basis) therefore contains *all*
Function Units that wish to contend for that register file port, and,
consequently, it is a simple matter of:
* A. creating a PriorityPicker to select one and *ONLY* one Function
Unit that is permitted to access that port at any one time
* B. creating a Broadcast Bus (fan-in in the case of write, fan-out in
the case of read) connecting regfile port to Function Unit port.
the next phases will involve:
* adding in LDSTCompUnit
* adding in minerva wishbone L1 I-Cache code (including bypass mode)
* including the pre-written scoreboard "Instruction Queue" code
* linking up NIA to the IQ, to fetch instructions and pass them to the decoder.
at that point we will have an actual core that is capable of executing
instructions on its own. after that, we have a basis for carrying out
further code-morphs, to add the precise-capable augmented scoreboard
and so on.
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-07 23:31 [libre-riscv-dev] "simple" core Luke Kenneth Casson Leighton
@ 2020-06-07 23:54 ` Cole Poirier
2020-06-07 23:58 ` Luke Kenneth Casson Leighton
2020-06-08 0:27 ` Yehowshua
1 sibling, 1 reply; 8+ messages in thread
From: Cole Poirier @ 2020-06-07 23:54 UTC (permalink / raw)
To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
On Jun 7 2020, at 4:31 pm, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> the simple core is taking shape as a combination of all the pipelines,
> connected to the (5) types of register files. all unit tests that
> have been developed to test *individual* pipelines have been borrowed
> through inheritance, to run against the register files, this time.
> you can try it out as:
>
> python3 soc/simple/test/test_core.py
Just ran it. SO COOL!!
> the next phases will involve:
>
> * adding in LDSTCompUnit
> * adding in minerva wishbone L1 I-Cache code (including bypass mode)
> * including the pre-written scoreboard "Instruction Queue" code
> * linking up NIA to the IQ, to fetch instructions and pass them to the decoder.
>
> at that point we will have an actual core that is capable of executing
> instructions on its own. after that, we have a basis for carrying out
> further code-morphs, to add the precise-capable augmented scoreboard
> and so on.
>
> l.
Looking forward to seeing this all come together as the rest has so far.
And hopefully contributing a little :)
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-07 23:54 ` Cole Poirier
@ 2020-06-07 23:58 ` Luke Kenneth Casson Leighton
2020-06-08 0:01 ` Cole Poirier
0 siblings, 1 reply; 8+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-06-07 23:58 UTC (permalink / raw)
To: Libre-RISCV General Development
On Mon, Jun 8, 2020 at 12:54 AM Cole Poirier <colepoirier@gmail.com> wrote:
> > python3 soc/simple/test/test_core.py
>
> Just ran it. SO COOL!!
:)
i have to get LDSTCompUnit operational (the L0CacheBuffer memory
alignment), then i'm happier adding it in. right now it hangs if you
send it two instructions, for example - we can't have that as it would
stop core.py from working, as well.
> Looking forward to seeing this all come together as the rest has so far.
> And hopefully contributing a little :)
you already are! when you've added one instruction into the unit tests
for TRAP, that's basically (even with one instruction) when it can go
straight in. other tests can be added later.
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-07 23:58 ` Luke Kenneth Casson Leighton
@ 2020-06-08 0:01 ` Cole Poirier
2020-06-08 0:06 ` Luke Kenneth Casson Leighton
0 siblings, 1 reply; 8+ messages in thread
From: Cole Poirier @ 2020-06-08 0:01 UTC (permalink / raw)
To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
On Jun 7 2020, at 4:58 pm, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> On Mon, Jun 8, 2020 at 12:54 AM Cole Poirier <colepoirier@gmail.com> wrote:
>
>> > python3 soc/simple/test/test_core.py
>>
>> Just ran it. SO COOL!!
>
> :)
>
> i have to get LDSTCompUnit operational (the L0CacheBuffer memory
> alignment), then i'm happier adding it in. right now it hangs if you
> send it two instructions, for example - we can't have that as it would
> stop core.py from working, as well.
>
>> Looking forward to seeing this all come together as the rest has so far.
>> And hopefully contributing a little :)
>
> you already are! when you've added one instruction into the unit tests
> for TRAP, that's basically (even with one instruction) when it can go
> straight in. other tests can be added later.
>
> l.
Thanks! Although I haven't done that yet acutally, I'm trying to get to
it this evening but the Systemes Libres pitch has taken up most of my
afternoon. Will send you and Yehowshua an email about this shortly.
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-08 0:01 ` Cole Poirier
@ 2020-06-08 0:06 ` Luke Kenneth Casson Leighton
2020-06-08 0:10 ` Cole Poirier
0 siblings, 1 reply; 8+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-06-08 0:06 UTC (permalink / raw)
To: Libre-RISCV General Development
On Mon, Jun 8, 2020 at 1:01 AM Cole Poirier <colepoirier@gmail.com> wrote:
> Thanks! Although I haven't done that yet acutally, I'm trying to get to
> it this evening but the Systemes Libres pitch has taken up most of my
> afternoon. Will send you and Yehowshua an email about this shortly.
1am here. consider me "asleep". 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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-08 0:06 ` Luke Kenneth Casson Leighton
@ 2020-06-08 0:10 ` Cole Poirier
0 siblings, 0 replies; 8+ messages in thread
From: Cole Poirier @ 2020-06-08 0:10 UTC (permalink / raw)
To: Libre-RISCV General Development; +Cc: Libre-RISCV General Development
On Jun 7 2020, at 5:06 pm, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> On Mon, Jun 8, 2020 at 1:01 AM Cole Poirier <colepoirier@gmail.com> wrote:
>
>> Thanks! Although I haven't done that yet acutally, I'm trying to get to
>> it this evening but the Systemes Libres pitch has taken up most of my
>> afternoon. Will send you and Yehowshua an email about this shortly.
>
> 1am here. consider me "asleep". l.
Hehe you're doing better than last night. Rest up :)
_______________________________________________
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-07 23:31 [libre-riscv-dev] "simple" core Luke Kenneth Casson Leighton
2020-06-07 23:54 ` Cole Poirier
@ 2020-06-08 0:27 ` Yehowshua
2020-06-08 0:35 ` Luke Kenneth Casson Leighton
1 sibling, 1 reply; 8+ messages in thread
From: Yehowshua @ 2020-06-08 0:27 UTC (permalink / raw)
To: Libre-RISCV General Development
> core.py really is *very* simple. its execution model is as follows:
>
> * receive instruction
> * decode instruction
> * identify through bitmasking which pipeline can handle it
> * enable *only* the MultiCompUnit managing that pipeline
> * wait for it to indicate that it is not busy (this includes regfile writing)
> * move on to the next instruction.
This is great to hear.
Keep up the great work.
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 [flat|nested] 8+ messages in thread
* Re: [libre-riscv-dev] "simple" core
2020-06-08 0:27 ` Yehowshua
@ 2020-06-08 0:35 ` Luke Kenneth Casson Leighton
0 siblings, 0 replies; 8+ messages in thread
From: Luke Kenneth Casson Leighton @ 2020-06-08 0:35 UTC (permalink / raw)
To: Libre-RISCV General Development
On Monday, June 8, 2020, Yehowshua <yimmanuel3@gatech.edu> wrote:
>
> > core.py really is *very* simple. its execution model is as follows:
> This is great to hear.
> Keep up the great work.
very slow without michael's input.
really need help and speeding up.
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 [flat|nested] 8+ messages in thread
end of thread, back to index
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-07 23:31 [libre-riscv-dev] "simple" core Luke Kenneth Casson Leighton
2020-06-07 23:54 ` Cole Poirier
2020-06-07 23:58 ` Luke Kenneth Casson Leighton
2020-06-08 0:01 ` Cole Poirier
2020-06-08 0:06 ` Luke Kenneth Casson Leighton
2020-06-08 0:10 ` Cole Poirier
2020-06-08 0:27 ` Yehowshua
2020-06-08 0:35 ` Luke Kenneth Casson Leighton
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