--
You received this message because you are subscribed to the Google Groups "RISC-V Debug Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debug+unsubscribe@groups.riscv.org.
To post to this group, send email to de...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/debug/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/debug/CA%2BwH294Q9HEEc_xAXkvmtbKN2bZZM3BOPMnp8GnVAG09rHeK_Q%40mail.gmail.com.
On 03.01.2017 22:09, Tim Newsome wrote:
> Thanks for putting this together!
>
> It's a good overview of everything we've talked about so far. Is there
> something specific you'd like added to the meeting agenda regarding this
> document?
I think it is more the general discussion about the options how to
proceed, we hope we made clear why we prefer the mixed approach on
several occasions. May we can also reiterate on the viability of
generating instruction macros on the target side for a minimal amount of
base functionalities.
> Personally I'm still unsure what makes the abstract approach simpler
> than the instruction feeding approach. It's simpler for the debugger,
> maybe, but that doesn't seem that important to optimize for (unless it's
> hugely simpler). I don't think it's what people mean when they say
> simpler/less complex.
A protocol that abstracts from implementation is IMHO always preferable
over a protocol that enforces implementation. So if I can have a simple
protocol that contains messages like "Halt", "Single-Step", "Read CSR
0x405" and leaves everything open to the implementation, that is
preferable. I don't think the argument for abstraction is about
complexity, but about clearness and freedom of implementation.
Anyhow, I think you made clear before that it is impossible for
instruction feeding to convert all abstract messages to instruction
macros. Hence we tend to the mix of a base debug interface in memory-map
with a large number of functionalities accessible either way.
@Tim, for confirmation, do u expect debugger to feed the instructions?
For me, I expect the debug module to receive cmd via the protocol and feed instructions for most common cmd like register/csr/memory access.
-----Original Message-----
From: Stefan Wallentowitz [mailto:ste...@wallentowitz.de]
Sent: Wednesday, January 04, 2017 2:32 PM
To: de...@groups.riscv.org
Subject: Re: [debug] RISC-V run-control debug: summary, survey, and a proposal
* PGP Signed by an unknown key
On 03.01.2017 22:09, Tim Newsome wrote:
> Thanks for putting this together!
>
> It's a good overview of everything we've talked about so far. Is there
> something specific you'd like added to the meeting agenda regarding
> this document?
I think it is more the general discussion about the options how to proceed, we hope we made clear why we prefer the mixed approach on several occasions. May we can also reiterate on the viability of generating instruction macros on the target side for a minimal amount of base functionalities.
> Personally I'm still unsure what makes the abstract approach simpler
> than the instruction feeding approach. It's simpler for the debugger,
> maybe, but that doesn't seem that important to optimize for (unless
> it's hugely simpler). I don't think it's what people mean when they
> say simpler/less complex.
A protocol that abstracts from implementation is IMHO always preferable over a protocol that enforces implementation. So if I can have a simple protocol that contains messages like "Halt", "Single-Step", "Read CSR 0x405" and leaves everything open to the implementation, that is preferable. I don't think the argument for abstraction is about complexity, but about clearness and freedom of implementation.
Anyhow, I think you made clear before that it is impossible for instruction feeding to convert all abstract messages to instruction macros. Hence we tend to the mix of a base debug interface in memory-map with a large number of functionalities accessible either way.
Cheers,
Stefan
--
You received this message because you are subscribed to the Google Groups "RISC-V Debug Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debug+unsubscribe@groups.riscv.org.
To post to this group, send email to de...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/debug/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/debug/d666f554-b4cb-cc66-6b5a-cadf96434740%40wallentowitz.de.
On 4 January 2017 at 18:23, Tim Newsome <t...@sifive.com> wrote:
> OK, but your slide 13 lists as the first advantage of the memory map
> interface "Simplicity." Then separately it lists "Memory map interface
> allows multiple implementation approaches," which I agree with.
I think we were being purposely nebulous with "simplicity".
Conceptually, it's hard to get simpler than read an address and get a
value. On simple core implementations, a direct implementation is also
straight-forward.
I agree the fact it allows multiple implementation
approaches is more important. I have a personal opinion on which
implementation approach (direct vs instruction feeding) I might prefer
to use on processors at a couple of different design points, but don't
feel I could make that decision for all RISC-V implementers across
whatever class and style of design and area/budget/time constraints
they have.
I appreciate that an implementation of instruction feeding can also be
straight-forward, and I do sympathise with your frustrations in
attempting to persuade people. I don't think instruction feeding is
'bad' (indeed, the survey Stefan and I performed showed many
architectures use some variant of it). I can see it's been difficult
to get the message across, especially about how the proposal has
changed since the early versions which appeared more heavyweight. I
think part of the problem is that for a proposal that naturally limits
implementation freedom, there's a greater need to outline and explain
which implementation options _are_ available. This is something that
has been added to your spec more recently, and I also hope our
diagrams on page 11 help. I do wonder if a presentation that started
with an overview of the simplest possible implementation and then
described ways of making it more fully-featured and efficient would
have raised fewer concerns.
Best,
Alex
I think the name "instruction feeding" should be changed to
"instruction fetching" as that is really what it is and in either case
doesn't need to change the processor core except for the case where
the core had only a single source of instructions with no address
decode mux (i.e., ROM or RAM but not both).
On the call, we also came to conclusion that the memory-mapped
solution is not sufficient in general once new extensions and
additional processor state are added, as it would require this level
of spec to be continually revisited to dole out memory space to
alternative extensions. So, debug by instruction fetching has to be
supported as at least an optional component.
There are some more details to work out in Tim's scheme, for example,
we need to provide mechanism to handle >32b instructions by providing
multiple 32b registers in DM and way to launch an instruction fetch
atomically.
I also wonder about having a CSR per hart mapped to a shared memory
location. A straight memory store might be easier/simpler with same
caveats as for instruction fetch (very simple core might only have one
data RAM - but this is much rarer than single instruction memory as
even simple cores usually have some memory-mapped IO).
Krste
| To post to this group, send email to de...@groups.riscv.org.
| Visit this group at https://groups.google.com/a/groups.riscv.org/group/debug/.
| To view this discussion on the web visit https://groups.google.com/a/
| groups.riscv.org/d/msgid/debug/
| CAGDihek961oaVBLoyZj76puJekW0ie5NmjpvcxGhuaHcDafhbQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "RISC-V Debug Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debug+unsubscribe@groups.riscv.org.
To post to this group, send email to de...@groups.riscv.org.
Visit this group at https://groups.google.com/a/groups.riscv.org/group/debug/.
To view this discussion on the web visit https://groups.google.com/a/groups.riscv.org/d/msgid/debug/22644.10618.217130.16099%40KAMacBookAir2012.local.
On 9 January 2017 at 18:40, Tim Newsome <t...@sifive.com> wrote:
> On Wed, Jan 4, 2017 at 11:02 AM, Alex Bradbury <a...@asbradbury.org> wrote:
>>
>> On 4 January 2017 at 18:23, Tim Newsome <t...@sifive.com> wrote:
>> > OK, but your slide 13 lists as the first advantage of the memory map
>> > interface "Simplicity." Then separately it lists "Memory map interface
>> > allows multiple implementation approaches," which I agree with.
>>
>> I think we were being purposely nebulous with "simplicity".
>
>
> I can understand that, but it makes it hard for me to make an argument that
> instruction feeding is just as simple if you can't explain what exactly is
> simple.
As I said, the fact it allows multiple implementation approaches is
more important. As I explain below, the interface is conceptually
simple - the simplicity of the implementation is not an important
argument:
> Can you share your personal opinion on why you would not want to implement
> instruction feeding? I honestly think it's always simple. I've made large
> changes to my spec to accommodate concerns that I can understand (lower gate
> count, more flexibility in implementation) and I'd be happy to change things
> to address other concerns as well.
The recent post from Michael Gautschi discusses some reasons PULP have
preferred a different implementation approach. Fundamentally, my
concern is that by only exposing an instruction feeding interface
rather than a more abstract approach, you have to make the argument
this is a better approach for every processor design point and every
design team.
> The abstract interface is definitely simpler to understand. But the
> alternatives aren't not much less simple.
>
> Simplicity of implementation is among the most important arguments.
> RISC-V encourages everybody to do their own implementation if they like.
> Making it simple to implement supports that goal. There will be more
> hardware implementations than software implementations, so making
> implementing hardware simple is important here, too.
>
> But if you don't think simplicity is an important argument, then please
> don't mention it as a benefit of the abstract implementation.
I think it was clarified that this was not meant and we shouldn't go in
circles about that. I hope the formulation in the slides now better
reflects the argument.
I don't agree with the statement that inspecting the processor state while it is running is not common. Profilers do just that - I am talking about profiling non-instrumented code without any intrusion. This is why I am of the view that we should have a simple memory mapped approach for that basic, simple stuff such as processor state (e.g. PC) and control which would stay the same for all RISC-V cores but for for more complex stuff such as vectors, sw break points etc you execute code as you have already specified.