gnupic: Re: [gnupic] gpsim --"invalid file register" error


Previous by date: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Next by date: 5 Feb 2007 15:44:07 +0000 Re: [sdcc-devel] [ sdcc-Bugs-1652040 ] pic14,assembly generation issue related to pagesel, David Barnett
Previous in thread: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Next in thread: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Robert Pearce

Subject: Re: [gnupic] gpsim --"invalid file register" error
From: "David Barnett" ####@####.####
Date: 5 Feb 2007 15:44:07 +0000
Message-Id: <065601c7493c$52a096f0$2001a8c0@barnett2>

----- Original Message ----- 
From: "Scott Dattalo" ####@####.####
To: ####@####.####
Sent: Monday, February 05, 2007 8:34 AM
Subject: Re: [gnupic] gpsim --"invalid file register" error


I've been following this discussion off and on and had a few thoughts.

> Hi Ralph,
>
> The only problem with having the simulator insert automatic bank checking
> assertions on every register is that you'll need a mechanism to inhibit
> it.
> ...
>
> I'm sure we could debate the relative merits of implicit versus explicit
> bank checking. I tend to prefer explicit because it emphasizes intent.
> However, if implicit bank checking is not too obtrusive, or at least can
> be easily inhibited, then I'd accept that.
If I'm understanding the discussion, Ralph wants some way to automatically 
verify register banking through the simulator and Scott wants to make sure 
that any such checking (a) won't bog down users who don't care for it, and 
(b) is smart enough to be selective.

As I see it, there are a few options.  I believe it would be trivial to 
write a run-once script in Python or what-have-you to prepend such a 
bank-checking assertion to every register access.  That option would be very 
unobtrusive for other users since they wouldn't even have to know about it, 
and you could also make it smart enough to deal with the exception cases 
(like unbanked RAM).  You could add it into your toolchain for building and 
keep an unchanged and mangled version separate for readability.  You could 
also include some kind of explicit assertion to the script to disable 
checking for certain symbols or addresses and supply the script with the 
unbanked addresses, etc.  Lots of ways to do this sort of thing.

It might also be possible to build such an option into gputils instead of 
gpsim, which would be a little more intrusive but might have some benefits. 
I think gpsim reads the assertions directly out of the COD file, correct? 
If I'm wrong and it reads them from the original source files, this wouldn't 
work, but I think the COD file itself is sufficient for gpsim, so this would 
be possible.  I think that would mean less micromanaging for the user and 
there might be more relevant information already available to gputils than 
to a script.

I think since the simulator assertions already exist, building anything else 
into gpsim would be overkill.  However, I did want to clarify on something 
Robert said:
  >> By binary do you mean the hex file for downloading to the PIC?
  > Yes, because that may be all GPSim has available.
I don't think anyone was planning on trying to check banking without access 
to the COD information or source files...I think that would be literally 
impossible.  If the user loads only a HEX file, in whatever scenario, gpsim 
just won't check it.  That's how the assertions work, isn't it?  Did I 
misread that or am I missing something?

Then again, it would be just fine to keep manually asserting the bank if 
that works for Ralph.

Hope I'm making sense with all of that.

David 


Previous by date: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Next by date: 5 Feb 2007 15:44:07 +0000 Re: [sdcc-devel] [ sdcc-Bugs-1652040 ] pic14,assembly generation issue related to pagesel, David Barnett
Previous in thread: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Ralph Corderoy
Next in thread: 5 Feb 2007 15:44:07 +0000 Re: [gnupic] gpsim --"invalid file register" error, Robert Pearce


Powered by ezmlm-browse 0.20.