Skip to content

A set of postscript functions for drawing waveforms

Notifications You must be signed in to change notification settings

danbone/DrawWaveform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Every once in a while, I've needed to produce a sample waveform diagram for documentation. Omnigraffle and Visio have some templates, but it's painful to line all the bits up. There are also some fonts that contain pieces of waveforms, which is easier but doesn't look quite as nice and also don't allow labeling of traces easily. I was inspired by this LaTeX macro, but I wanted to make it look a little more polished and I'm not really a LaTeX user.

This is a postscript library that allows creating waveform images. The waveforms can be defined by calling a small set of library functions (the program to do this is at the end of the source file).

numclocks numsignals startwaveform
Begins drawing a new waveform with the specified number of clock transitions and signals Note that the clock will be drawn automatically.

name newsignal
Starts a new signal with the specified name

value numclocks drawbit
Draws a single bit waveform with a given value for a specified number of clocks

label numclocks drawknown
Draws a multi-bit waveform with the given label

numclocks drawunknown
Draw a multi-bit waveform that is unknown. It will be filled with gray

numclocks drawhiz
Draw a portion of signal that is floating (high impedance)

This can be invoked from ghostscript (gs waveform.ps) or you can double click the postscript file directly on a Mac.

sample

About

A set of postscript functions for drawing waveforms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published