* [libre-riscv-dev] [Bug 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 18:23 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #21 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
hiya michael i deployed a trick that was used in the PartitionedAdder.
rather than use 2 separate adds, A and B are shifted up by 1 bit, then
you put a 1 into A[0] and the carry into B[0]. that way you do a 66
bit add, discard bit 0, result is bits 1-64, and carry is the MSB.
--
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] Handling Interrupts
From: Yehowshua @ 2020-05-09 17:23 UTC (permalink / raw)
To: Libre-RISCV General Development
One thing I just realized that I’ve never done in any of the RTL CPUs I’ve worked with is enable interrupts.
How are interrupts done in RTL? As soon as the CPU controller sees that EINT is high, does it(upon the next clock boundary), flush the pipeline and immediately jump to the handler?
I’m aware that there can be external hardware such as a PLIC to arbitrate interrupts, I’m just not certain about the actual CPU RTL - what it would do. That is, if the CPU immediately jumps to the handler address - or if it bothers to save a few register first( this might depend on the actual ISA itself too).
I see that for MIPS(link below), there is a dedicated area in memory to dump the current GPR values.
https://courses.engr.illinois.edu/cs232/sp2012/section/disc5.pdf <https://courses.engr.illinois.edu/cs232/sp2012/section/disc5.pdf>
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] Pinout, interfaces, Rudi, and Raptor
From: Yehowshua @ 2020-05-09 14:39 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <792ac37b0c72350337f07c758d51a24eaa9ac532.camel@fibraservi.eu>
> On May 9, 2020, at 5:12 AM, Staf Verhaegen <staf@fibraservi.eu> wrote:
>
> The October prototype tape-out will not be cost-effective for that. It is a multi-project wafer.
Yes we know. One of our potential customers did eventually want to do a low cost SBC - so choosing cheaper peripherals is always a good way to go.
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] daily kan-ban update 08may2020
From: Yehowshua @ 2020-05-09 14:33 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDyUSBhKeoiTsSzwULWKs4WcR4qH+WbLtLKA6gP60Px0dA@mail.gmail.com>
>
> this one? https://en.wikipedia.org/wiki/Green%27s_theorem
>
> ooo can you do superposition of spherical harmonics?
>
https://indico.fnal.gov/event/15645/contributions/32829/attachments/20492/25589/vg_phot_diffuse_dppdmeet.pdf <https://indico.fnal.gov/event/15645/contributions/32829/attachments/20492/25589/vg_phot_diffuse_dppdmeet.pdf>
This one - page 6. When you impose a non-contiguous boundary condition,
you get re-emission in the form of point sources.
Its the analytical interpretation of the physical phenomenon that occurs
when you shine light through a tiny slit onto a wall and observe a sinusoidal
wave pattern illumination instead of just seeing a very narrow beam on the
opposing wall.
> l.
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 14:06 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #20 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #19)
> stage (final one), then an ALUIntermediateData is needed
p.s. feel free to pick a better name :)
--
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 14:04 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #19 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ok as it's "pass-through", i added so (and a comment) to main_stage.
also added some similar comments (and pass-through of so) on
input_stage.
diff --git a/src/soc/alu/main_stage.py b/src/soc/alu/main_stage.py
index e801c96..07fb018 100644
--- a/src/soc/alu/main_stage.py
+++ b/src/soc/alu/main_stage.py
@@ -39,7 +39,9 @@ class ALUMainStage(PipeModBase):
with m.Case(InternalOp.OP_XOR):
comb += self.o.o.eq(self.i.a ^ self.i.b)
+ ###### sticky overflow and context, both pass-through #####
+ comb += so.eq(self.i.so)
comb += self.o.ctx.eq(self.i.ctx)
return m
about this:
class ALUOutputStage(PipeModBase):
def __init__(self, pspec):
super().__init__(pspec, "output")
def ispec(self):
return ALUOutputData(self.pspec)
def ospec(self):
return ALUOutputData(self.pspec)
if ALUOutputSpec is designed to generate ov, ov32, cr0 in *this*
stage (final one), then an ALUIntermediateData is needed
which does not have ov, ov32 or cr0 (etc.) in 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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 13:48 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #18 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #16)
> Summary Overflow is "sticky". Once one instruction sets the overflow bit,
> summary overflow gets set until it's cleared by a mtspr instruction.
> Effectively for each instruction it's (so = so | ov). That's why it's
> included in the input stage.
ohhh. yep. got it now. can you drop a comment into the data structure to that
effect? the idea being that "why is this here" should be answered (or, a
reminder of the answer)
--
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 13:45 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #17 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #14)
> We still need a carry_in from XER for things like add with carry.
just to check, XER is a Condition Register, right?
we may almost certainly need to split out the *individual* fields of XER and
other Condition Registers into actual separate "registers", even though they
are one or two bits.
the reason is because if we do not it will create artificial dependency
barriers between instructions that read or write some part of XER but not
another.
therefore all of CR0-CR7 need to be *different* "operands", likewise OV32, OV
and so on.
--
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 13:41 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #16 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #15)
> (In reply to Michael Nolan from comment #14)
> > (In reply to Luke Kenneth Casson Leighton from comment #13)
> >
> > > with "carry_in" being *generated* by ALUInputStage, ALUInputData should
> > > *not* have "carry_in" as a field.
> >
> > We still need a carry_in from XER for things like add with carry.
>
> ah doh, yes you are absolutely right.
>
> hmm hmmm sooo....
>
> actually.... the default action from the if elif batch is to copy that
> carry_in from the input spec over to the output spec.
>
>
> >
> > > the reason is because it will never be set by the *user* of this stage,
> > > and consequently a dangling wire will end up being created.
> > > -----
> > >
> > > what's "so" intended for?
> >
> > Summary Overflow.
>
> okaay. so if it's a generated output, set only as a result as part of the
> operation (in the 2nd or 3rd stage), it should *not* be in the ispec(), only
> in the ospec() for later stage(s)
Summary Overflow is "sticky". Once one instruction sets the overflow bit,
summary overflow gets set until it's cleared by a mtspr instruction.
Effectively for each instruction it's (so = so | ov). That's why it's included
in the input stage.
--
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 13:37 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #15 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #14)
> (In reply to Luke Kenneth Casson Leighton from comment #13)
>
> > with "carry_in" being *generated* by ALUInputStage, ALUInputData should
> > *not* have "carry_in" as a field.
>
> We still need a carry_in from XER for things like add with carry.
ah doh, yes you are absolutely right.
hmm hmmm sooo....
actually.... the default action from the if elif batch is to copy that carry_in
from the input spec over to the output spec.
>
> > the reason is because it will never be set by the *user* of this stage,
> > and consequently a dangling wire will end up being created.
> > -----
> >
> > what's "so" intended for?
>
> Summary Overflow.
okaay. so if it's a generated output, set only as a result as part of the
operation (in the 2nd or 3rd stage), it should *not* be in the ispec(), only in
the ospec() for later stage(s)
basically:
* if something is needed in the stage it must be added to the ispec()
* if something is produced *by* the stage ot must be added to the ospec()
* if something is needed by later stages, the only way they will get it is by
"passing through" the current stage and consequently it has to be added to
*both* ispec and ospec.
* if a final output is generated by an early stage, then clearly the only way
to get it all the way to the ends is, again, by "passing through" to later
stages and consequently putting it into both ispec and ospec.
summary-out sounds like it is output-only (3rd stage?).
carry-out likewise (from 2nd stage)
carry-in you are right is needed as input *and* output on *this* (first) stage,
where in later stages it will not be.
a and b and op are all "passthru" for this 1st stage. however a and b are input
only or the 2nd stage, but you *might* need some of the information from op for
the 3rd stage.
welcome to pipelines :)
--
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 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-09 13:13 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #14 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #13)
> with "carry_in" being *generated* by ALUInputStage, ALUInputData should
> *not* have "carry_in" as a field.
We still need a carry_in from XER for things like add with carry.
> the reason is because it will never be set by the *user* of this stage,
> and consequently a dangling wire will end up being created.
> -----
>
> what's "so" intended for?
Summary Overflow.
--
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] insights about the selection of the design and architecture
From: Luke Kenneth Casson Leighton @ 2020-05-09 13:08 UTC (permalink / raw)
To: Libre-RISCV General Development
in talking to john scott last night, something occurred to me that was
only clear after the discussions off-list last week about abandoning
the design and moving to a "simpler" in-order system.
it stems from this: an in-order system is nothing new. it's not
exciting, it's not novel, it's not innovative, and consequently when
talking to people about it, the chances of them going "wow", becoming
supportive and wanting to help and see us succeed become significantly
reduced.
john trained as an electrical engineer. he'd heard of the Tomasulo
Algorithm, and (surprisingly) knew exactly what Reservation Stations
were. i was therefore able to explain to him in about 2-3 minutes
that where Tomasulo Reservation Stations have multiple rows (in a
queue), the scoreboard system only has one "row" per Reservation
Station, that we express the Reorder Buffer (ROB) index in unary, that
consequently the power consumption for the ROB, by no longer requiring
a binary-indexed CAM becomes massively reduced, and that in addition
by setting multiple unary bits you can extremely easily add
multi-issue capability.
by contrast it is extremely difficult and massively power-demanding to
add multi-issue on top of Tomasulo (efforts have been made, and
they're a mess) - multiple entries into the ROB can only be added by
using multi-way CAM lookups, and that's just one of the barriers.
this was exactly the kind of *technical* "wow" moment that he deeply
appreciated, and it will inspire him to write an absolutely fantastic
article.
i then went on to explain that we are reviving and augmenting a design
from *1965* - the world's first superscalar out-of-order pipelined
design. this was in and of itself another "wow" moment, as i
explained to him the capability of the CDC 6600, and that, by using
such an elegant and resource-constrained design we end up with a more
power-efficient *modern* design as a result.
in addition, because of the very fact that we are reviving this
historic design, Mitch Alsup has been willing to spend signficant
amounts of time discussing it and teaching how it works. with so many
people having done "simpler" in-order systems, the chances of him -
and the other major participants on comp.arch - speaking to us about
an *in-order* micro-architecture would be extremely remote.
we'd be referred to the internet (to do some arbitrary google search)
and that would be the end of the discussion.
the bottom line then is that it's the willingness not just to tackle
something that's technically challenging, it's the willingness to
teach others (i am *already* helping out other participants on
comp.arch to understand the complexities of out-of-order and
scoreboard systems), to revive a historical design, and to bring that
to a wider world and give people back Soverign control over their
computing devices?
*that* is "wow".
if we try to do a "simple" in-order system as the core of the design
we lose almost *every* exciting and unique aspect of this project,
turning it into "yet another run-of-the-mill processor". as a result,
the interest in and the wider support for what we're doing - aiming
for a far less ambitious goal - would not be there.
anyway.
john will send me the article for review: i'll drop it on the wiki for
everyone to read, comment on and edit, and we let him know when we're
ready. he also suggested the idea of actually linking *to* the
article (from the magazine), so whilst the "top" part will be 600-800
words, interested people can see our commentary, extra insights and so
on *below* the copy of the article, on the wiki.
which i thought was a great idea.
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
* [libre-riscv-dev] daily kan-ban update 09may2020
From: Luke Kenneth Casson Leighton @ 2020-05-09 11:33 UTC (permalink / raw)
To: Libre-RISCV General Development
i appreciate it's the weekend. don't feel obligated to respond :)
yesterday:
* i got LD/ST "preliminary" working - indexed and immediate mode, also
bug-fixed prototype/stand-in L0CacheBuffer
* did a mental 2-hour conversation for the magazine with John Scott
from MarketNext. very interesting guy.
* helped Michael get started with the ALU pipeline (documented the
concept of parallel Function Units as a side-effect)
this morning:
* helped Yehowshua with the use of pinmux (because if we try to do a
pin spec without using it, one single change - even just one moved or
renamed pin - will require changes to FIVE or more separate files,
including the docs, the spec, the hardware, the linux kernel source
files, the Wishbone Register files - everything)
* got LD/ST "Update" mode working (returns the Effective Address
addition as a 2nd output result)
* watched part of Season 10 finale of American Ninja Warrior
today's main task (and the next 2-3 days) will be to integrate the
modifications to LDSTCompUnit into the 6600scoreboard. it *seems*
like it shouldn't take long, however the number of read ports has
increased to 3 and it's the first CompUnit to have that many.
however it's a big context-switch and i'm - once again - in a lot of
pain, having been up too late yesterday. so today is likely to
involve sunshine and American Ninja Warrior.
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] Pinout, interfaces, Rudi, and Raptor
From: Luke Kenneth Casson Leighton @ 2020-05-09 10:02 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <792ac37b0c72350337f07c758d51a24eaa9ac532.camel@fibraservi.eu>
On Sat, May 9, 2020 at 10:12 AM Staf Verhaegen <staf@fibraservi.eu> wrote:
> You refer to a first SBC preferably low-cost. The October prototype tape-out will not be cost-effective for that. It is a multi-project wafer.
i explained this to Yehowshua, however it was off-list during a very
rapid conversation with Tim from Raptor CS - thank you for putting
this on-list.
> You can order extra wafers but it does mean that the cost of that wafer is divided over much less devices; meaning the cost will be around $32 per chip and some of them will not be functional; in microelectrics you never have 100% yield. Also I think there is limit on only be able to get at most 1000 chips this way.
(in lower geometries on MPW Programmes, 30% yield is good going).
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
* [libre-riscv-dev] pinmux to generate interfaces (with no pinmux)
From: Luke Kenneth Casson Leighton @ 2020-05-09 9:59 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDwwi_xMFa+DnTEpvwd-LbF6ebA2=dd_RtsGDVQH5CnLQg@mail.gmail.com>
transferring this to the list
https://git.libre-soc.org/?p=pinmux.git
On Sat, May 9, 2020 at 9:41 AM Luke Kenneth Casson Leighton
<lkcl@lkcl.net> wrote:
>
> $ python ./src/pinmux_generator.py -s i_class -v -o i_class
> $ python ./src/pinmux_generator.py -v -o i_class
>
> then ignore the bsv_src and examine i_class.mdwn.
same for minitest and microtest.
note: for EINT, GPIO and PWM because its naming is a different
convention (auto-repeated numbering of a single function - PWM0, PWM1,
PWM2) you do *not* specify the 1st argument.
ps.gpio("", ('A', 1), 0, 0, 3)
NOT ps.gpio("A", ('A', 1), 0, 0, 3)
or ps.gpio("0", ('A', 1), 0, 0, 3)
this means "add GPIOA" starting from position 1, starting from
numbering 0 (GPIOA_A0..), and add 3 of them. result:
## Bank A (3 pins, width 4)
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
| 0 | | A UART0_TX | | |
| 1 | A GPIOA_A0 | A UART0_RX | A TWI0_SDA | |
| 2 | A GPIOA_A1 | A UART1_TX | A TWI0_SCL | |
| 3 | A GPIOA_A2 | A UART1_RX | | A TWI0_SDA |
ps.gpio("", ('A', 0), 0, 1, 3)
this means "start numbering from 1" (GPIOA_A1/2/3)
result:
## Bank A (3 pins, width 4)
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
| 0 | A GPIOA_A1 | A UART0_TX | | |
| 1 | A GPIOA_A2 | A UART0_RX | A TWI0_SDA | |
| 2 | A GPIOA_A3 | A UART1_TX | A TWI0_SCL | |
| 3 | | A UART1_RX | | |
unfortunately you can't place GPIO pins in Mux1, Mux2 or Mux3 columns
(i just tried) - this is undesirable anyway because you *want* GPIO to
be in the Mux0 column.
however you _can_ place uart, i2c etc. in Mux0:
ps.uart("0", ('A', 0), 0) <=== Mux0 column
ps.uart("1", ('A', 2), 1) <=== Mux1 column
result:
## Bank A (3 pins, width 4)
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
| 0 | A UART0_TX | | | |
| 1 | A UART0_RX | | A TWI0_SDA | |
| 2 | | A UART1_TX | A TWI0_SCL | |
| 3 | | A UART1_RX | | A TWI0_SDA |
so we will want something like:
def pinspec():
pinbanks = {
'A': (10, 1), <<<--- only one column (no pinmux, effectively)
}
....
....
ps.gpio("", ('A', 0), 0, 0, 3) # 3 pins, bank A row 0+1+2, starting in col0
ps.uart("0", ('A', 4), 0) # UART0 in bank A row 4+5, col0
ps.uart("1", ('A', 6), 0) # UART1 in bank A row 6+7, col0
ps.i2c("0", ('A', 8), 0) # TWI0 in bank A row 8+9, col0
which will generate this:
## Bank A (10 pins, width 1)
| Pin | Mux0 | Mux1 | Mux2 | Mux3 |
| --- | ----------- | ----------- | ----------- | ----------- |
| 0 | A GPIOA_A0 |
| 1 | A GPIOA_A1 |
| 2 | A GPIOA_A2 |
| 4 | A UART0_TX |
| 5 | A UART0_RX |
| 6 | A UART1_TX |
| 7 | A UART1_RX |
| 8 | A TWI0_SDA |
| 9 | A TWI0_SCL |
ignore the extra headings they are just a "print" statement, hard-coded.
test scenarios are specified with ps.add_scenario(). for each
"customer scenario" add what interfaces are desired by the customer,
and the add_scenario() function will *automatically go hunting for
that interface*.
in a multiplexed design this allows you to make damn sure that *ALL*
scenarios are covered by the chip. design something that's not going
to cover a potential (or actual) customer's requirements and you just
wasted USD $20 million.
the usefulness of the add_scenario() function in our case is the
auto-generation of the documentation (markdown file) which "describes"
the customer scenario in its own section.
there's plenty of examples (c_class, i_class, minitest, microtest) -
just bear in mind *move slowly and incrementally*. add just the one
function at a time, or start straight away from minitest or something.
btw *sigh* you'll need to add the new spec actually to src/spec/__init__.py:
from spec import m_class
from spec import c_class
from spec import i_class
from spec import minitest
from spec import microtest
from spec.gen import specgen
from spec.testing import dummytest
modules = {'m_class': m_class,
'c_class': c_class,
'i_class': i_class,
'minitest': minitest,
'microtest': microtest
}
adding a new pinfunction is in src/spec/pinfunctions.py:
note that each interface function returns *two* lists:
* list of all pins (including those below)
* list of pins that are part of a bi-directional bus under the control
of a "direction" pin
note therefore that ulpi() has a bug :)
def ulpi(suffix, bank):
ulpipins = ['CK+', 'DIR+', 'STP+', 'NXT+']
for i in range(8):
ulpipins.append('D%d*' % i)
return (ulpipins, [])
should be similar to nspi and emmc.
basically, to add LPC as an interface, cookie-cut cut/paste emmc or nspi.
oh - it uses python2, and it's fine that way (there's nothing special
about it), so please don't spend time converting it to python3, it'll
take too long.
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] Pinout, interfaces, Rudi, and Raptor
From: Staf Verhaegen @ 2020-05-09 9:12 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <3BD26F5C-BB6D-4011-89E6-EC06215DEDEA@gatech.edu>
[-- Attachment #1.1: Type: text/plain, Size: 1634 bytes --]
Yehowshua schreef op vr 08-05-2020 om 10:20 [-0400]:
> Hello Luke, So I see we have some pinout sdefine here.
> https://libre-soc.org/shakti/m_class/pinouts/ <https://libre-soc.org/shakti/m_class/pinouts/>
>
> My suggestion is to drop the pinmux for now. We should probably update that page(or create a similar page) to reflect what we’re targeting for October.
> IIRC, we’re targeting QFP. I don’t see the dimensions or form factor we’re targeting listed there however. We should talk about that.
> Also, talked with Tim and SDR could work for the first SBC. LiteX also supports SDR which is good for us as it doesn’t require a PHY like DDR making it simpler.
You refer to a first SBC preferably low-cost. The October prototype tape-out will not be cost-effective for that. It is a multi-project wafer. You can order extra wafers but it does mean that the cost of that wafer is divided over much less devices; meaning the cost will be around $32 per chip and some of them will not be functional; in microelectrics you never have 100% yield. Also I think there is limit on only be able to get at most 1000 chips this way.
If you want lower cost per unit you need to go for a full mask with a so-called engineering lot of 12 wafers. This will have a high startup cost. A first crude estimation is between $70000 and $75000. This give a few thousand of chips; exact number depends on the size of the chip. An extra engineering lot of 12 wafers will be around $18000.
For this it means you will need to a new tape-out so you can add extra peripherals that were not on the prototype tape-out.
greets,
Staf.
[-- Attachment #2: Type: text/plain, Size: 177 bytes --]
_______________________________________________
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 kan-ban update 08may2020
From: Luke Kenneth Casson Leighton @ 2020-05-09 8:25 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <307ADE6D-F935-4ADF-9600-3DE7D27FE880@gatech.edu>
On Sat, May 9, 2020 at 1:31 AM Yehowshua <yimmanuel3@gatech.edu> wrote:
> I was recently(a month or so ago) working through some Lissajous curves.
> If Libre-SOC and my thesis wasn’t burning all my time, I would probably go back to working on solving Greene’s condition for why photons undergo point-source like dispersion when they meet a non-contiguous boundary.
this one? https://en.wikipedia.org/wiki/Green%27s_theorem
ooo can you do superposition of spherical harmonics?
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] spinlocks considered harmful
From: Luke Kenneth Casson Leighton @ 2020-05-09 7:51 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5L6ZK-Vmb5b2C8X2=BcecybqFkFWjpNWcuMB=utuuNXw@mail.gmail.com>
On Sat, May 9, 2020 at 12:20 AM Jacob Lifshay <programmerjake@gmail.com> wrote:
> I ended up reporting a bug to PyO3 to not use spinlocks, the explanatory
> blog post I liked to is quite informative and I'd consider it recommended
> reading for anyone writing multi-threaded programs and/or using atomics:
>
> https://matklad.github.io/2020/01/02/spinlocks-considered-harmful.html
oh look. they're rediscovering systems programming and fundamental
systems design, because they're working in a high-level language and
haven't had the kind of training and experience that this extremely
well written article describes.
remember, jacob, i was one of the key architects on samba, which had
people working on it who absolutely had to know what they were doing.
HP told us back in 1997 that they were running 48,000 simultaneous
users across 19 separate HP/UX mini computers, each with NFS-mounts
onto 4 mainframes. so - remember this is on hardware from *1997* -
they had 3,000 simultaneous users per HP/UX minicomputer *and*
capacity to spare to do outgoing NFS traffic.
if samba had been designed using spinlocks for resource contention it
would have tanked at around 150-200 users per minicomputer.
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] daily kan-ban update 08may2020
From: Yehowshua @ 2020-05-09 0:31 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5CYaj-4hPfbbTe6eoO49hj6VAwJqd3OrzMY-sFz4jO+w@mail.gmail.com>
> On May 8, 2020, at 6:34 PM, Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> yehowshua, I noticed you like math, if you have some free time you might
> find some of the algorithms in the algebraics library I wrote interesting
> since it's a lot of number theory and modular arithmetic. Yay for factoring
> polynomials over modular integers!! (glad I don't have to figure that out
> again)
>
> https://docs.rs/algebraics/0.2.0/algebraics/polynomial/struct.Polynomial.html#method.factor <https://docs.rs/algebraics/0.2.0/algebraics/polynomial/struct.Polynomial.html#method.factor>
Thanks, yeah…
I was recently(a month or so ago) working through some Lissajous curves.
If Libre-SOC and my thesis wasn’t burning all my time, I would probably go back to working on solving Greene’s condition for why photons undergo point-source like dispersion when they meet a non-contiguous boundary.
But alas - priorities.
Haven’t done much with number theory in a while - I pop it onto my todo list :)
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] LD/ST CompUnit "working"
From: Jacob Lifshay @ 2020-05-08 23:21 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAPweEDwYvUrkhgNw1GUAVS6tS0P8hGz=5Hn5KNgobnCC14brnQ@mail.gmail.com>
On Fri, May 8, 2020, 16:19 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:
> i've got a basic unit test operational with the LD/ST Comp Unit,
> performing 3 STs then 3 LDs using indexed and immediates. it goes via
> PortInterface.
>
Yay! sorry I'm taking soo long...
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] spinlocks considered harmful
From: Jacob Lifshay @ 2020-05-08 23:20 UTC (permalink / raw)
To: Libre-RISCV General Development
I ended up reporting a bug to PyO3 to not use spinlocks, the explanatory
blog post I liked to is quite informative and I'd consider it recommended
reading for anyone writing multi-threaded programs and/or using atomics:
https://matklad.github.io/2020/01/02/spinlocks-considered-harmful.html
Bug report:
https://github.com/PyO3/pyo3/issues/916
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] LD/ST CompUnit "working"
From: Luke Kenneth Casson Leighton @ 2020-05-08 23:18 UTC (permalink / raw)
To: Libre-RISCV General Development
i've got a basic unit test operational with the LD/ST Comp Unit,
performing 3 STs then 3 LDs using indexed and immediates. it goes via
PortInterface.
one issue we have here is that until there is a parallel-capable
L0CacheBuffer, interactions between multiple LDs or multiple STs
cannot be tested, because the "test" L0CacheBuffer can only handle one
and only one memory request. this is... sort-of "fine" (functional,
but performance will suck).
i will do "update" mode (output the computed Effective Address) tomorrow.
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] note on memory operation requirements for linux
From: Luke Kenneth Casson Leighton @ 2020-05-08 23:11 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5Ecj1X+HJs=Nu100gh1zUcYxX1=qz+jdbbB4K24COgrw@mail.gmail.com>
On Fri, May 8, 2020 at 8:15 PM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> I haven't checked but I'm 99% sure that we will need to implement standard
> Power atomics, fences, ll/sc (including 128-bit version), cache flushes,
> and non-cacheable load/store operations if we want to support Linux on our
> october test chip.
added to page. good catch.
_______________________________________________
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 kan-ban update 08may2020
From: Luke Kenneth Casson Leighton @ 2020-05-08 23:09 UTC (permalink / raw)
To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD5CYaj-4hPfbbTe6eoO49hj6VAwJqd3OrzMY-sFz4jO+w@mail.gmail.com>
On Fri, May 8, 2020 at 11:34 PM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> (Fixed the title, it's may not march.)
doh. well spotted.
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
* [libre-riscv-dev] [Bug 305] Create Pipelined ALU similar to alu_hier.py
From: bugzilla-daemon @ 2020-05-08 23:08 UTC (permalink / raw)
To: libre-riscv-dev
In-Reply-To: <bug-305-13@https.bugs.libre-soc.org/>
https://bugs.libre-soc.org/show_bug.cgi?id=305
--- Comment #13 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
this:
# If there's an immediate, set the B operand to that
with m.If(self.i.ctx.op.imm_data.imm_ok):
comb += self.o.b.eq(self.i.ctx.op.imm_data.imm)
with m.Else():
comb += self.o.b.eq(self.i.b)
...is already done by the Computation Unit:
# select immediate if opcode says so. however also change the latch
# to trigger *from* the opcode latch instead.
op_is_imm = oper_r.imm_data.imm_ok
src2_or_imm = Signal(self.rwid, reset_less=True)
src_sel = Signal(reset_less=True)
m.d.comb += src_sel.eq(Mux(op_is_imm, opc_l.q, src_l.q[1]))
m.d.comb += src2_or_imm.eq(Mux(op_is_imm, oper_r.imm_data.imm,
self.src2_i))
there is *not* supposed to be a relationship between "register numbers"
and "Function Unit Operands". Function Units are not permitted to know
about registers, at all (however by a coincidence we happen to be
preserving the order, RA = operand1, RB = operand2 etc).
however... i quite like that it's possible to test against the actual
decoded instructions, and that makes me think that maybe yes, the
FunctionUnit should *not* be decoding the immediate, just pass it
through.
otherwise to achieve the same unit test coverage it would be necessary
to have the immediate decoding in the unit test.
i will go ahead and modify the compalu_multi.py to remove immediate
decoding/selection from here:
https://git.libre-soc.org/?p=soc.git;a=blob;f=src/soc/experiment/compalu_multi.py;h=f9cb83ea13184bb6ff9ceedb7627b7ea67295c55;hb=HEAD#l166
----
here, it receives data in ALUInputData format (which is correct)
class ALUInputStage(PipeModBase):
def __init__(self, pspec):
super().__init__(pspec, "input")
def ispec(self):
return ALUInputData(self.pspec)
def ospec(self):
return ALUInputData(self.pspec)
however the output spec is a *modified* copy of the same data structure.
with "carry_in" being *generated* by ALUInputStage, ALUInputData should
*not* have "carry_in" as a field.
the reason is because it will never be set by the *user* of this stage,
and consequently a dangling wire will end up being created.
i've created a class ALUFirstInputData (bad name i know) which should
be used instead.
-----
what's "so" intended for?
--
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: next prev 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