public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Dave Brolley <brolley@redhat.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: cgen@sourceware.org
Subject: Re: [RFA:] Fix breakage of manually building SID CPU
Date: Wed, 15 Mar 2006 17:08:00 -0000	[thread overview]
Message-ID: <441849ED.1030503@redhat.com> (raw)
In-Reply-To: <200603150124.k2F1O5Rk014471@ignucius.se.axis.com>

Hans-Peter Nilsson wrote:

>Seems the implementation has introduced a false assumption.
>Changing the cris.cpu file with the patch below and retrying as
>per previous description I sent, results in:
>
>./utils-cgen.scm:167:15: In procedure error in expression (apply error (cons # arg)):
>./utils-cgen.scm:167:15: delayed operand in a non-parallel cpu:
>ABORT: (misc-error)
>
>So, uh, why would only parallel CPUs have delay-slots?  Or do we
>actually have differing perceptions and definitions of what a
>"delay" is?
>
It's more of an extension of the notion of what parallel is. The "new" 
delay implementation (SID only) thinks of a delay as something to be 
done later, in parallel with something else. I seem to recall that it 
was intended that delay could be used to implement

1) exposed pipelines
2) delay slots
3) VLIW parallelism

It looks like there are no examples of ports which use the "new" delay 
in the public sources. To make it work, you will need to:

1) Add  (parallel-insns 2) to your define-isa to make the error above go 
away.
2) Generate write.cxx since the "new" delay uses the write stacks which 
are generated there.
3) Declare '%cpu%::write_stacks' in your cpu class
4) Declare 'int tick' in your cpu class
5) Add 'write_stacks.reset (); tick = 0;' to your %cpu%::reset () method
6) Add the following to %cpu%::step_insns after executing the insn (and 
catching any exceptions) and before checking for triggerpoints:

      // Execute writeback
      try {
        write_stacks.writeback (tick, this);
      }
      catch (cpu_memory_fault& t)
        {
          this->memory_trap (t);
        }
      catch (cpu_exception& t)
        {
          this->yield ();
        }
 
      // move ahead thru circular pipeline
      tick = (tick + 1) % %cpu%::pipe_sz;

>  Supposing that those definitions are mergeable,
>would it be ok to put back support for the "old" definition in
>SID-CGEN?  If not, what can be done?
>  
>
I think that if both can be supported then that would be "a good thing 
(tm)".

Dave

  reply	other threads:[~2006-03-15 17:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-23  3:31 Hans-Peter Nilsson
2006-01-30 17:21 ` Dave Brolley
2006-03-14 13:34   ` Hans-Peter Nilsson
2006-03-14 16:46     ` Dave Brolley
2006-03-14 17:03       ` Hans-Peter Nilsson
2006-03-14 17:17       ` Frank Ch. Eigler
2006-03-14 21:24         ` Hans-Peter Nilsson
2006-03-14 22:04           ` Dave Brolley
2006-03-14 22:48             ` Frank Ch. Eigler
2006-03-14 23:05               ` Dave Brolley
2006-03-15  0:20               ` Hans-Peter Nilsson
2006-03-15  1:24                 ` Hans-Peter Nilsson
2006-03-15 17:08                   ` Dave Brolley [this message]
2006-03-15 17:14                     ` Doug Evans
2006-03-15 18:18                       ` Dave Brolley
2006-03-15 19:23                     ` Hans-Peter Nilsson
2006-03-15 19:49                       ` Dave Brolley
2006-03-15 20:11                       ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=441849ED.1030503@redhat.com \
    --to=brolley@redhat.com \
    --cc=cgen@sourceware.org \
    --cc=hans-peter.nilsson@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).