Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
* [libre-riscv-dev] [Bug 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 18:59 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #21 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Luke Kenneth Casson Leighton from comment #20)

> i will adjust minor_31.csv

saw the commit, looks like you did it already, will double-check.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 19:02 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #84 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ok cole try again, michael just updated the CSV files

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:08 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #22 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
michael, as cr_c is an output field, it should only go in CROutputData.
so i'm just going to remove it.  we can discuss whether to put cr_a into
full_cr later, there is justification for doing it either way.

i'll also update the pipe_data.py regspecs

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:09 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #23 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #22)
> michael, as cr_c is an output field, it should only go in CROutputData.
> so i'm just going to remove it.  we can discuss whether to put cr_a into
> full_cr later, there is justification for doing it either way.
> 
> i'll also update the pipe_data.py regspecs

No, it's not an output field. For OP_CROP, it only does a partial update to the
output cr, so it needs to know what it was before.

-- 
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 kan-ban update 21may2020
From: Jacob Lifshay @ 2020-05-21 19:09 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxF5WOuR=dDRZvrfNCOp8MWjF7zmccDLe0rcQxTEnu83Q@mail.gmail.com>

Will be attending the OpenPower virtual meeting later today.
working on the mul and div units as well.

Am helping a friend build a computer, managed to accidentally get an Intel
mobo (gigabyte b365m instead of b450) and an AMD cpu, so had to send the
mobo back :(

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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:22 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #24 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
this creates a false (unnecessary) dependency, where cr_c would need to be
read on every OP_CR* operation, and "passed through".  the idea is to
enable cr_o.ok for instances where it's needed.

or, are there *really* operations that need 3 4-bit CRs as input?  i
don't believe so


@@ -53,9 +53,6 @@ class CRMainStage(PipeModBase):
         cr_b_arr = Array([cr_b[i] for i in range(4)])
         cr_o_arr = Array([cr_o[i] for i in range(4)])

-        comb += cr_o.eq(cr_c)
-
-
         with m.Switch(op.insn_type):
             ##### mcrf #####
             with m.Case(InternalOp.OP_MCRF):

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:23 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #25 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Michael Nolan from comment #23)
> (In reply to Luke Kenneth Casson Leighton from comment #22)
> > michael, as cr_c is an output field, it should only go in CROutputData.
> > so i'm just going to remove it.  we can discuss whether to put cr_a into
> > full_cr later, there is justification for doing it either way.
> > 
> > i'll also update the pipe_data.py regspecs
> 
> No, it's not an output field. For OP_CROP, it only does a partial update to
> the output cr, so it needs to know what it was before.

oh god.  blech.  ok.  yes.  got it.  lucky i didn't commit anything, eh?

that just leaves updating the regspecs, which i'll do now.

l.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 19:24 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #85 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #84)
> ok cole try again, michael just updated the CSV files

Awesome, my test now fails as expected. Going to get to work on making the test
pass.

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:28 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #26 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ls -altr

      90820 May 21 20:27 cr_pipeline.il

WOW.  down from 600k to 90k.

absolutely massive difference.

-- 
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 kan-ban update 21may2020
From: Luke Kenneth Casson Leighton @ 2020-05-21 19:32 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAC2bXD4u3bDq=WRjXZC=dFm1D-vnP7Bzm_sh=Sp0=Reyya=9rQ@mail.gmail.com>

On Thu, May 21, 2020 at 8:10 PM Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> Will be attending the OpenPower virtual meeting later today.

oh, thank you for reminding me.  anyone else welcome to attend as
well.  details here:
https://openpowerfoundation.org/openpower-virtual-coffee-calls/

> working on the mul and div units as well.

great.  if you like i can do a cookie-cut (stub) of the suitable
soc.fu.{siomething} code, while you do the actual pipelines in
ieee754fpu?  that would give you a clear place to drop in the pipeline
stages and also i could define the regspecs?

> Am helping a friend build a computer, managed to accidentally get an Intel
> mobo (gigabyte b365m instead of b450) and an AMD cpu, so had to send the
> mobo back :(

ooo ouch.  never done that, but did buy motherboards that had memory
corruption until they had a BIOS update...  that was not fun, as i'd
bought *eight* of them (!)

l.

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

^ permalink raw reply

* [libre-riscv-dev] [Bug 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:37 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #27 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
we should also do a CompCROpSubset rather than read from Decode2ExecuteType.
i'll add one now (but not hook it in) so it can be reviewed

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:50 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #28 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ehhhm... i don't actually think main_stage.py needs *any* of these.

* registers are identified and passed in according to DecodeCRIn/Out
  in combination with regspecs

* fn_unit might be a good idea to leave in

* insn_type is pretty much literally the only thing that's actually
  used, isn't it?

there's nothing in CR main_stage.py which is different for 32/64 bit, is there?
read_cr_whole and write_cr_whole might be useful information if we decide
to do MUXing, but that would be back at the CRCompUnit

do we need input_cr or output_cr - i mean in main_stage.py?  i don't
think we do.


class CompCROpSubset(Record):
    def __init__(self, name=None):
        layout = (('insn_type', InternalOp),
                  ('fn_unit', Function),
                  ('input_cr', CRInSel),
                  ('output_cr', CROutSel),
                  ('read_cr_whole', 1),
                  ('write_cr_whole', 1),
                  ('is_32bit', 1),
                  )

-- 
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 333] investigate why CR pipeline code took 100% CPU and locked up generating ILANG
From: bugzilla-daemon @ 2020-05-21 19:59 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-333-13@https.bugs.libre-soc.org/>

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

--- Comment #29 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
ah, just realised: the convention for outgoing regs is to use Data()
main_stage.py (or output_stage.py) then sets "ok" to indicate that
it has been modified.  will do that now.

-- 
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 337] New: Convention for register outputs in *OutputData structures is to use "Data"
From: bugzilla-daemon @ 2020-05-21 20:12 UTC (permalink / raw)
  To: libre-riscv-dev

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

            Bug ID: 337
           Summary: Convention for register outputs in *OutputData
                    structures is to use "Data"
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: PC
                OS: Mac OS
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl@lkcl.net
          Reporter: lkcl@lkcl.net
                CC: libre-riscv-dev@lists.libre-riscv.org
   NLnet milestone: ---

this started back in BranchOutputData, to indicate that SPRs can
be optionally set, such that CompUnits know what to do.  this
is a good idea and it really needs to be extended throughout
all pipeline OutputData structures.

that... includes the INT regs.  it's not a huge change, it is
however a bit of a reorg.

-- 
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 307] look at installing a kan-ban board on top of bugzilla
From: bugzilla-daemon @ 2020-05-21 21:01 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-307-13@https.bugs.libre-soc.org/>

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

--- Comment #6 from Alain D D Williams <addw@phcomp.co.uk> ---
Replacing:
rewrite ^/rest/(.*)$ /rest.cgi/$1 last;
by:
rewrite ^/rest/(.*)$ /rest.cgi?$1 last;

is an improvement ... but not the fix.

Going to https://bugs.libre-soc.org/rest/version I now get

{"documentation":"https://bugzilla.readthedocs.org/en/5.0/api/","code":32614,"message":"A
REST API resource was not found for 'GET '.","error":true}

-- 
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 336] ALU CompUnit needs to recognise that RA (src1) can be zero
From: bugzilla-daemon @ 2020-05-21 21:12 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-336-13@https.bugs.libre-soc.org/>

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

--- Comment #2 from Cesar Strauss <cestrauss@gmail.com> ---
Dear Luke,

Please do not bother drawing a gate level diagram for the FSM. Your description
is enough.

For the dataflow (registers, ALU, muxes), yes, a diagram is useful, but do
represent the whole FSM as an empty box.

I find that I can better design an FSM by starting from a behavioral
description, preferably in the form of a timing diagram.

If you like, you can draw one in paper, of what you want to see in the GTKWave
window. With arrows linking what edge causes which transition in another
signal.

What do you think?

Regards,

Cesar

-- 
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 307] look at installing a kan-ban board on top of bugzilla
From: bugzilla-daemon @ 2020-05-21 21:12 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-307-13@https.bugs.libre-soc.org/>

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

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
this may simply be because it is a POST API.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 21:36 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #86 from Cole Poirier <colepoirier@gmail.com> ---
Is there a way to access the values of the Signals instead of just their type
and name? It would be really useful if I could print the values of signals
while trying to get the test to pass.

-- 
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 336] ALU CompUnit needs to recognise that RA (src1) can be zero
From: bugzilla-daemon @ 2020-05-21 21:41 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-336-13@https.bugs.libre-soc.org/>

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

--- Comment #3 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cesar Strauss from comment #2)
> Dear Luke,
> 
> Please do not bother drawing a gate level diagram for the FSM. Your
> description is enough.

we need one for the documentation, which is an extremely important aspect of
this project.

plus i find it very difficult to think of timing related designs without a gate
level drawing.

as in i literally can't write these FSMs without one (!)

this one is wrong (imm needs muxing)
https://libre-soc.org/3d_gpu/compunit_multi_rw.jpg

the imm mux path in this one is correct
https://libre-soc.org/3d_gpu/ld_st_comp_unit.jpg

immed mode hooks RD_REQ2, switching it off.

> For the dataflow (registers, ALU, muxes), yes, a diagram is useful, but do
> represent the whole FSM as an empty box.
> 
> I find that I can better design an FSM by starting from a behavioral
> description,

then comment 1 should do the trick?

RD_REQ1 (rd.req[0]) needs to be disabled if oper_i.zero_a is set, and src_i[0]
set to zero in all 64 bits.


> preferably in the form of a timing diagram.

i am used to examining those, drawing them not so much.


> If you like, you can draw one in paper, of what you want to see in the
> GTKWave window. With arrows linking what edge causes which transition in
> another signal.
> 
> What do you think?

i can give it a shot once i am confident with the gate level.

are you ok to go via the description for now?

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 21:42 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #87 from Luke Kenneth Casson Leighton <lkcl@lkcl.net> ---
(In reply to Cole Poirier from comment #86)
> Is there a way to access the values of the Signals instead of just their
> type and name? It would be really useful if I could print the values of
> signals while trying to get the test to pass.

x = yield val

then print (x)

-- 
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] openpower meeting starting shortly
From: Jacob Lifshay @ 2020-05-21 21:58 UTC (permalink / raw)
  To: Libre-RISCV General Development
In-Reply-To: <CAPweEDxLeEZvtGVF_V4UhVkUg57p+bmvkZ+e0T8qcyczH6GitQ@mail.gmail.com>

On Thu, May 21, 2020, 12:32 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:

> On Thu, May 21, 2020 at 8:10 PM Jacob Lifshay <programmerjake@gmail.com>
> wrote:
> >
> > Will be attending the OpenPower virtual meeting later today.
>
> oh, thank you for reminding me.  anyone else welcome to attend as
> well.  details here:
> https://openpowerfoundation.org/openpower-virtual-coffee-calls/


starts in a few minutes

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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 22:00 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #88 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #87)
> (In reply to Cole Poirier from comment #86)
> > Is there a way to access the values of the Signals instead of just their
> > type and name? It would be really useful if I could print the values of
> > signals while trying to get the test to pass.
> 
> x = yield val
> 
> then print (x)

I have tried doing the following:
```
def elaborate(self, platform):
    m = Module()
    width = yield self.width
    rs = yield self.rs
    ra = yield self.ra
    rb = yield self.rb
    print("width: ", width, "rs: ", rs, "rb: ", rb, "ra: ", ra)
```

Which unfortunately does not print the values, but gives me the following
error:
```
File "/home/colepoirier/src/nmigen/nmigen/hdl/ir.py", line 50, in get
    raise AttributeError("Object {!r} cannot be elaborated".format(obj))
AttributeError: Object <generator object Bpermd.elaborate at 0x7f1f4ca00750>
cannot be elaborated
```

What am I doing wrong?

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 22:16 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #89 from Michael Nolan <mtnolan2640@gmail.com> ---
(In reply to Cole Poirier from comment #88)
> (In reply to Luke Kenneth Casson Leighton from comment #87)
> > (In reply to Cole Poirier from comment #86)
> > > Is there a way to access the values of the Signals instead of just their
> > > type and name? It would be really useful if I could print the values of
> > > signals while trying to get the test to pass.
> > 
> > x = yield val
> > 
> > then print (x)
> 
> I have tried doing the following:
> ```
> def elaborate(self, platform):
>     m = Module()
>     width = yield self.width
>     rs = yield self.rs
>     ra = yield self.ra
>     rb = yield self.rb
>     print("width: ", width, "rs: ", rs, "rb: ", rb, "ra: ", ra)
> ```
> 
> Which unfortunately does not print the values, but gives me the following
> error:
> ```
> File "/home/colepoirier/src/nmigen/nmigen/hdl/ir.py", line 50, in get
>     raise AttributeError("Object {!r} cannot be elaborated".format(obj))
> AttributeError: Object <generator object Bpermd.elaborate at 0x7f1f4ca00750>
> cannot be elaborated
> ```
> 
> What am I doing wrong?

Sorry, the x = yield sig only works inside the simulator. There's not a way to
print the value of a signal from inside the module itself

This should make sense, the module is *building* a circuit, it has no idea what
the values of any of the parts of the circuit are while it's being built.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-21 22:24 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #90 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Michael Nolan from comment #89)
> (In reply to Cole Poirier from comment #88)
> > (In reply to Luke Kenneth Casson Leighton from comment #87)
> > > (In reply to Cole Poirier from comment #86)
> > > > Is there a way to access the values of the Signals instead of just their
> > > > type and name? It would be really useful if I could print the values of
> > > > signals while trying to get the test to pass.
> > > 
> > > x = yield val
> > > 
> > > then print (x)
> > 
> > I have tried doing the following:
> > ```
> > def elaborate(self, platform):
> >     m = Module()
> >     width = yield self.width
> >     rs = yield self.rs
> >     ra = yield self.ra
> >     rb = yield self.rb
> >     print("width: ", width, "rs: ", rs, "rb: ", rb, "ra: ", ra)
> > ```
> > 
> > Which unfortunately does not print the values, but gives me the following
> > error:
> > ```
> > File "/home/colepoirier/src/nmigen/nmigen/hdl/ir.py", line 50, in get
> >     raise AttributeError("Object {!r} cannot be elaborated".format(obj))
> > AttributeError: Object <generator object Bpermd.elaborate at 0x7f1f4ca00750>
> > cannot be elaborated
> > ```
> > 
> > What am I doing wrong?
> 
> Sorry, the x = yield sig only works inside the simulator. There's not a way
> to print the value of a signal from inside the module itself
> 
> This should make sense, the module is *building* a circuit, it has no idea
> what the values of any of the parts of the circuit are while it's being
> built.

I see. Thank you, that does indeed make sense. I've been working on this for a
few hours and am struggling. I'm going to try writing this in regular python
code so I can debug print the values, and properly understand how endian-ness
affects the code.

-- 
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 316] bperm TODO
From: bugzilla-daemon @ 2020-05-22  0:06 UTC (permalink / raw)
  To: libre-riscv-dev
In-Reply-To: <bug-316-13@https.bugs.libre-soc.org/>

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

--- Comment #91 from Cole Poirier <colepoirier@gmail.com> ---
(In reply to Cole Poirier from comment #90)
> (In reply to Michael Nolan from comment #89)
> > (In reply to Cole Poirier from comment #88)
> > > (In reply to Luke Kenneth Casson Leighton from comment #87)
> > > > (In reply to Cole Poirier from comment #86)
> > > > > Is there a way to access the values of the Signals instead of just their
> > > > > type and name? It would be really useful if I could print the values of
> > > > > signals while trying to get the test to pass.
> > > > 
> > > > x = yield val
> > > > 
> > > > then print (x)
> > > 
> > > I have tried doing the following:
> > > ```
> > > def elaborate(self, platform):
> > >     m = Module()
> > >     width = yield self.width
> > >     rs = yield self.rs
> > >     ra = yield self.ra
> > >     rb = yield self.rb
> > >     print("width: ", width, "rs: ", rs, "rb: ", rb, "ra: ", ra)
> > > ```
> > > 
> > > Which unfortunately does not print the values, but gives me the following
> > > error:
> > > ```
> > > File "/home/colepoirier/src/nmigen/nmigen/hdl/ir.py", line 50, in get
> > >     raise AttributeError("Object {!r} cannot be elaborated".format(obj))
> > > AttributeError: Object <generator object Bpermd.elaborate at 0x7f1f4ca00750>
> > > cannot be elaborated
> > > ```
> > > 
> > > What am I doing wrong?
> > 
> > Sorry, the x = yield sig only works inside the simulator. There's not a way
> > to print the value of a signal from inside the module itself
> > 
> > This should make sense, the module is *building* a circuit, it has no idea
> > what the values of any of the parts of the circuit are while it's being
> > built.
> 
> I see. Thank you, that does indeed make sense. I've been working on this for
> a few hours and am struggling. I'm going to try writing this in regular
> python code so I can debug print the values, and properly understand how
> endian-ness affects the code.

At this point my head is going in circles over and over with respect to the
endianness of python and the inputs to the function, and I keep flipping from
one understanding to another, essentially leaving me with no understanding...
I'd describe it as unpleasant and unhelpful self recursion. So this seems like
a good point to stop today, and try my luck with understanding endianness again
tomorrow.

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