[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
gpsim Scope window
From: "Scott Dattalo" ####@####.#### Date: 4 Sep 2006 04:52:46 +0100 Message-Id: <60275.71.139.23.118.1157341949.squirrel@ruckus.brouhaha.com> Scope Window I've added a scope window to gpsim. Here are a couple of screen shots: http://www.dattalo.com/gnupic/scope1.png http://www.dattalo.com/gnupic/scope2.png It's fairly functional at the moment, but I expect to add a few more features. Here's currently what's supported: - Up to 8 signals can be monitored (there's no reason for a limit on the number) - Only I/O pins are currently scopable. - Time is shown in simulation cycles - Signal names can be entered in one of two ways: a) You can click in the signal area on the left side of the window to edit or add a new signal b) You can specify the signal name at the command line using an attribute: gpsim> scope.ch0 = "porta0" (note that the quotes are necessary) The command line version is useful for setting up your simulation project from within a script. - Lower case 'z' and upper case 'Z' zoom in and zoom out - Lower case 'l' (ell) and lower case 'r' pan left and right - Traces are red with a black background - High density events (i.e. more than one edge per pixel) are shown in white. - Glitches are shown in yellow. (A glitch is a signal that changes states more than once in one simulation cycle). - A light gray grid aligns with the major tick marks. - The colors are currently hardcoded. Here's what's not supported but will be added later: - Support for an arbitrary number of traces - Support for multi-bit objects (e.g. registers). - Support for user-define colors - Support for signal overlays - Support for analog signals - Support for infinite horizontal scrolling (where infinite means from the start to the stop of simulation). - Support for markers. - Provide a mechanism for writing the trace information to an LXT file. Here's a little background on the implementation: The scope window is integrated into gpsim (as opposed to being an external module that is loaded). Once a signal has been selected to be viewed, every event will be captured (in other words, there is no concept of "sample rate" like in a real scope). However, the gui only shows a small portion of the entire waveform. The scroll bar at the bottom of the window scrolls through this small portion of time. The panning functions get around this scrolling limitation. The event buffer that stores the event states is currently a circular buffer. I haven't tested what happens when it wraps around, but it probably ain't pretty. However, I intend to make the buffer a linear one that can grow indefinitely. A binary algorithm searches for event times while plotting. The execution time for this is dictated by the number of pixels as opposed to the number events. In other words, if you're zoomed all the way out and viewing a bazillion event states, the time to render the screen will be nearly as fast as the case when there are only a few events. ---- If you have any questions or comments, please feel free to ask or suggest (or complain!). Scott | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |