<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml' />
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
	
.wizard .notChanged {background:transparent;}
.wizard .changedLocally {background:#80ff80;}
.wizard .changedServer {background:#8080ff;}
.wizard .changedBoth {background:#ff8080;}
.wizard .notFound {background:#ffff80;}
.wizard .putToServer {background:#ff80ff;}
.wizard .gotFromServer {background:#80ffff;}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; width:90%; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar [[ToolbarCommands::EditToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see AdvancedOptions
<<importTiddlers>>
/***
''Do not download or install yet. This project is [[In Flux]] and will likely change drastically before I release a first version. Look in [[Plugins]] for code I released.''
|Name|BibTexPlugin|
|Created by|[[Frank Dellaert|http://www.cc.gatech.edu/~dellaert]]|
|Location|http://www.cc.gatech.edu/~dellaert/#BibTexPlugin|
|Version|In Flux|
++++!!![Description|Click to open/close]
A TiddlyWikiMacro to enable formatting publication references from a <<wikipedia Bibtex>> entry. It works in the [[AliasPlugin|http://www.tiddlyforge.net/pytw/#AliasPlugin]] style: after calling {{{<<bibtex text>>}}} a macro is defined that can be invoked by the ~BibTex entry's key.
The parsing is rather primitive and hence the ~BibTex cannot be arbitrary. In particular (but probably not exhaustively):
* you can't use commas inside values
* you cannot use multi-line entries
The author's names are looked up in the database of people defined by  [[PersonPlugin|http://www.cc.gatech.edu/~dellaert/#PersonPlugin]]. They have to be an exact match to the name defined by {{{<<person>>}}}.
===
+++!!![Example|Click to open/close]
{{{<<bibtex  "@InProceedings{Dellaert05aaai,
  author =	 {Frank Dellaert and Alexander Kipp and Peter Krauthausen},
  title =	 {A Multifrontal {QR} Factorization Approach to Distributed Inference applied to Multi-robot Localization and Mapping},
  booktitle =	 AAAI,
  year =	 2005,  
  url =		 {http://www.cc.gatech.edu/~dellaert/pubs/Dellaert05aaai.pdf}
}">>}}}
<<bibtex "@InProceedings{Dellaert05aaai,
  author =	 {Frank Dellaert and Alexander Kipp and Peter Krauthausen},
  title =	 {A Multifrontal {QR} Factorization Approach to Distributed Inference applied to Multi-robot Localization and Mapping},
  booktitle =	 AAAI,
  year =	 2005,  
  url =		 {http://www.cc.gatech.edu/~dellaert/pubs/Dellaert05aaai.pdf}
}">>
{{{<<Dellaert05aaai>>}}}
<<Dellaert05aaai>>
===
+++!!![Installation|Click to open/close]
Import (or copy/paste) this tiddler into your document: and tag it with "systemConfig". In addition, the code relies on:
# the external JavaScript code in the file [[bibtex.js|bibtex.js]]. You can also paste that code below if you want a self-contained TiddlyWiki.
# [[PersonPlugin|http://www.cc.gatech.edu/~dellaert/#PersonPlugin]]
# [[NestedSlidersPlugin|http://www.tiddlyforge.net/pytw/#NestedSlidersPlugin]]
===
***/
// //+++!!![Code|Click to open/close]
//{{{
//===============================================================
// Utilities
//===============================================================

var bibtex = {}

// create an error DIV out of html text
bibtex.error = function(html) {
  return "<div id=\"bibtexError\">" + html + "</div>"
}

// debugging in document
bibtex.debug = function(str) {
  document.write(bibtex.error(str));
}

// debugging in document
bibtex.inspect = function(obj) {
  for (i in obj) bibtex.debug(i)
}

// trim whitespace on left and right
// from http://www.js-examples.com/javascript/?view=1022
bibtex.trim1 = function(str) {
  var pattern=/^\s*(\S.*\S)\s*$/;
  var a=pattern.exec(str);
  var result = str;
  if (a) result=a[1];
  return result;
}
  
// trim whitespace and delimiters from string
bibtex.trim = function(str) {

  // trim {} or ""
  function trim2(str)
  {
    str = str.replace(/{/g,"");
    str = str.replace(/}/g,"");
    var pattern=/^\"(.*)\"$/;
    var a=pattern.exec(str);  
    var result = str;
    if (a) result=a[1];
    return result;
  }

  return trim2(bibtex.trim1(str));
}

//===============================================================
// BibTexEntry object
//===============================================================

// constructor
function BibTexEntry(text) {

  if (!text) throw ("BibTexEntry: empty text");

  // store original text
  this.text = text;

  // get type and text between braces
  var i = text.indexOf('{');
  if (i == -1) throw ("BibTexEntry: no { delimiter");
  var j = text.lastIndexOf('}');
  if (j == -1) throw ("BibTexEntry: no } delimiter");

  this.type = text.slice(1,i);
  var inner = text.slice(i+1,j);

  // split inner into pairs
  var pairs = inner.split(',');

  // get the key and drop it from pairs
  this.key = pairs.shift();
  if (!this.key) throw ("BibTexEntry: no key");

  // now loop over the remaining pairs
  this.nrPairs = pairs.length;
  for (var k in pairs) {
    var pair = pairs[k];
    if (pair.length>2) { // to get rid of whitespace fields, fix !
      var keyvalue = pair.split('=');
      if (keyvalue.length!=2) throw ("BibTexEntry: invalid key-value pair: [" + pair + "]");
      var key = bibtex.trim(keyvalue[0]);
      var val = bibtex.trim(keyvalue[1]);
      this[key]=val;
      }
    else {
      this.nrPairs = this.nrPairs - 1;
    }
  }
  
  // Validate: should be automated with required fields per type
  switch (this.type) {
  case "Person":
    if (!this.name) throw "BibTexEntry: Person has no name";
    break;
  }
}

// render as string
BibTexEntry.prototype.toString = function() { return this.text }
  
// render as a list
BibTexEntry.prototype.toList = function()
{
  var string = "<ul>";
  string += "<li>type : " + this.type;
  string += "<li>key  : " + this.key;
  string += "<li>author : " + this.author;
  string += "<li>year   : " + this.year;
  string += "<li>title  : " + this.title;
  switch (this.type) {
  case "Article":
    string += "<li>journal : " + this.journal;
    break;
  case "InProceedings":
    string += "<li>booktitle : " + this.booktitle;
    break;
  case "TechReport":
    string += "<li>institution : " + this.institution;
    string += "<li>number      : " + this.number;
    break;
  }
  return string + "</ul>";
}
   
// render as HTML
BibTexEntry.prototype.render = function(database)
{
  var string = "";

  function expand(author) {
    author=bibtex.trim1(author);
    if (!database) 
      string += span("author",author);
    else {
      var key = database.lookup(author);
      if (!key) 
	string += span("author",author);
      else
	string += database.entry(key).render();
    }
  }

  function span(id,str) { return "<span id=\"" + id + "\">" + str + "</span>"}

  function renderTitleAuthors(entry) {
    // title and URL
    if (entry.url) 
      {string += "<a id=\"linkedTitle\" href=" + entry.url + ">" + entry.title + "</a>"}
    else 
      string += span("title",entry.title);
    
    // authors
    string += ", ";
    var authors = entry.author.split("and");
    var nrAuthors = authors.length;
    expand(authors[0]);
    if (nrAuthors==2) {
      string += " and "; expand(authors[1]);
    }
    else {
      for (var i=1; i < nrAuthors; i++) {
	if (i==nrAuthors-1) {string += ", and "} else {string += ", "}
	expand(authors[i])
      }
    }
  };
  
  switch (this.type) {
  case "Person":
    // name and URL
    if (this.url) 
      {string += "<a id=\"linkedAuthor\"href=" + this.url + ">" + this.name + "</a>"}
    else 
      string += span("author",this.name);
    break;
  case "Article":
    renderTitleAuthors (this);
    string += ", " + span("journal",this.journal);
    string += ", " + span("year",this.year);
    break;
  case "InProceedings":
    renderTitleAuthors (this);
    string += ", " + span("booktitle",this.booktitle);
    string += ", " + span("year",this.year);
    break;
  case "TechReport":
    renderTitleAuthors (this);
    string += ", " + span("institution",this.institution);
    string += ", " + span("number",this.number);
    string += ", " + span("year",this.year);
    break;
  }
  return string;
}

//===============================================================
// Database Object
//===============================================================

// create a list of entries from possibly empty strings
function Database(strings) {
  this.entries={}; // BibTex entries
  this.reverse={}; // Reverse name lookup
  for (var i in strings) {
    var text = strings[i];
    if (text) {
      try {
	var entry = new BibTexEntry('@'+text);
	this.entries[entry.key] = entry;
	if (entry.type == "Person")  this.reverse[entry.name] = entry.key;
      }
      catch (err) {bibtex.debug(err)}
    }
  }
}

// Create database from a string
function DatabaseFromString(str) {
  var strings = str.split('@');
  return new Database(strings);
}

// retrieve an entry with a given key 
Database.prototype.entry = function(key) {
  var entry = this.entries[key];
  if (entry) return entry; else throw "Database.entry: unknown BibTex key: " + key
}

// retrieve key of a person, undefined if not found.
Database.prototype.lookup = function(name) {
  return this.reverse[name]; // todo: get rid of warning
}

// render an entry with a given key to html
Database.prototype.render = function(key) {
  var entry = this.entry(key);
  return entry.render(this)
}

// return an array of keys that match a regex in a given field. If the
// field is not given, the regex will be matched in the text field.
Database.prototype.search = function(regex,fieldName) {
  if (!fieldName) fieldName="text";
  var keys = [];
  for(var key in this.entries) {
    var entry = this.entry(key);
    try {
      var field = entry[fieldName];
      if (field.search(regex) != -1) keys.push(entry.key)
    }
    catch (err) { /* don't do anything */ }
  }
  return keys;
}

// search from a string
Database.prototype.search2 = function(str) {
  if (!str) throw "Database.search2: empty search string";
  var params = str.split(',');
  var regex = params[0];
  var field = params.length>=2 ? bibtex.trim1(params[1]) : "text";
  return this.search(regex,field);
}

// render all keys in a key array to a list of <LI> items
Database.prototype.keysToList = function(keys) {
  var string = "";
  for (var i in keys) {
    string += "<li>" + this.render(keys[i]) + "</li>";
  }
  return string
}

// render all keys as an unordered list
Database.prototype.keysToUL = function(keys) {
  return "<UL>\n"+this.keysToList(keys)+"</UL\n"
}

//===============================================================
// Database, DOM-Specific
//===============================================================

// Get bibtex element and load into database
// Assumes bibtex file included as <pre id="bibtex">file here</pre>
var DatabaseFromDocument = function() {
  var element = document.getElementById("bibtex");
  return DatabaseFromString(element.textContent);
}

// replace all references by a rendered version
Database.prototype.replaceRefs = function() {
  var tags = document.getElementsByName("ref");
  for(var i=0; i<tags.length; i++) {
    var element = tags[i];
    element.innerHTML = this.render(tags[i].textContent);
  }
}

// search and render all keys as a list
Database.prototype.searchToUL = function(regex,field) {
  document.write(this.keysToUL(this.search(regex,field)));
}

// replace all searches by by a rendered version
Database.prototype.replaceSearches = function() {
  var tags = document.getElementsByName("search");
  for(var i=0; i<tags.length; i++) {
    var element = tags[i];
    var str = element.textContent;
    try {
      if (!str) throw "no search string";
      var params = str.split(',');
      var regex = params[0];
      var field = params.length>=2 ? bibtex.trim1(params[1]) : "text";
      var keys = this.search(regex,field);
      if (keys.length==0) throw "no matches"
      element.innerHTML = this.keysToList(keys);
    }
    catch (err) {element.innerHTML = bibtex.error("Search \"" + str + "\": " + err)}
  }
}


config.macros.bibtex = {};

// format a BibTex entry
config.macros.bibtex.format = function(place, entry) {
  // start with title linked to url
  wikify("''[[" + entry.title + "|" + entry.url + "]]'', ", place);

  // Now reverse lookup authors if they are defined
  function expand(author) {
    config.macros.personLookup.handler (place,"personLookup",[author])
  }
  var authors = entry.author.split(" and ");
  var nrAuthors = authors.length;
  expand(authors[0]);
  if (nrAuthors==2) {
    wikify(" and ",place); expand(authors[1]);
  }
  else {
    for (var i=1; i < nrAuthors; i++) {
      if (i==nrAuthors-1) {wikify(", and ",place)} else  {wikify(", ",place)};
      expand(authors[i])
    }
  }

  // finish with specific formatting
  switch(entry.type) {
    case "Article": wikify(", " + entry.journal, place); break;
    case "InProceedings": wikify(", " + entry.booktitle, place); break;
    case "TechReport": wikify(", " + entry.institution + ", " + entry.number, place); break;
  }
   wikify(", " + entry.year, place);
   wikify("   +++[BibTex|Show BibTex Entry]>{{{"+entry.text+"}}}===", place);
 }

// Define a macro (as in AliasPlugin)
config.macros.bibtex.helper = function(alias,entry) {
  if (config.macros[alias]==undefined) // create new macro (as needed)
    {
    config.macros[alias] = {};
    config.macros[alias].handler = function (place,macroName,params) {
      var entry = config.macros[macroName].entry;
      config.macros.bibtex.format(place, entry)
    }
  }
  config.macros[alias].entry = entry; // define entry
}

// parse arguments to macro and call helper
config.macros.bibtex.handler = function(place,macroName,params) {
  var text = params[0];
  var entry = new BibTexEntry(text);
  //alert(entry.toString()); // for debugging
  var alias = entry.key;
  config.macros.bibtex.helper(alias,entry);
  // wikify("{{{"+text+"}}}", place); // uncomment this if feedback required
}
//}}}
// //===
* Download the source code from the [[here|ftp://gaisler.com/gaisler.com/bcc/src]]. You want to download the newest version of the bcc-src.
* untar bcc-src-x.x.xx to a folder where you want to keep the binaries
* download all the GNU sources by typing 'make download' in the bcc-src folder. 
* get a cup of coffee and wait for all the sources to finish downloading (takes a while)
* Once the GNU sources finish downloading, set the env variable CURDIR to the bcc-src folder by typing:
/*{{{*/
export CURDIR=`pwd`
/*}}}*/
* Now type the following commands.
/*{{{*/
$mkdir $(CURDIR)/toolchains/sparc-elf-3.2.3
$mkdir $(CURDIR)/toolchains/sparc-elf-3.4.4
$cd /opt
$ln -s $(CURDIR)/toolchains/sparc-elf-3.2.3 sparc-elf-3.2.3
$ln -s $(CURDIR)/toolchains/sparc-elf-3.4.4 sparc-elf-3.4.4
$cd $(CURDIR)
$make all
/*}}}*/
* Once this is finished, add $(CURDIR)/toolchains/sparc-elf-4.4.4/bin to your path by typing
/*{{{*/
export PATH=$(CURDIR)/toolchains/sparc-elf-3.4.4/bin:$PATH
/*}}}*/
* Now you should be able to build progarms using the sparc-elf toolchains!
A debugging interface to our simulator called CSIM is provided in the PRET release.  It is located in the scripts/ directory.  When run, it must be given an argument of the directory containing the SREC files to run.

From inside CSIM, one can type help to get a list of the valid commands.  Many of the commands use a similar syntax to TSIM, the simulator for the SPARC soft-core from [[Aeroflex Gaisler|http://www.gaisler.com/cms/]].  The most commonly used ones are as follows.
* ''break/lbreak/unbreak'': Create or remove breakpoints at a given address or label.
* ''run'': Run the program for a specified number of cycles.
* ''tra'': Trace through the program for a specified number of cycles, printing out each instruction. 
* ''reg/dt'':  Print the contents of the normal registers, special registers, and deadline timers.
* ''thread/unthread'': Change which threads are being observed.
* ''cycle'':  Print out the current clock cycle.
* These instructions assume the user is using the ''bash'' shell.
! Download Tarball
Download [[pret-1.0.tar.gz|http://chess.eecs.berkeley.edu/pret/src/pret-1.0/pret-1.0.tar.gz]]
! Untar Tarball
* The distributed file must be untarred. The [[tar manual|http://www.gnu.org/software/tar/manual/index.html]] provides details on the tar command.
{{{
$ tar -zxvf pret-1.0.tar.gz
}}}
! Setup Environment Variables
{{{
$ cd pret-1.0/
$ export PRET_ISS=`pwd`
}}}
Note that `pwd` returns the current directory path so make sure to be in the directory where ''pret-1.0'' tarball was untarred. Alternatively, the ''PRET_ISS'' environment can be set permanently in ''.bashrc''. Please consult online bash manuals to do so. 
! Compiling PRET 
* The default configuration builds the C++ version of the simulator. 
* Configure the default configuration.
{{{
$ ./configure 
}}}
* Build the simulator.
{{{
$ make
}}}
* The PRET binary is compiled as "$PRET_ISS/src/pret". Note that depending on the operating system used, the extension for this binary will differ. For example, on Cygwin the binary is compiled as ''$PRET_ISS/src/pret.exe''.
! Compiling PRET with SystemC
* Please refer to installation instructions for SystemC on their website. 
* Set another environment variable for SystemC.
{{{
$ export SYSTEMC=<path-to-systemc>
}}}
*To use SystemC, the following option must be used with configure: {{{--enable-systemc}}}.
{{{
$ ./configure --enable-systemc 
}}}
* Build the simulator.
{{{
$ make
}}}
When writing programs for the pret simulator, you may use up to six separate hardware threads.  The simulator reads a program into each hardware threads, so dummy programs should be loaded into unused threads.  

These thread programs are compiled using the [[SPARC ELF|Requirements]] GCC toolchain. Ensure that the ''sparc-elf-gcc'' executable is in the $PATH environment variable. Instructions for installing the toolchain are [[here.|Toolchain]]

We use a script to automatically compile and map the threads to the correct address space via the ''$PRET_ISS/scripts/compile_threads.py'' script. In order for this script to correctly compile the thread programs, the correct ''.makefile'' files must exist in the folder. The easiest build configuration is to have six ''.c'' programs that are compiled and loaded into the individual threads of the PRET simulator.  In most cases, the configuration of a folder will look like this:
{{{
|-- Makefile
|-- deadline.h
|-- thread0.c
|-- thread0.makefile
|-- thread1.c
|-- thread1.makefile
|-- thread2.c
|-- thread2.makefile
|-- thread3.c
|-- thread3.makefile
|-- thread4.c
|-- thread4.makefile
|-- thread5.c
|-- thread5.makefile
|-- thread_common.makefile
}}}

Note that ''deadline.h'' contains the macros for defining the deadline instructions. 

After successfully compiling your program, you will want to use the [[standalone simulator|Usage]], or debug with [[CSIM]]
* These instructions assume the user is using the ''bash'' shell.
! Compiling Source from SVN
* Execute the ''bootstrap.sh'' script to generate ''configure''.
{{{
$ ./bootstrap.sh
}}}
! Setup Environment Variables
{{{
$ cd <path-to-checkout>/pret_iss
$ export PRET_ISS=`pwd`
}}}
Note that ''<path-to-checkout>'' is the directory where the source was checked out from SVN. Also, note that `pwd` returns the current directory path so make sure to be in the ''<path-to-checkout>'' directory. Alternatively, the ''PRET_ISS'' environment can be set permanently in ''.bashrc''. Please consult online bash manuals to do so. 
! Compiling PRET 
* The default configuration builds the C++ version of the simulator. 
{{{
$ ./configure 
}}}
* Build the simulator.
{{{
$ make
}}}
* The PRET binary is compiled as "$PRET_ISS/src/pret". Note that depending on the operating system used, the extension for this binary will differ. For example, on Cygwin the binary is compiled as ''$PRET_ISS/src/pret.exe''.
! Compiling PRET with SystemC
* Please refer to installation instructions for SystemC on their website. 
* Set another environment variable for SystemC.
{{{
$ export SYSTEMC=<path-to-systemc>
}}}
*To use SystemC, the following option must be used with configure: {{{--enable-systemc}}}.
{{{
$ ./configure --enable-systemc 
}}}
* Build the simulator.
{{{
$ make
}}}
Visit the [[PRET Project |http://chess.eecs.berkeley.edu/pret/]] website.
Copyright (c) 2007-2009 The Regents of the University of California.
All rights reserved.

Permission is hereby granted, without written agreement and without
license or royalty fees, to use, copy, modify, and distribute this
software and its documentation for any purpose, provided that the
above copyright notice and the following two paragraphs appear in all
copies of this software.

IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
ENHANCEMENTS, OR MODIFICATIONS.
                                                                                                
The regression test infrastructure includes code from SystemC with the
following license:

  Copyright (c) 1996-2002 by all Contributors.
  All Rights reserved.

  The contents of this file are subject to the restrictions and limitations
  set forth in the SystemC Open Source License Version 2.3 (the "License");
  You may not use this file except in compliance with such restrictions and
  limitations. You may obtain instructions on how to receive a copy of the
  License at http://www.systemc.org/. Software distributed by Contributors
  under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
  ANY KIND, either express or implied. See the License for the specific
  language governing rights and limitations under the License.

For your convenience the PRET team has included the license.pdf file that
we received with SystemC as [[systemc_license.pdf|systemc_license.pdf]]

config.options.chkSearchListTiddler = true;
config.options.chkSearchShadows = false;
config.options.txtSearchExcludeTags = "excludeSearch systemConfig script"
config.options.chkSinglePageMode = true;
config.options.chkSaveBackups = false;
[[Home]]
The current method to load instructions and data into the scratchpads is to statically load the contents during initialization. 
! Static Memory Allocation for Instruction and Data
A static memory allocation map can be specified in text files. We have certain naming conventions; ''thread0.c'' has an instruction memory allocation file ''thread0.ispm'' and data memory allocation in file ''thread0.dspm''. Every thread can have a corresponding allocation file for instruction and/or data. The file format is simple. It accepts a pair of addresses that form an address range to be loaded into the scratchpad memories. The first address specifies the start of the allocation, and the second address specifies one past the end of the allocation. If the allocation files exist in the directory with the SREC files, then they will be loaded; otherwise, no instructions and data are preloaded into the scratchpad memory.
!! Example of a simple ''thread0.ispm''
{{{
40000000  40009df4
}}}
!! Example of a simple ''thread0.dspm''
Here, we specify individual addresses by specifying the start and end of a range to be the same address.
{{{
400ff7a0 400ff7a0
400ff790 400ff790
4000b284 4000b284
}}}
!! All Instruction and Data on Scratchpad Memories
To load all instruction and data onto the scratchpad memories, we provide memory allocation files that specify the entire range for instruction and data for each thread. These are straightforward and can be created based on the memory map. 
!! Example of  of 24Kb Instructions -- ''thread0.ispm''
{{{
40000000  40006100
}}}
!! Example of 32Kb of Data  -- ''thread0.dspm''
{{{
400F8000 40100000
}}}
/***
|Name|GotoPlugin|
|Source|http://www.TiddlyTools.com/#GotoPlugin|
|Version|1.4.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|view any tiddler by entering it's title - displays list of possible matches|

''View a tiddler by typing its title and pressing //enter//.''  Input just enough to uniquely match a single tiddler title and ''press //enter// to auto-complete the title for you!!''  If multiple titles match your input, a list is displayed.  You can scroll-and-click (or use arrows+enter) to select/view a tiddler, or press //escape// to close the listbox to resume typing.  When the listbox is ''//not//'' being displayed, press //escape// to clear the current text input and start over.

Note: ''At any time, you can move the focus directly to the text input field by using the ~ALT-G keyboard shortcut.''
!!!!!Examples
<<<
| //IMPORTANT NOTE:// ''As of version 1.4.0 (2007.04.25),<br>to avoid conflict with javascript reserved keywords<br>the {{{<<goto>>}}} macro has been renamed to {{{<<gotoTiddler>>}}}'' |
syntax: {{{<<gotoTiddler quiet insert inputstyle liststyle>>}}}
All parameters are optional.
* ''quiet'' prevents //automatic// display of the list as each character is typed.  To view the list when ''quiet'', use //down// or //enter//.
* ''insert'' causes the selected tiddler title to be inserted into the tiddler source currently being edited (use with EditTemplate)
* ''inputstyle'' and ''liststyle'' are CSS declarations that modify the default input and listbox styles.  Note: styles containing spaces must be surrounded by ({{{"..."}}} or {{{'...'}}}) or ({{{[[...]]}}}).
{{{<<gotoTiddler>>}}}
<<gotoTiddler>>
{{{<<gotoTiddler quiet>>}}}
<<gotoTiddler quiet>>
{{{<<goto width:20em width:20em>>}}}
<<gotoTiddler width:20em width:20em>>

You can also invoke the macro with the "insert" keyword.  When used in the [[EditTemplate]], like this:
{{{
<span macro="gotoTiddler insert"></span>
}}}
it allows you to type/select a tiddler title, and instantly insert a link to that title (e.g. {{{[[TiddlerName]]}}}) into the tiddler source being edited.
<<<
!!!!!Configuration
<<<
You can create a tiddler tagged with <<tag systemConfig>> to control the maximum height of the listbox of tiddlers/shadows/tags. //The default values are shown below://
//{{{
config.macros.gotoTiddler.listMaxSize=10;
//}}}
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''GotoPlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revisions
<<<
''2007.10.31 [1.4.3]'' removed extra trailing comma on last property of config.macros.gotoTiddler object.  This fixes an error under InternetExplorer that was introduced 6 days ago... sure, I should have found it sooner, but... ''WHY DON'T PEOPLE TELL ME WHEN THINGS ARE BROKEN!!!!''
''2007.10.25 [1.4.2]'' added onclick handler for input field, so that clicking in field hides the listbox.
''2007.10.25 [1.4.1]'' re-wrote getItems() to cache list of tiddlers/shadows/tags and use case-folded simple text match instead of regular expression to find matching tiddlers.  This *vastly* reduces processing overhead between keystrokes, especially for documents with many (>1000) tiddlers.  Also, removed local definition of replaceSelection(), now supported directly by the TW2.2+ core, as well as via backward-compatible plugin (see [[CoreTweaksArchive]]).
''2007.04.25 [1.4.0]'' renamed macro from "goto" to "gotoTiddler".  This was necessary to avoid a fatal syntax error in Opera (and other browsers) that require strict adherence to ECMAScript 1.5 standards which defines the identifier "goto" as "reserved for FUTURE USE"... *sigh*
''2007.04.21 [1.3.2]'' in html definition, removed DIV around droplist (see 1.2.6 below).  It created more layout problems then it solved. :-(
''2007.04.01 [1.3.1]'' in processItem(), ensure that correct textarea field is found by checking for edit=="text" attribute
''2007.03.30 [1.3.0]'' tweak SideBarOptions shadow to automatically add {{{<<goto>>}}} when using default sidebar content
''2007.03.30 [1.2.6]'' in html definition, added DIV around droplist to fix IE problem where list appears next to input field instead of below it.  
''2007.03.28 [1.2.5]'' in processItem(), set focus to text area before setting selection (needed for IE to get correct selection 'range')
''2007.03.28 [1.2.4]'' added prompt for 'pretty text' when inserting a link into tiddler content
''2007.03.28 [1.2.3]'' added local copy of core replaceSelection() and modified for different replace logic
''2007.03.27 [1.2.2]'' in processItem(), use story.getTiddlerField() to retrieve textarea control
''2007.03.26 [1.2.1]'' in html, use either 'onkeydown' (IE) or 'onkeypress' (Moz) event to process <esc> key sooner, to prevent <esc> from 'bubbling up' to the tiddler (which will close the current editor).
''2007.03.26 [1.2.0]'' added support for optional "insert" keyword param. When used in [[EditTemplate]], (e.g. {{{<span macro="goto insert"></span>}}}) it triggers alternative processing: instead of displaying the selected tiddler, that tiddler's title is inserted into a tiddler's textarea edit field surrounded by {{{[[...]]}}}.
''2006.05.10 [1.1.2]'' when filling listbox, set selection to 'heading' item... auto-select first tiddler title when down/enter moves focus into listbox
''2006.05.08 [1.1.1]'' added accesskey ("G") to input field html (also set when field gets focus).  Also, inputKeyHandler() skips non-printing/non-editing keys. 
''2006.05.08 [1.1.0]'' added heading to listbox for better feedback (also avoids problems with 1-line droplist)
''2006.05.07 [1.0.0]'' list matches against tiddlers/shadows/tags.  input field auto-completion... 1st enter=complete matching input (or show list)... 2nd enter=view tiddler.  optional "quiet" param controls when listbox appears.
''2006.05.06 [0.5.0]'' added handling for enter (13), escape(27), and down(40) keys.   Change 'ondblclick' to 'onclick' for list handler to view tiddlers (suggested by Florian Cauvin - prevents unintended trigger of tiddler editor).  shadow titles inserted into list instead of appended to the end.
''2006.05.05 [0.0.0]'' started
<<<
!!!!!Credits
>This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
!!!!!Code
***/
//{{{
version.extensions.gotoTiddler = {major: 1, minor: 4, revision: 3, date: new Date(2007,10,31)};

// automatically tweak shadow SideBarOptions to add <<gotoTiddler>> macro above <<search>>
config.shadowTiddlers.SideBarOptions=config.shadowTiddlers.SideBarOptions.replace(/<<search>>/,"{{button{goto}}}\n<<gotoTiddler>><<search>>");

config.macros.gotoTiddler= { 
	handler:
	function(place,macroName,params) {
		var quiet=(params[0] && params[0]=="quiet"); if (quiet) params.shift();
		var insert=(params[0] && params[0]=="insert"); if (insert) params.shift();
		var instyle=params.shift(); if (!instyle) instyle="";
		var liststyle=params.shift(); if (!liststyle) liststyle="";
		var keyevent=window.event?"onkeydown":"onkeypress";
		createTiddlyElement(place,"span").innerHTML
			=this.html.replace(/%keyevent%/g,keyevent).replace(/%insert%/g,insert).replace(/%quiet%/g,quiet).replace(/%instyle%/g,instyle).replace(/%liststyle%/g,liststyle);
	},

	html:
	'<form onsubmit="return false" style="display:inline;margin:0;padding:0">\
		<input name=gotoTiddler type=text autocomplete="off" accesskey="G" style="%instyle%"\
			title="enter a tiddler title"\
			onclick="this.form.list.style.display=\'none\';"\
			onfocus="this.select(); this.setAttribute(\'accesskey\',\'G\');"\
			%keyevent%="return config.macros.gotoTiddler.inputEscKeyHandler(event,this,this.form.list);"\
			onkeyup="return config.macros.gotoTiddler.inputKeyHandler(event,this,this.form.list,%quiet%,%insert%);">\
		<select name=list style="%liststyle%;display:none;position:absolute"\
			onchange="if (!this.selectedIndex) this.selectedIndex=1;"\
			onblur="this.style.display=\'none\';"\
			%keyevent%="return config.macros.gotoTiddler.selectKeyHandler(event,this,this.form.gotoTiddler,%insert%);"\
			onclick="return config.macros.gotoTiddler.processItem(this.value,this.form.gotoTiddler,this,%insert%);">\
		</select>\
	</form>',

	getItems:
	function(val) {
		if (!this.items.length || val.length<2) { // starting new search, refresh cached list of tiddlers/shadows/tags
			this.items=new Array();
			var tiddlers=store.getTiddlers("title","excludeLists");
			for(var t=0; t<tiddlers.length; t++) this.items.push(tiddlers[t].title);
			for (var t in config.shadowTiddlers) this.items.pushUnique(t);
			var tags=store.getTags();
			for(var t=0; t<tags.length; t++) this.items.pushUnique(tags[t][0]);
		}
		var found = [];
		var match=val.toLowerCase();
		for(var i=0; i<this.items.length; i++)
			if (this.items[i].toLowerCase().indexOf(match)!=-1) found.push(this.items[i]);
		return found;
	},
	items: [], // cached list of tiddlers/shadows/tags

	getItemSuffix:
	function(t) {
		if (store.tiddlerExists(t)) return "";  // tiddler
		if (store.isShadowTiddler(t)) return " (shadow)"; // shadow
		return " (tag)"; // tag 
	},

	keyProcessed:
	function(ev) { // utility function: exits handler and prevents browser from processing the keystroke
		ev.cancelBubble=true; // IE4+
		try{event.keyCode=0;}catch(e){}; // IE5
		if (window.event) ev.returnValue=false; // IE6
		if (ev.preventDefault) ev.preventDefault(); // moz/opera/konqueror
		if (ev.stopPropagation) ev.stopPropagation(); // all
		return false;
	},

	inputEscKeyHandler:
	function(event,here,list) {
		var key=event.keyCode;
		// escape... hide list (2nd esc=clears input)
		if (key==27) {
			if (list.style.display=="none")
				here.value=here.defaultValue;
			list.style.display="none";
			return this.keyProcessed(event);
		}
		return true; // key bubbles up
	},

	inputKeyHandler:
	function(event,here,list,quiet,insert) {
		var key=event.keyCode;
		// non-printing chars... bubble up, except: backspace=8, enter=13, space=32, down=40, delete=46
		if (key<48) switch(key) { case 8: case 13: case 32: case 40: case 46: break; default: return true; }
		// blank input... if down/enter... fall through (list all)... else, and hide list
		if (!here.value.length && !(key==40 || key==13))
			{ list.style.display="none"; return this.keyProcessed(event); }
		// find matching items...
		var found = this.getItems(here.value);
		// matched one item using enter key, but not an *exact* match... autocomplete input field
		if (found.length==1 && quiet && key==13 && here.value!=found[0])
			{ list.style.display="none"; here.value=found[0]; return this.keyProcessed(event); }
		// no match or exact match using enter key, create/show tiddler
		if (found.length<2 && key==13)
			return this.processItem(found.length?found[0]:here.value,here,list,insert);
		// quiet/no match, make sure list is hidden
		list.style.display=(!quiet && found.length)?"block":"none";
		// no matches, key bubbles up
		if (!found.length) return true;
		// using down/enter key shows/moves to list...
		if (key==40 || key==13)  { list.style.display="block"; list.focus(); }
		// finally, if list is showing, fill it with found results...
		if (list.style.display!="none") {
			while (list.length > 0) list.options[0]=null; // clear list
			found.sort(); // alpha by title
			var hdr=found.length==1?this.listMatchMsg:this.listHeading.format([found.length]); // list 'heading'
			list.options[0]=new Option(hdr,"",false,false);
			for (var t=0; t<found.length; t++)  // fill list...
				list.options[list.length]=new Option(found[t]+this.getItemSuffix(found[t]),found[t],false,false);
			list.size=(found.length<this.listMaxSize?found.length:this.listMaxSize)+1; // resize list...
			list.selectedIndex=(key==40 || key==13)?1:0;
		}
		return true; // key bubbles up
	},
	listMaxSize: 10,
	listHeading: 'Found %0 matching titles:',
	listMatchMsg: 'Press enter to open tiddler...',

	selectKeyHandler:
	function(event,list,editfield,insert) {
		if (event.keyCode==27) // escape... hide list, move to edit field
			{ editfield.focus(); list.style.display="none"; return this.keyProcessed(event); }
		if (event.keyCode==13 && list.value.length) // enter... view selected item
			{ this.processItem(list.value,editfield,list,insert); return this.keyProcessed(event); }
		return true; // key bubbles up
	},

	processItem:
	function(title,here,list,insert) {
		if (!title.length) return; here.value=title; list.style.display='none';
		if (insert) {
			var tidElem=story.findContainingTiddler(here); if (!tidElem) { here.focus(); return false; }
			var e=story.getTiddlerField(tidElem.getAttribute("tiddler"),"text");
			if (!e||e.getAttribute("edit")!="text") return false;
			var txt=prompt(this.askForText,title); if (!txt||!txt.length) { here.focus(); return false; }
			e.focus(); // put focus on target field before setting selection
			replaceSelection(e,"[["+txt+"|"+title+"]]"); // insert selected tiddler as a PrettyLink
		}
		else
			story.displayTiddler(null,title); // show selected tiddler
		return false;
	},
	askForText: "Enter the text to display for this link"
}
//}}}
The PRET project is a collaborative effort lead by [[Prof. Edward A. Lee|http://ptolemy.eecs.berkeley.edu/~eal/]] at U. C. Berkeley, and [[Prof. Stephen A. Edwards|http://www1.cs.columbia.edu/~sedwards/]] at Columbia University.  Our objective is to reintroduce predictable and repeatable timing to real-time embedded processor architectures.  We select architectural techniques that deliver performance enhancements, and that preserve timing predictability and repeatability. This is our first simulation model of the PRET architecture. The project website is at [[http://chess.eecs.berkeley.edu/pret/|http://chess.eecs.berkeley.edu/pret/]].

This document provides information about installing, and running the simulator. The most recent documentation for the simulator is at [[http://chess.eecs.berkeley.edu/pret/release.|http://chess.eecs.berkeley.edu/pret/release]]
!!Release 1.0 made on February 2, 2009

{{downloadButton{[[Download|http://chess.eecs.berkeley.edu/pret/src/pret-1.0/pret-1.0.tar.gz]]}}} and {{downloadButton{[[Install|Installation]]}}}
/***
|Name|InlineJavascriptPlugin|
|Source|http://www.TiddlyTools.com/#InlineJavascriptPlugin|
|Documentation|http://www.TiddlyTools.com/#InlineJavascriptPluginInfo|
|Version|1.9.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Insert Javascript executable code directly into your tiddler content.|
''Call directly into TW core utility routines, define new functions, calculate values, add dynamically-generated TiddlyWiki-formatted output'' into tiddler content, or perform any other programmatic actions each time the tiddler is rendered.
!!!!!Documentation
>see [[InlineJavascriptPluginInfo]]
!!!!!Revisions
<<<
2008.06.11 [1.9.3] added $(...) function as 'shorthand' convenience syntax for document.getElementById()
2008.03.03 [1.9.2] corrected declaration of wikifyPlainText() for 'TW 2.1.x compatibility fallback' (fixes Safari "parse error")
2008.02.23 [1.9.1] in onclick function, use string instead of array for 'bufferedHTML' attribute on link element (fixes IE errors)
2008.02.21 [1.9.0] 'onclick' scripts now allow returned text (or document.write() calls) to be wikified into a span that immediately follows the onclick link.  Also, added default 'return false' handling if no return value provided (prevents HREF from being triggered -- return TRUE to allow HREF to be processed).  Thanks to Xavier Verges for suggestion and preliminary code.
|please see [[InlineJavascriptPluginInfo]] for additional revision details|
2005.11.08 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.InlineJavascriptPlugin= {major: 1, minor: 9, revision: 3, date: new Date(2008,6,11)};

config.formatters.push( {
	name: "inlineJavascript",
	match: "\\<script",
	lookahead: "\\<script(?: src=\\\"((?:.|\\n)*?)\\\")?(?: label=\\\"((?:.|\\n)*?)\\\")?(?: title=\\\"((?:.|\\n)*?)\\\")?(?: key=\\\"((?:.|\\n)*?)\\\")?( show)?\\>((?:.|\\n)*?)\\</script\\>",

	handler: function(w) {
		var lookaheadRegExp = new RegExp(this.lookahead,"mg");
		lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = lookaheadRegExp.exec(w.source)
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var src=lookaheadMatch[1];
			var label=lookaheadMatch[2];
			var tip=lookaheadMatch[3];
			var key=lookaheadMatch[4];
			var show=lookaheadMatch[5];
			var code=lookaheadMatch[6];
			if (src) { // load a script library
				// make script tag, set src, add to body to execute, then remove for cleanup
				var script = document.createElement("script"); script.src = src;
				document.body.appendChild(script); document.body.removeChild(script);
			}
			if (code) { // there is script code
				if (show) // show inline script code in tiddler output
					wikify("{{{\n"+lookaheadMatch[0]+"\n}}}\n",w.output);
				if (label) { // create a link to an 'onclick' script
					// add a link, define click handler, save code in link (pass 'place'), set link attributes
					var link=createTiddlyElement(w.output,"a",null,"tiddlyLinkExisting",wikifyPlainText(label));
					var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML+=(');
					link.code="function _out(place){"+fixup+"\n};_out(this);"
					link.tiddler=w.tiddler;
					link.onclick=function(){
						this.bufferedHTML="";
						try{ var r=eval(this.code);
							if(this.bufferedHTML.length || (typeof(r)==="string")&&r.length)
								var s=this.parentNode.insertBefore(document.createElement("span"),this.nextSibling);
							if(this.bufferedHTML.length)
								s.innerHTML=this.bufferedHTML;
							if((typeof(r)==="string")&&r.length) {
								wikify(r,s,null,this.tiddler);
								return false;
							} else return r!==undefined?r:false;
						} catch(e){alert(e.description||e.toString());return false;}
					};
					link.setAttribute("title",tip||"");
					var URIcode='javascript:void(eval(decodeURIComponent(%22(function(){try{';
					URIcode+=encodeURIComponent(encodeURIComponent(code.replace(/\n/g,' ')));
					URIcode+='}catch(e){alert(e.description||e.toString())}})()%22)))';
					link.setAttribute("href",URIcode);
					link.style.cursor="pointer";
					if (key) link.accessKey=key.substr(0,1); // single character only
				}
				else { // run inline script code
					var fixup=code.replace(/document.write\s*\(/gi,'place.innerHTML+=(');
					var c="function _out(place){"+fixup+"\n};_out(w.output);";
					try	 { var out=eval(c); }
					catch(e) { out=e.description?e.description:e.toString(); }
					if (out && out.length) wikify(out,w.output,w.highlightRegExp,w.tiddler);
				}
			}
			w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
		}
	}
} )
//}}}

// // Backward-compatibility for TW2.1.x and earlier
//{{{
if (typeof(wikifyPlainText)=="undefined") window.wikifyPlainText=function(text,limit,tiddler) {
	if(limit > 0) text = text.substr(0,limit);
	var wikifier = new Wikifier(text,formatter,null,tiddler);
	return wikifier.wikifyPlain();
}
//}}}

// // $(...) function: 'shorthand' convenience syntax for document.getElementById()
//{{{
if (typeof($)=="undefined") { // avoid redefinition
function $() {
	var elements=new Array();
	for (var i=0; i<arguments.length; i++) {
		var element=arguments[i];
		if (typeof element=='string') element=document.getElementById(element);
		if (arguments.length==1) return element;
		elements.push(element);
	}
	return elements;
}
}
//}}}
<html><small>*Click on the links for drop down instructions</small></html> 
* Please follow these steps to ensure that the simulator installs correctly, and to ensure that it works.
#++++(cookie_require)[Requirements »][« Requirements]
<<tiddler Requirements>>
----
===

#Building the PRET simulator from +++(cookie_svn)[SVN source »][« SVN source]
!@@color:#CC6633;Source Checkout@@
<<tiddler "Source Checkout">>
!@@color:#CC6633;Compiling Source@@
<<tiddler "Compiling Source">>
----
=== or +++(cookie_tarball)[Tarball »][« Tarball]
<<tiddler Compiling>>
===

#+++(cookie_tryout)[Trying out the Simulator »][« Trying out the Simulator]
!@@color:#c63;Running the Examples@@
<<tiddler Running>>

You may also try running the [[Regression Tests]] to test the simulator.
===


!!''Links''
[[University of California, Berkeley, EECS Dept.|http://eecs.berkeley.edu]]
[[Columbia University, CS Dept.|http://www.cs.columbia.edu/]] 
[[PRET|http://chess.eecs.berkeley.edu/pret/]]
[[Ptolemy|http://ptolemy.eecs.berkeley.edu]]
[[Home]]
[[About Us|http://chess.eecs.berkeley.edu/pret]]
!''Simulator''
[[Installation]]
[[Usage]]
[[Compiling Programs]]
[[Direct Memory Access]]
[[Regression Tests]]
!''Debugger''
[[CSIM]]
!''Examples''
[[Running]]

<html><a href="javascript:;">Goto:</a></html> <<gotoTiddler width:10em;>><<closeAll>><<permaview>><<newTiddler>><<newJournal 'DD MMM YYYY'>><<saveChanges>><<slider chkSliderOptionsPanel OptionsPanel 'options »' 'Change TiddlyWiki advanced options'>>
''Site Navigation:'' <<back>> | <<history>> | <<forward>>
/***
|Name|NestedSlidersPlugin|
|Source|http://www.TiddlyTools.com/#NestedSlidersPlugin|
|Documentation|http://www.TiddlyTools.com/#NestedSlidersPluginInfo|
|Version|2.4.6|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Options|##Configuration|
|Description|show content in nest-able sliding/floating panels, without creating separate tiddlers for each panel's content|
!!!!!Documentation
>see [[NestedSlidersPluginInfo]]
!!!!!Configuration
<<<
<<option chkFloatingSlidersAnimate>> allow floating sliders to animate when opening/closing
>Note: This setting can cause 'clipping' problems in some versions of InternetExplorer.
>In addition, for floating slider animation to occur you must also allow animation in general (see [[AdvancedOptions]]).
<<<
!!!!!Revisions
<<<
2008.09.07 - 2.4.6 added removeOptionCookie() function for compatibility with [[CookieManagerPlugin]]
2008.06.07 - 2.4.5 in 'onmouseover' handler for 'open on hover' slider buttons,<br>use call() method when invoking document.onclick function (avoids error in IE)
|please see [[NestedSlidersPluginInfo]] for additional revision details|
2005.11.03 - 1.0.0 initial public release.  Thanks to RodneyGomes, GeoffSlocock, and PaulPetterson for suggestions and experiments.
<<<
!!!!!Code
***/
//{{{
version.extensions.NestedSlidersPlugin= {major: 2, minor: 4, revision: 6, date: new Date(2008,9,7)};

// options for deferred rendering of sliders that are not initially displayed
if (config.options.chkFloatingSlidersAnimate===undefined)
	config.options.chkFloatingSlidersAnimate=false; // avoid clipping problems in IE

// default styles for 'floating' class
setStylesheet(".floatingPanel { position:absolute; z-index:10; padding:0.5em; margin:0em; \
	background-color:#eee; color:#000; border:1px solid #000; text-align:left; }","floatingPanelStylesheet");

// if removeOptionCookie() function is not defined by TW core, define it here.
if (window.removeOptionCookie===undefined) {
window.removeOptionCookie=function(cookie) {
	var ex=new Date(); ex.setTime(ex.getTime()-1000);  // immediately expire cookie
	document.cookie = cookie+"=novalue; path=/; expires="+ex.toGMTString();
}
}

config.formatters.push( {
	name: "nestedSliders",
	match: "\\n?\\+{3}",
	terminator: "\\s*\\={3}\\n?",
	lookahead: "\\n?\\+{3}(\\+)?(\\([^\\)]*\\))?(\\!*)?(\\^(?:[^\\^\\*\\@\\[\\>]*\\^)?)?(\\*)?(\\@)?(?:\\{\\{([\\w]+[\\s\\w]*)\\{)?(\\[[^\\]]*\\])?(\\[[^\\]]*\\])?(?:\\}{3})?(\\#[^:]*\\:)?(\\>)?(\\.\\.\\.)?\\s*",
	handler: function(w)
		{
			lookaheadRegExp = new RegExp(this.lookahead,"mg");
			lookaheadRegExp.lastIndex = w.matchStart;
			var lookaheadMatch = lookaheadRegExp.exec(w.source)
			if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
			{
				var defopen=lookaheadMatch[1];
				var cookiename=lookaheadMatch[2];
				var header=lookaheadMatch[3];
				var panelwidth=lookaheadMatch[4];
				var transient=lookaheadMatch[5];
				var hover=lookaheadMatch[6];
				var buttonClass=lookaheadMatch[7];
				var label=lookaheadMatch[8];
				var openlabel=lookaheadMatch[9];
				var panelID=lookaheadMatch[10];
				var blockquote=lookaheadMatch[11];
				var deferred=lookaheadMatch[12];

				// location for rendering button and panel
				var place=w.output;

				// default to closed, no cookie, no accesskey, no alternate text/tip
				var show="none"; var cookie=""; var key="";
				var closedtext=">"; var closedtip="";
				var openedtext="<"; var openedtip="";

				// extra "+", default to open
				if (defopen) show="block";

				// cookie, use saved open/closed state
				if (cookiename) {
					cookie=cookiename.trim().slice(1,-1);
					cookie="chkSlider"+cookie;
					if (config.options[cookie]==undefined)
						{ config.options[cookie] = (show=="block") }
					show=config.options[cookie]?"block":"none";
				}

				// parse label/tooltip/accesskey: [label=X|tooltip]
				if (label) {
					var parts=label.trim().slice(1,-1).split("|");
					closedtext=parts.shift();
					if (closedtext.substr(closedtext.length-2,1)=="=")	
						{ key=closedtext.substr(closedtext.length-1,1); closedtext=closedtext.slice(0,-2); }
					openedtext=closedtext;
					if (parts.length) closedtip=openedtip=parts.join("|");
					else { closedtip="show "+closedtext; openedtip="hide "+closedtext; }
				}

				// parse alternate label/tooltip: [label|tooltip]
				if (openlabel) {
					var parts=openlabel.trim().slice(1,-1).split("|");
					openedtext=parts.shift();
					if (parts.length) openedtip=parts.join("|");
					else openedtip="hide "+openedtext;
				}

				var title=show=='block'?openedtext:closedtext;
				var tooltip=show=='block'?openedtip:closedtip;

				// create the button
				if (header) { // use "Hn" header format instead of button/link
					var lvl=(header.length>5)?5:header.length;
					var btn = createTiddlyElement(createTiddlyElement(place,"h"+lvl,null,null,null),"a",null,buttonClass,title);
					btn.onclick=onClickNestedSlider;
					btn.setAttribute("href","javascript:;");
					btn.setAttribute("title",tooltip);
				}
				else
					var btn = createTiddlyButton(place,title,tooltip,onClickNestedSlider,buttonClass);
				btn.innerHTML=title; // enables use of HTML entities in label

				// set extra button attributes
				btn.setAttribute("closedtext",closedtext);
				btn.setAttribute("closedtip",closedtip);
				btn.setAttribute("openedtext",openedtext);
				btn.setAttribute("openedtip",openedtip);
				btn.sliderCookie = cookie; // save the cookiename (if any) in the button object
				btn.defOpen=defopen!=null; // save default open/closed state (boolean)
				btn.keyparam=key; // save the access key letter ("" if none)
				if (key.length) {
					btn.setAttribute("accessKey",key); // init access key
					btn.onfocus=function(){this.setAttribute("accessKey",this.keyparam);}; // **reclaim** access key on focus
				}
				btn.setAttribute("hover",hover?"true":"false");
				btn.onmouseover=function(ev) {
					// optional 'open on hover' handling
					if (this.getAttribute("hover")=="true" && this.sliderPanel.style.display=='none') {
						document.onclick.call(document,ev); // close transients
						onClickNestedSlider(ev); // open this slider
					}
					// mouseover on button aligns floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this,this.sliderPanel);
				}

				// create slider panel
				var panelClass=panelwidth?"floatingPanel":"sliderPanel";
				if (panelID) panelID=panelID.slice(1,-1); // trim off delimiters
				var panel=createTiddlyElement(place,"div",panelID,panelClass,null);
				panel.button = btn; // so the slider panel know which button it belongs to
				btn.sliderPanel=panel; // so the button knows which slider panel it belongs to
				panel.defaultPanelWidth=(panelwidth && panelwidth.length>2)?panelwidth.slice(1,-1):"";
				panel.setAttribute("transient",transient=="*"?"true":"false");
				panel.style.display = show;
				panel.style.width=panel.defaultPanelWidth;
				panel.onmouseover=function(event) // mouseover on panel aligns floater position with button
					{ if (window.adjustSliderPos) window.adjustSliderPos(this.parentNode,this.button,this); }

				// render slider (or defer until shown) 
				w.nextMatch = lookaheadMatch.index + lookaheadMatch[0].length;
				if ((show=="block")||!deferred) {
					// render now if panel is supposed to be shown or NOT deferred rendering
					w.subWikify(blockquote?createTiddlyElement(panel,"blockquote"):panel,this.terminator);
					// align floater position with button
					if (window.adjustSliderPos) window.adjustSliderPos(place,btn,panel);
				}
				else {
					var src = w.source.substr(w.nextMatch);
					var endpos=findMatchingDelimiter(src,"+++","===");
					panel.setAttribute("raw",src.substr(0,endpos));
					panel.setAttribute("blockquote",blockquote?"true":"false");
					panel.setAttribute("rendered","false");
					w.nextMatch += endpos+3;
					if (w.source.substr(w.nextMatch,1)=="\n") w.nextMatch++;
				}
			}
		}
	}
)

function findMatchingDelimiter(src,starttext,endtext) {
	var startpos = 0;
	var endpos = src.indexOf(endtext);
	// check for nested delimiters
	while (src.substring(startpos,endpos-1).indexOf(starttext)!=-1) {
		// count number of nested 'starts'
		var startcount=0;
		var temp = src.substring(startpos,endpos-1);
		var pos=temp.indexOf(starttext);
		while (pos!=-1)  { startcount++; pos=temp.indexOf(starttext,pos+starttext.length); }
		// set up to check for additional 'starts' after adjusting endpos
		startpos=endpos+endtext.length;
		// find endpos for corresponding number of matching 'ends'
		while (startcount && endpos!=-1) {
			endpos = src.indexOf(endtext,endpos+endtext.length);
			startcount--;
		}
	}
	return (endpos==-1)?src.length:endpos;
}
//}}}
//{{{
window.onClickNestedSlider=function(e)
{
	if (!e) var e = window.event;
	var theTarget = resolveTarget(e);
	while (theTarget && theTarget.sliderPanel==undefined) theTarget=theTarget.parentNode;
	if (!theTarget) return false;
	var theSlider = theTarget.sliderPanel;
	var isOpen = theSlider.style.display!="none";

	// toggle label
	theTarget.innerHTML=isOpen?theTarget.getAttribute("closedText"):theTarget.getAttribute("openedText");
	// toggle tooltip
	theTarget.setAttribute("title",isOpen?theTarget.getAttribute("closedTip"):theTarget.getAttribute("openedTip"));

	// deferred rendering (if needed)
	if (theSlider.getAttribute("rendered")=="false") {
		var place=theSlider;
		if (theSlider.getAttribute("blockquote")=="true")
			place=createTiddlyElement(place,"blockquote");
		wikify(theSlider.getAttribute("raw"),place);
		theSlider.setAttribute("rendered","true");
	}
	// show/hide the slider
	if(config.options.chkAnimate && (!hasClass(theSlider,'floatingPanel') || config.options.chkFloatingSlidersAnimate))
		anim.startAnimating(new Slider(theSlider,!isOpen,e.shiftKey || e.altKey,"none"));
	else
		theSlider.style.display = isOpen ? "none" : "block";
	// reset to default width (might have been changed via plugin code)
	theSlider.style.width=theSlider.defaultPanelWidth;
	// align floater panel position with target button
	if (!isOpen && window.adjustSliderPos) window.adjustSliderPos(theSlider.parentNode,theTarget,theSlider);
	// if showing panel, set focus to first 'focus-able' element in panel
	if (theSlider.style.display!="none") {
		var ctrls=theSlider.getElementsByTagName("*");
		for (var c=0; c<ctrls.length; c++) {
			var t=ctrls[c].tagName.toLowerCase();
			if ((t=="input" && ctrls[c].type!="hidden") || t=="textarea" || t=="select")
				{ ctrls[c].focus(); break; }
		}
	}
	var cookie=theTarget.sliderCookie;
	if (cookie && cookie.length) {
		config.options[cookie]=!isOpen;
		if (config.options[cookie]!=theTarget.defOpen) window.saveOptionCookie(cookie);
		else window.removeOptionCookie(cookie); // remove cookie if slider is in default display state
	}

	// prevent SHIFT-CLICK from being processed by browser (opens blank window... yuck!)
	// prevent clicks *within* a slider button from being processed by browser
	// but allow plain click to bubble up to page background (to close transients, if any)
	if (e.shiftKey || theTarget!=resolveTarget(e))
		{ e.cancelBubble=true; if (e.stopPropagation) e.stopPropagation(); }
	Popup.remove(); // close open popup (if any)
	return false;
}
//}}}
//{{{
// click in document background closes transient panels 
document.nestedSliders_savedOnClick=document.onclick;
document.onclick=function(ev) { if (!ev) var ev=window.event; var target=resolveTarget(ev);

	if (document.nestedSliders_savedOnClick)
		var retval=document.nestedSliders_savedOnClick.apply(this,arguments);
	// if click was inside a popup... leave transient panels alone
	var p=target; while (p) if (hasClass(p,"popup")) break; else p=p.parentNode;
	if (p) return retval;
	// if click was inside transient panel (or something contained by a transient panel), leave it alone
	var p=target; while (p) {
		if ((hasClass(p,"floatingPanel")||hasClass(p,"sliderPanel"))&&p.getAttribute("transient")=="true") break;
		p=p.parentNode;
	}
	if (p) return retval;
	// otherwise, find and close all transient panels...
	var all=document.all?document.all:document.getElementsByTagName("DIV");
	for (var i=0; i<all.length; i++) {
		 // if it is not a transient panel, or the click was on the button that opened this panel, don't close it.
		if (all[i].getAttribute("transient")!="true" || all[i].button==target) continue;
		// otherwise, if the panel is currently visible, close it by clicking it's button
		if (all[i].style.display!="none") window.onClickNestedSlider({target:all[i].button}) 
	}
	return retval;
};
//}}}
//{{{
// adjust floating panel position based on button position
if (window.adjustSliderPos==undefined) window.adjustSliderPos=function(place,btn,panel) {
	if (hasClass(panel,"floatingPanel")) {
		var rightEdge=document.body.offsetWidth-1;
		var panelWidth=panel.offsetWidth;
		var left=0;
		var top=btn.offsetHeight; 
		if (place.style.position=="relative" && findPosX(btn)+panelWidth>rightEdge) {
			left-=findPosX(btn)+panelWidth-rightEdge; // shift panel relative to button
			if (findPosX(btn)+left<0) left=-findPosX(btn); // stay within left edge
		}
		if (place.style.position!="relative") {
			var left=findPosX(btn);
			var top=findPosY(btn)+btn.offsetHeight;
			var p=place; while (p && !hasClass(p,'floatingPanel')) p=p.parentNode;
			if (p) { left-=findPosX(p); top-=findPosY(p); }
			if (left+panelWidth>rightEdge) left=rightEdge-panelWidth;
			if (left<0) left=0;
		}
		panel.style.left=left+"px"; panel.style.top=top+"px";
	}
}
//}}}
//{{{
// TW2.1 and earlier:
// hijack Slider stop handler so overflow is visible after animation has completed
Slider.prototype.coreStop = Slider.prototype.stop;
Slider.prototype.stop = function()
	{ this.coreStop.apply(this,arguments); this.element.style.overflow = "visible"; }

// TW2.2+
// hijack Morpher stop handler so sliderPanel/floatingPanel overflow is visible after animation has completed
if (version.major+.1*version.minor+.01*version.revision>=2.2) {
	Morpher.prototype.coreStop = Morpher.prototype.stop;
	Morpher.prototype.stop = function() {
		this.coreStop.apply(this,arguments);
		var e=this.element;
		if (hasClass(e,"sliderPanel")||hasClass(e,"floatingPanel")) {
			// adjust panel overflow and position after animation
			e.style.overflow = "visible";
			if (window.adjustSliderPos) window.adjustSliderPos(e.parentNode,e.button,e);
		}
	};
}
//}}}
[img[chesslogo.jpg][http://chess.eecs.berkeley.edu]][img[callogo.jpg][http://www.berkeley.edu]][img[culogo.jpg][http://www.columbia.edu]]
Last Updated: 
Monday, 2 February, 2009.
Environment variable set to the directory of the PRET simulator.
<!--{{{-->
<div id='header' class='header'>
<div id='contentHeader' refresh='content' tiddler='contentHeader' ></div>
<div class='headerShadow' style="width: 100%">
<span class='searchBar' macro='search'></span>&nbsp;
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu'>
<span refresh='content' tiddler='MainMenu'></span>

</div>
<div id='sidebar'>
<div id='sidebarMenu' refresh='content' tiddler='LeftBarMenu'></div>
<span id='noticeBoard' refresh='content' tiddler='NoticeBoard'></span>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlersBar' refresh='none' ondblclick='config.macros.tiddlersBar.onTiddlersBarAction(event)'></div>
<div id='tiddlerDisplay'></div>
</div>
<div id='contentFooter' refresh='content' tiddler='contentFooter'></div>
<!--}}}-->
! Faculty
<<person FDE "Edward A. Lee" http://www.eecs.berkeley.edu/~eal>>
<<FDE>>
Edward A. Lee is the Robert S. Pepper Distinguished Professor and former chair of the Electrical Engineering and Computer Sciences (EECS) department at U.C. Berkeley. His research interests center on design, modeling, and simulation of embedded, real-time computational systems. He is a director of Chess, the Berkeley Center for Hybrid and Embedded Software Systems, and is the director of the Berkeley Ptolemy project. He is co-author of five books and numerous papers. He has led the development of several influential open-source software packages, including Ptolemy, Ptolemy II, """HyVisual""", and """VisualSense""". His bachelors degree (B.S.) is from Yale University (1979), his masters (S.M.) from MIT (1981), and his Ph.D. from U. C. Berkeley (1986). From 1979 to 1982 he was a member of technical staff at Bell Telephone Laboratories in Holmdel, New Jersey, in the Advanced Data Communications Laboratory. He is a co-founder of BDTI, Inc., where he is currently a Senior Technical Advisor, and has consulted for a number of other companies. He is a Fellow of the IEEE, was an NSF Presidential Young Investigator, and won the 1997 Frederick Emmons Terman Award for Engineering Education. 
<<person FDE "Stephen A. Edwards" http://www1.cs.columbia.edu/~sedwards/>>
<<FDE>>
 Stephen A. Edwards is a tenured associate professor in the Computer Science Department of Columbia University. He obtained his Ph.D from the University of California, Berkeley in 1997, his MS from Berkeley in 1994, and his BS from the California Institute of Technology in 1992, all in Electrical Engineering. Before pursuing his academic career in 2001, he worked for two Electronic Design Automation (EDA) companies, Simplex Solutions, now part of Cadence, and Synopsys.

Professor Edwards and his group explore automating the creation of software for embedded systems: application-specific computers hiding in a growing number of industrial and consumer systems. They have developed numerous compilation techniques for the Esterel synchronous language for real-time control and are also developing domain-specific languages for device drivers and communication protocols. 
! Postdoctoral Researcher
<<person FDE "Hiren D. Patel" http://www.eecs.berkeley.edu/~hiren>>
<<FDE>>
! Graduate Students
<<person FDE "Isaac Liu" http://www.eecs.berkeley.edu/~liuisaac>>
<<FDE>>
<<person FDE "Ben Lickly" http://www.eecs.berkeley.edu/~blickly>>
<<FDE>>
<<person FDE "Sungjun Kim" http://www.cs.columbia.edu/mice/persons/showPerson.php?personID=16150&base=%2Fmice%2Fpersons%2F&>>
<<FDE>>
<<person FDE "Shanna-Shaye Forbes" http://www.eecs.berkeley.edu/~sssf>>
<<FDE>>
/***
|Name|PersonPlugin|
|Created by|[[Frank Dellaert|http://www.cc.gatech.edu/~dellaert]]|
|Location|http://www.cc.gatech.edu/~dellaert/#PersonPlugin|
|Version|1.0|
!!!Description
A TiddlyWikiMacro to create aliases (similar to AliasPlugin) that refer to people. The macro takes the following (mandatory) arguments:
* macro name, e.g. "FDE"
* person name, e.g. "Frank Dellaert"
* url: a url to a web-page
A second macro, "personLookup" supports reverse lookup, which is used in the BibTexPlugin.
!!Example
{{{<<person FDE "Frank Dellaert" http://www.cc.gatech.edu/~dellaert>>}}}<<person FDE "Frank Dellaert" http://www.cc.gatech.edu/~dellaert>>
{{{<<FDE>>}}}
<<FDE>>

An example of lookup by name:
{{{<<personLookup "Frank Dellaert">>}}}
<<personLookup "Frank Dellaert">>

If the person is not defined, we just render the name:
{{{<<personLookup "Foo Bar">>}}}
<<personLookup "Foo Bar">>
!!!Installation
Import (or copy/paste) this tiddler into your document: and tag it with "systemConfig"
!!!Code
***/
//{{{
config.macros.person= { };

// create alias as in AliasPlugin
config.macros.person.helper = function(alias,name,url) {
  // create new macro (as needed) 
  if (config.macros[alias]==undefined) {
    config.macros[alias] = { };
    config.macros[alias].handler = function (place,macroName,params) {
      record = config.macros[macroName];
      if (record.url) {
        wikify("[["+record.name+"|"+record.url+"]]", place)
      } else {
        wikify(record.name, place)
      }
    }
  }
  // fill record
  config.macros[alias].name = name;
  config.macros[alias].url = url;
  // reverse name lookup
  config.macros.person[name.replace(/ /g,"_")]=alias;
}

// parse arguments to macro and call helper
config.macros.person.handler = function(place,macroName,params) {
  var alias=params.shift(); if (!alias) return;
  // don't allow spaces in alias
  alias=alias.replace(/ /g,"_");
  config.macros.person.helper(alias,params[0],params[1]);
}

// reverse lookup
config.macros.personLookup={};
config.macros.personLookup.handler = function(place,macroName,params) {
  var name = params.shift();
  if (!name) return;
  var alias = config.macros.person[name.replace(/ /g,"_")];
  var macro = config.macros[alias]
  if (macro) {macro.handler(place,alias,params)} else {wikify(name,place)}
}
//}}}
Edward A. Lee, [[The Case for Precision Timed (PRET) Machines|http://chess.eecs.berkeley.edu/pubs/203.html]], November, 2006.

Stephen A. Edwards and Edward A. Lee, [[The Case for Precision Timed (PRET) Machines|http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-149.html]], EECS Department
University of California, Berkeley Technical Report No. """UCB/EECS-2006-149""", November 17, 2006

Ben Lickly and Isaac Liu and Sungjun Kim and Hiren D. Patel and Stephen A. Edwards and Edward A. Lee, [[Predictable Programming on a Precision Timed Architecture|{http://chess.eecs.berkeley.edu/pubs/475.html]], in proceedings of International Conference on Compilers, Architecture, and Synthesis from Embedded Systems (CASES), October, 2008. 

Hiren D. Patel and Ben Lickly and Bas Burgers and Edward A. Lee, [[A Timing Requirements-Aware Scratchpad Memory Allocation Scheme for a Precision Timed Architecture|http://www.eecs.berkeley.edu/Pubs/TechRpts/2008/EECS-2008-115.html]], EECS Department University of California, Berkeley Technical Report No. """UCB/EECS-2008-115""", September 12, 2008.

"""Shanna-Shaye Forbes""" and Hugo A. Andrade and Hiren D. Patel and Edward A. Lee, [[An Automated Mapping of Timed Functional Specification to A Precision Timed Architecture|http://chess.eecs.berkeley.edu/pubs/482.html]], in proceedings of the 12-th IEEE International Symposium on Distributed Simulation and Real Time Applications, October, 2008. 

In "$PRET_ISS/tests", we provide a series of regression tests. 
* Note: The [[toolchain|Toolchain]] must be installed before running the regression tests.
!Running Regression Tests
* Make sure the compilation is complete, and enter "$PRET_ISS" directory.
{{{
$ cd $PRET_ISS
}}}
* Source a file (bash shell) located in "$PRET_ISS/tests/exports.sh".
{{{
$ source tests/exports.sh
}}}
* Execute the regression target.
{{{
$ make regression
}}}
/%
|Name|ReplaceDoubleClick|
|Source|http://www.TiddlyTools.com/#ReplaceDoubleClick|
|Version|2.0.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|script|
|Requires|InlineJavascriptPlugin|
|Overrides|tiddler background click and doubleclick handlers|
|Description|disable doubleclick-to-edit-tiddler or replace doubleclick with shift/ctrl/alt+singleclick|

Usage:
	in tiddler content:
		<<tiddler ReplaceDoubleClick>> or
		<<tiddler ReplaceDoubleClick with: key trigger>>
	in ViewTemplate:
		<span macro="tiddler ReplaceDoubleClick"></span> or
		<span macro="tiddler ReplaceDoubleClick with: key trigger"></span>
where: 
	'key' (optional) is one of: none (default), ctrl, shift, or alt
	'trigger' (optional) is one of: click, doubleclick (default)

* if no key parameter (or "none") is specified, then the double-click action is **disabled** for that tiddler.
* if a key (other than none) is specified, the doubleclick action for the tiddler will only be invoked
	when the key+trigger combination is used.
* note: double-clicking will also trigger the single-click handler.  As a result, when 'click' option is specified,
	either click OR double-click (plus the specified key) will trigger the action.

Revisions:
2.0.0 renamed from ShiftClickToEdit and merged with DoubleClickDisable and added support specifying alternative key+click combination

%/<script>
	var here=story.findContainingTiddler(place); if (!here) return;
	if (here.ondblclick) {
		here.setAttribute("editKey","none");
		if ("$1"=="shift" || "$1"=="ctrl" || "$1"=="alt")
			here.setAttribute("editKey","$1"+"Key");
		var trigger=("$2"=="click")?"onclick":"ondblclick";
		here.save_dblclick=here.ondblclick;
		here.ondblclick=null;
		if (here.getAttribute("editKey")!="none")
			here[trigger]=function(e) {
				var ev=e?e:window.event;
				if (ev[this.getAttribute("editKey")])
					this.save_dblclick.apply(this,arguments);
			}
	}
</script>
! Supported Platforms
The PRET simulator has been tested on [[Cygwin|http://www.cygwin.com/]] (1.5.25-15), Linux, and Mac OSX (10.4). 
! Build Tools
# [[Autoconf 2.59|http://www.gnu.org/software/autoconf/]] or higher
# [[Automake 1.9.6|http://www.gnu.org/software/automake/]] or higher
# [[Python 2.4.3|http://www.python.org/]] or higher
# [[Perl 5.8.8|http://www.perl.org/]] or higher  
! SPARC Toolchain
<<tiddler Toolchain>>
! Optional
We provide C++ and SystemC versions of the PRET simulator.  This enables the simulator to incorporate third-party hardware components defined using SystemC.
# [[SystemC 2.2.0|http://systemc.org]]
The pret executable is compiled in $PRET_ISS/src/. [[Usage]] describes how to execute the simulator. In order to compile these examples, the [[toolchain|Toolchain]] must be installed.

We provide four examples. The steps needed to run them are described in the links below:
# [[smile]] : This example draws a smiley face.  It demonstrates the use of timing instructions. The face is separated into segments, and the printing of these segments is distributed across multiple hardware threads. The timing instructions are used to output the face segments at the correct times to get the correct output.
# [[sync_example_cases]]: This example shows how mutual exclusion can be performed by the sole use of timing instructions. Three hardware threads are used. The first is a producer that writes values to a shared memory location, and the second is a consumer that receives these values and stores it in an array.  The third thread is an observer and prints out the value seen in the shared resource. 
# [[graphic]]: This example implements the graphic rendering components for a video game. There is a game control thread, that hard codes the moves a game player makes. The control thread sends messages to a graphic thread that generates pixel framebuffers, and sends them to the VGA driver thread. The VGA driver thread writes to the VGA port.
# [[janne]]: This is a test taken from the [[Malardalen WCET|http://www.mrtc.mdh.se/projects/wcet/benchmarks.html]] benchmarks.
/***
|Name|SearchOptionsPlugin|
|Source|http://www.TiddlyTools.com/#SearchOptionsPlugin|
|Documentation|http://www.TiddlyTools.com/#SearchOptionsPluginInfo|
|Version|3.0.3|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.search, TiddlyWiki.prototype.search, config.macros.search.onKeyPress|
|Options|##Configuration|
|Description|extend core search function with additional user-configurable options|
Adds extra options to core search function including selecting which data items to search, enabling/disabling incremental key-by-key searches, and generating a ''list of matching tiddlers'' instead of immediately displaying all matches.  This plugin also adds syntax for rendering 'search links' within tiddler content to embed one-click searches using pre-defined 'hard-coded' search terms.
!!!!!Documentation
>see [[SearchOptionsPluginInfo]]
!!!!!Configuration
<<<
Search in:
<<option chkSearchTitles>> titles <<option chkSearchText>> text <<option chkSearchTags>> tags <<option chkSearchFields>> fields <<option chkSearchShadows>> shadows
<<option chkSearchHighlight>> Highlight matching text in displayed tiddlers
<<option chkSearchList>> Show list of matches
<<option chkSearchListTiddler>> Write list to [[SearchResults]] tiddler
<<option chkSearchTitlesFirst>> Show title matches first
<<option chkSearchByDate>> Sort matching tiddlers by modification date (most recent first)
<<option chkIncrementalSearch>> Incremental key-by-key search: {{twochar{<<option txtIncrementalSearchMin>>}}} or more characters,  {{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay
<<option chkSearchExcludeTags>> Exclude tiddlers tagged with:
{{editor{<<option txtSearchExcludeTags>>}}}
<<<
!!!!!Revisions
<<<
2009.01.09 [3.0.3] added chkSearchHighlight to optionally disable highlighting of matched text
|please see [[SearchOptionsPluginInfo]] for additional revision details|
2005.10.18 [1.0.0] Initial Release
<<<
!!!!!Code
***/
//{{{
version.extensions.SearchOptionsPlugin= {major: 3, minor: 0, revision: 3, date: new Date(2009,1,9)};

var co=config.options; // abbrev
if (co.chkSearchTitles===undefined) co.chkSearchTitles=true;
if (co.chkSearchText===undefined) co.chkSearchText=true;
if (co.chkSearchTags===undefined) co.chkSearchTags=true;
if (co.chkSearchFields===undefined) co.chkSearchFields=true;
if (co.chkSearchTitlesFirst===undefined) co.chkSearchTitlesFirst=true;
if (co.chkSearchList===undefined) co.chkSearchList=true;
if (co.chkSearchHighlight===undefined) co.chkSearchHighlight=true;
if (co.chkSearchListTiddler===undefined) co.chkSearchListTiddler=false;
if (co.chkSearchByDate===undefined) co.chkSearchByDate=false;
if (co.chkIncrementalSearch===undefined) co.chkIncrementalSearch=true;
if (co.chkSearchShadows===undefined) co.chkSearchShadows=true;
if (co.txtIncrementalSearchDelay===undefined) co.txtIncrementalSearchDelay=500;
if (co.txtIncrementalSearchMin===undefined) co.txtIncrementalSearchMin=3;
if (co.chkSearchExcludeTags===undefined) co.chkSearchExcludeTags=true;
if (co.txtSearchExcludeTags===undefined) co.txtSearchExcludeTags="excludeSearch";
if (config.macros.search.reportTitle==undefined)
	config.macros.search.reportTitle="SearchResults"; // note: not a cookie!
config.macros.search.label+="\xa0"; // a little bit of space just because it looks better
//}}}
// // searchLink: {{{[search[text to find]] OR [search[text to display|text to find]]}}}
//{{{
config.formatters.push( {
	name: "searchLink",
	match: "\\[search\\[",
	lookaheadRegExp: /\[search\[(.*?)(?:\|(.*?))?\]\]/mg,
	prompt: "search for: '%0'",
	handler: function(w)
	{
		this.lookaheadRegExp.lastIndex = w.matchStart;
		var lookaheadMatch = this.lookaheadRegExp.exec(w.source);
		if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
			var label=lookaheadMatch[1];
			var text=lookaheadMatch[2]||label;
			var prompt=this.prompt.format([text]);
			var btn=createTiddlyButton(w.output,label,prompt,
				function(){story.search(this.getAttribute("searchText"))},"searchLink");
			btn.setAttribute("searchText",text);
			w.nextMatch = this.lookaheadRegExp.lastIndex;
		}
	}
});
//}}}
// // incremental search uses option settings instead of hard-coded delay and minimum input values
//{{{
var fn=config.macros.search.onKeyPress;
fn=fn.toString().replace(/500/g, "config.options.txtIncrementalSearchDelay||500");
fn=fn.toString().replace(/> 2/g, ">=(config.options.txtIncrementalSearchMin||3)");
eval("config.macros.search.onKeyPress="+fn);
//}}}
// // REPLACE story.search() for option to "show search results in a list"
//{{{
Story.prototype.search = function(text,useCaseSensitive,useRegExp)
{
	var co=config.options; // abbrev
	var re=new RegExp(useRegExp ? text : text.escapeRegExp(),useCaseSensitive ? "mg" : "img");
	if (config.options.chkSearchHighlight) highlightHack=re;
	var matches = store.search(re,co.chkSearchByDate?"modified":"title","");
	if (co.chkSearchByDate) matches=matches.reverse(); // most recent first
	var q = useRegExp ? "/" : "'";
	clearMessage();
	if (!matches.length) {
		if (co.chkSearchListTiddler) discardSearchResults();
		displayMessage(config.macros.search.failureMsg.format([q+text+q]));
	} else {
		if (co.chkSearchList||co.chkSearchListTiddler) 
			reportSearchResults(text,matches);
		else {
			var titles = []; for(var t=0; t<matches.length; t++) titles.push(matches[t].title);
			this.closeAllTiddlers(); story.displayTiddlers(null,titles);
			displayMessage(config.macros.search.successMsg.format([matches.length, q+text+q]));
		}
	}
	highlightHack = null;
}
//}}}
// // REPLACE store.search() for enhanced searching/sorting options
//{{{
TiddlyWiki.prototype.search = function(searchRegExp,sortField,excludeTag)
{
	var co=config.options; // abbrev
	var tids = this.reverseLookup("tags",excludeTag,false,sortField);

	// eliminate tiddlers tagged with excluded tags
	if (co.chkSearchExcludeTags&&co.txtSearchExcludeTags.length) {
		var ex=co.txtSearchExcludeTags.readBracketedList();
		var temp=[]; for(var t=tids.length-1; t>=0; t--)
			if (!tids[t].tags.containsAny(ex)) temp.push(tids[t]);
		tids=temp;
	}

	// scan for matching titles first...
	var results = [];
	if (co.chkSearchTitles) {
		for(var t=0; t<tids.length; t++)
			if(tids[t].title.search(searchRegExp)!=-1)
				results.push(tids[t]);
		if (co.chkSearchShadows)
			for (var t in config.shadowTiddlers)
				if ((t.search(searchRegExp)!=-1) && !store.tiddlerExists(t))
					results.push((new Tiddler()).assign(t,config.shadowTiddlers[t]));
	}
	// then scan for matching text, tags, or field data
	for(var t=0; t<tids.length; t++) {
		if (co.chkSearchText && tids[t].text.search(searchRegExp)!=-1)
			results.pushUnique(tids[t]);
		if (co.chkSearchTags && tids[t].tags.join(" ").search(searchRegExp)!=-1)
			results.pushUnique(tids[t]);
		if (co.chkSearchFields && store.forEachField!=undefined)
			store.forEachField(tids[t],
				function(tid,field,val) {
					if (val.search(searchRegExp)!=-1) results.pushUnique(tids[t]);
				},
				true); // extended fields only
	}
	// then check for matching text in shadows
	if (co.chkSearchShadows)
		for (var t in config.shadowTiddlers)
			if ((config.shadowTiddlers[t].search(searchRegExp)!=-1) && !store.tiddlerExists(t))
				results.pushUnique((new Tiddler()).assign(t,config.shadowTiddlers[t]));

	// if not 'titles first', or sorting by modification date,
	// re-sort results to so titles, text, tag and field matches are mixed together
	if(!sortField) sortField = "title";
	var bySortField=function (a,b) {if(a[sortField] == b[sortField]) return(0); else return (a[sortField] < b[sortField]) ? -1 : +1; }
	if (!co.chkSearchTitlesFirst || co.chkSearchByDate) results.sort(bySortField);

	return results;
}
//}}}
// // HIJACK core {{{<<search>>}}} macro to add "report" and "simple inline" output
//{{{
config.macros.search.SOP_handler=config.macros.search.handler;
config.macros.search.handler = function(place,macroName,params)
{
	// if "report", use SearchOptionsPlugin report generator for inline output
	if (params[1]&&params[1].substr(0,6)=="report") {
		var keyword=params[0];
		var options=params[1].split("=")[1]; // split "report=option+option+..."
		var heading=params[2]?params[2].unescapeLineBreaks():"";
		var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
		if (matches.length) wikify(heading+window.formatSearchResults(keyword,matches,options),place);
	} else if (params[1]) {
		var keyword=params[0];
		var heading=params[1]?params[1].unescapeLineBreaks():"";
		var seperator=params[2]?params[2].unescapeLineBreaks():", ";
		var matches=store.search(new RegExp(keyword.escapeRegExp(),"img"),"title","excludeSearch");
		if (matches.length) {
			var out=[];
			for (var m=0; m<matches.length; m++) out.push("[["+matches[m].title+"]]");
			wikify(heading+out.join(seperator),place);
		}
	} else
		config.macros.search.SOP_handler.apply(this,arguments);
};
//}}}
// // SearchResults panel handling
//{{{
setStylesheet(".searchResults { padding:1em 1em 0 1em; }","searchResults"); // matches std tiddler padding

config.macros.search.createPanel=function(text,matches,body) {

	function getByClass(e,c) { var d=e.getElementsByTagName("div");
		for (var i=0;i<d.length;i++) if (hasClass(d[i],c)) return d[i]; }
	var panel=createTiddlyElement(null,"div","searchPanel","searchPanel");
	this.renderPanel(panel,text,matches,body);
	var oldpanel=document.getElementById("searchPanel");
	if (!oldpanel) { // insert new panel just above tiddlers
		var da=document.getElementById("displayArea");
		da.insertBefore(panel,da.firstChild);
	} else { // if panel exists
		var oldwrap=getByClass(oldpanel,"searchResults");
		var newwrap=getByClass(panel,"searchResults");
		// if no prior content, just insert new content
		if (!oldwrap) oldpanel.insertBefore(newwrap,null);
		else {	// swap search results content but leave containing panel intact
			oldwrap.style.display='block'; // unfold wrapper if needed
			var i=oldwrap.getElementsByTagName("input")[0]; // get input field
			if (i) { var pos=this.getCursorPos(i); i.onblur=null; } // get cursor pos, ignore blur
			oldpanel.replaceChild(newwrap,oldwrap);
			panel=oldpanel; // use existing panel
		} 
	}
	this.showPanel(true,pos);
	return panel;
}

config.macros.search.renderPanel=function(panel,text,matches,body) {

	var wrap=createTiddlyElement(panel,"div",null,"searchResults");
	wrap.onmouseover = function(e){ addClass(this,"selected"); }
	wrap.onmouseout = function(e){ removeClass(this,"selected"); }
	// create toolbar: "open all", "fold/unfold", "close"
	var tb=createTiddlyElement(wrap,"div",null,"toolbar");
	var b=createTiddlyButton(tb, "open all", "open all matching tiddlers", function() {
		story.displayTiddlers(null,this.getAttribute("list").readBracketedList()); return false; },"button");
	var list=""; for(var t=0;t<matches.length;t++) list+='[['+matches[t].title+']] ';
	b.setAttribute("list",list);
	var b=createTiddlyButton(tb, "fold", "toggle display of search results", function() {
		config.macros.search.foldPanel(this); return false; },"button");
	var b=createTiddlyButton(tb, "close", "dismiss search results",	function() {
		config.macros.search.showPanel(false); return false; },"button");
	createTiddlyText(createTiddlyElement(wrap,"div",null,"title"),"Search for: "+text); // title
	wikify(body,createTiddlyElement(wrap,"div",null,"viewer")); // report
	return panel;
}

config.macros.search.showPanel=function(show,pos) {
	var panel=document.getElementById("searchPanel");
	var i=panel.getElementsByTagName("input")[0];
	i.onfocus=show?function(){config.macros.search.stayFocused(true);}:null;
	i.onblur=show?function(){config.macros.search.stayFocused(false);}:null;
	if (show && panel.style.display=="block") { // if shown, grab focus, restore cursor
		if (i&&this.stayFocused()) { i.focus(); this.setCursorPos(i,pos); }
		return;
	}
	if(!config.options.chkAnimate) {
		panel.style.display=show?"block":"none";
		if (!show) { removeChildren(panel); config.macros.search.stayFocused(false); }
	} else {
		var s=new Slider(panel,show,false,show?"none":"children");
		s.callback=function(e,p){e.style.overflow="visible";}
		anim.startAnimating(s);
	}
	return panel;
}

config.macros.search.foldPanel=function(button) {
	var d=document.getElementById("searchPanel").getElementsByTagName("div");
	for (var i=0;i<d.length;i++) if (hasClass(d[i],"viewer")) var v=d[i]; if (!v) return;
	var show=v.style.display=="none";
	if(!config.options.chkAnimate)
		v.style.display=show?"block":"none";
	else {
		var s=new Slider(v,show,false,"none");
		s.callback=function(e,p){e.style.overflow="visible";}
		anim.startAnimating(s);
	}
	button.innerHTML=show?"fold":"unfold";
	return false;
}

config.macros.search.stayFocused=function(keep) { // TRUE/FALSE=set value, no args=get value
	if (keep===undefined) return this.keepReportInFocus;
	this.keepReportInFocus=keep;
	return keep
}	

config.macros.search.getCursorPos=function(i) {
	var s=0; var e=0; if (!i) return { start:s, end:e };
	try {
		if (i.setSelectionRange) // FF
			{ s=i.selectionStart; e=i.selectionEnd; }
		if (document.selection && document.selection.createRange) { // IE
			var r=document.selection.createRange().duplicate();
			var len=r.text.length; s=0-r.moveStart('character',-100000); e=s+len;
		}
	}catch(e){};
	return { start:s, end:e };
}
config.macros.search.setCursorPos=function(i,pos) {
	if (!i||!pos) return; var s=pos.start; var e=pos.end;
	if (i.setSelectionRange) //FF
		i.setSelectionRange(s,e);
	if (i.createTextRange) // IE
		{ var r=i.createTextRange(); r.collapse(true); r.moveStart("character",s); r.select(); }
}
//}}}
// // SearchResults report generation
// note: these functions are defined globally, so they can be more easily redefined to customize report formats//
//{{{
if (!window.reportSearchResults) window.reportSearchResults=function(text,matches)
{
	var cms=config.macros.search; // abbrev
	var body=window.formatSearchResults(text,matches);
	if (!config.options.chkSearchListTiddler) // show #searchResults panel
		window.scrollTo(0,ensureVisible(cms.createPanel(text,matches,body)));
	else { // write [[SearchResults]] tiddler
		var title=cms.reportTitle;
		var who=config.options.txtUserName;
		var when=new Date();
		var tags="excludeLists excludeSearch temporary";
		var tid=store.getTiddler(title); if (!tid) tid=new Tiddler();
		tid.set(title,body,who,when,tags);
		store.addTiddler(tid);
		// story.closeTiddler(title);
		story.displayTiddler(null,title);
	}
}

if (!window.formatSearchResults) window.formatSearchResults=function(text,matches,opt)
{
	var body='';
	var title=config.macros.search.reportTitle
	var q = config.options.chkRegExpSearch ? "/" : "'";
	if (!opt) var opt="all";
	var parts=opt.split("+");
	for (var i=0; i<parts.length; i++) { var p=parts[i].toLowerCase();
		if (p=="again"||p=="all")   body+=window.formatSearchResults_again(text,matches);
		if (p=="summary"||p=="all") body+=window.formatSearchResults_summary(text,matches);
		if (p=="list"||p=="all")    body+=window.formatSearchResults_list(text,matches);
		if (p=="buttons"||p=="all") body+=window.formatSearchResults_buttons(text,matches);
	}
	return body;
}

if (!window.formatSearchResults_again) window.formatSearchResults_again=function(text,matches)
{
	var title=config.macros.search.reportTitle
	var body='';
	// search again
	body+='{{span{<<search "'+text.replace(/"/g,'&#x22;')+'">> /%\n';
	body+='%/<html><input type="button" value="search again"';
	body+=' onclick="var t=this.parentNode.parentNode.getElementsByTagName(\'input\')[0];';
	body+=' config.macros.search.doSearch(t); return false;">';
	body+=' <a href="javascript:;" onclick="';
	body+=' var e=this.parentNode.nextSibling;';
	body+=' var show=e.style.display!=\'block\';';
	body+=' if(!config.options.chkAnimate) e.style.display=show?\'block\':\'none\';';
	body+=' else anim.startAnimating(new Slider(e,show,false,\'none\'));';
	body+=' return false;">options...</a>';
	body+='</html>@@display:none;border-left:1px dotted;margin-left:1em;padding:0;padding-left:.5em;font-size:90%;/%\n';
	body+='	%/<<option chkSearchTitles>>titles /%\n';
	body+='	%/<<option chkSearchText>>text /%\n';
	body+='	%/<<option chkSearchTags>>tags /%\n';
	body+='	%/<<option chkSearchFields>>fields /%\n';
	body+='	<<option chkCaseSensitiveSearch>>case-sensitive /%\n';
	body+='	%/<<option chkRegExpSearch>>text patterns /%\n';
	body+='	%/<<option chkSearchByDate>>sorted by date\n';
	body+='	<<option chkSearchHighlight>> highlight matching text in displayed tiddlers\n';
	body+='	<<option chkIncrementalSearch>>incremental key-by-key search: /%\n';
	body+='	%/{{twochar{<<option txtIncrementalSearchMin>>}}} or more characters, /%\n';
	body+='	%/{{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay\n';
	body+='@@}}}\n\n';
	return body;
}

if (!window.formatSearchResults_summary) window.formatSearchResults_summary=function(text,matches)
{
	// summary: nn tiddlers found matching '...', options used
	var body='';
	var co=config.options; // abbrev
	var title=config.macros.search.reportTitle
	var q = co.chkRegExpSearch ? "/" : "'";
	body+="''"+config.macros.search.successMsg.format([matches.length,q+"{{{"+text+"}}}"+q])+"''\n";
	var opts=[];
	if (co.chkSearchTitles) opts.push("titles");
	if (co.chkSearchText) opts.push("text");
	if (co.chkSearchTags) opts.push("tags");
	if (co.chkSearchFields) opts.push("fields");
	if (co.chkSearchShadows) opts.push("shadows");
	body+="~~&nbsp; searched in "+opts.join(" + ")+"~~\n";
	body+=(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"^^&nbsp; using ":"")
		+(co.chkCaseSensitiveSearch?"case-sensitive ":"")
		+(co.chkRegExpSearch?"pattern ":"")
		+(co.chkCaseSensitiveSearch||co.chkRegExpSearch?"matching^^\n":"");
	return body;
}

if (!window.formatSearchResults_list) window.formatSearchResults_list=function(text,matches)
{
	// bullet list of links to matching tiddlers
	var body='';
	var pattern=co.chkRegExpSearch?text:text.escapeRegExp();
	var sensitive=co.chkCaseSensitiveSearch?"mg":"img";
	var link='{{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="'
		+'if(config.options.chkSearchHighlight)'
		+'	highlightHack=new RegExp(\x27'+pattern+'\x27,\x27'+sensitive+'\x27);'
		+'story.displayTiddler(null,\x27%0\x27);'
		+'highlightHack = null; return false;'
		+'" title="%1">%0</a></html>}}}';
	for(var t=0;t<matches.length;t++) {
		var date=config.options.chkSearchByDate?(matches[t].modified.formatString('YYYY.0MM.0DD 0hh:0mm')+" "):"";
		var tid=store.getTiddler(matches[t].title); if (tid) var tip=tid.getSubtitle();
		body+="* "+date+link.format([matches[t].title,tip||''])+'\n';
	}
	return body;
}

if (!window.formatSearchResults_buttons) window.formatSearchResults_buttons=function(text,matches)
{
	// embed buttons only if writing SearchResults to tiddler
	if (!config.options.chkSearchListTiddler) return "";
	// "open all" button
	var title=config.macros.search.reportTitle;
	var body="";
	body+="@@diplay:block;<html><input type=\"button\" href=\"javascript:;\" "
		+"onclick=\"story.displayTiddlers(null,[";
	for(var t=0;t<matches.length;t++)
		body+="'"+matches[t].title.replace(/\'/mg,"\\'")+"'"+((t<matches.length-1)?", ":"");
	body+="],1);\" accesskey=\"O\" value=\"open all matching tiddlers\"></html> ";
	// "discard SearchResults" button
	body+="<html><input type=\"button\" href=\"javascript:;\" "
		+"onclick=\"discardSearchResults()\" value=\"discard "+title+"\"></html>";
	body+="@@\n";
	return body;
}

if (!window.discardSearchResults) window.discardSearchResults=function()
{
	// remove the tiddler
	story.closeTiddler(config.macros.search.reportTitle);
	store.deleteTiddler(config.macros.search.reportTitle);
	store.notify(config.macros.search.reportTitle,true);
}
//}}}
{{span{<<search "Isaac">> /%
%/<html><input type="button" value="search again" onclick="var t=this.parentNode.parentNode.getElementsByTagName('input')[0]; config.macros.search.doSearch(t); return false;"> <a href="javascript:;" onclick=" var e=this.parentNode.nextSibling; var show=e.style.display!='block'; if(!config.options.chkAnimate) e.style.display=show?'block':'none'; else anim.startAnimating(new Slider(e,show,false,'none')); return false;">options...</a></html>@@display:none;border-left:1px dotted;margin-left:1em;padding:0;padding-left:.5em;font-size:90%;/%
	%/<<option chkSearchTitles>>titles /%
	%/<<option chkSearchText>>text /%
	%/<<option chkSearchTags>>tags /%
	%/<<option chkSearchFields>>fields /%
	<<option chkCaseSensitiveSearch>>case-sensitive /%
	%/<<option chkRegExpSearch>>text patterns /%
	%/<<option chkSearchByDate>>sorted by date
	<<option chkSearchHighlight>> highlight matching text in displayed tiddlers
	<<option chkIncrementalSearch>>incremental key-by-key search: /%
	%/{{twochar{<<option txtIncrementalSearchMin>>}}} or more characters, /%
	%/{{threechar{<<option txtIncrementalSearchDelay>>}}} msec delay
%/@@}}}

''3 tiddlers found matching '{{{Isaac}}}'''
~~&nbsp; searched in titles + text + tags + fields~~
* {{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="if(config.options.chkSearchHighlight)	highlightHack=new RegExp('Isaac','img');story.displayTiddler(null,'contentFooter');highlightHack = null; return false;" title="contentFooter - Isaac Liu, Sat Jan 17 13:07:00 2009">contentFooter</a></html>}}}
* {{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="if(config.options.chkSearchHighlight)	highlightHack=new RegExp('Isaac','img');story.displayTiddler(null,'References');highlightHack = null; return false;" title="References - Hiren Patel, Sat Jan 17 04:48:00 2009">References</a></html>}}}
* {{tiddlyLinkExisting{<html><nowiki><a href="javascript:;" onclick="if(config.options.chkSearchHighlight)	highlightHack=new RegExp('Isaac','img');story.displayTiddler(null,'People');highlightHack = null; return false;" title="People - Hiren Patel, Sat Jan 17 05:01:00 2009">People</a></html>}}}
@@diplay:block;<html><input type="button" href="javascript:;" onclick="story.displayTiddlers(null,['contentFooter', 'References', 'People'],1);" accesskey="O" value="open all matching tiddlers"></html> <html><input type="button" href="javascript:;" onclick="discardSearchResults()" value="discard SearchResults"></html>@@
<<tiddler SideBarOptions>>
+++[index »]<<tiddler SideBarTabs>>===
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Documentation|http://www.TiddlyTools.com/#SinglePageModePluginInfo|
|Version|2.9.6|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.displayTiddler(), Story.prototype.displayTiddlers()|
|Options|##Configuration|
|Description|Show tiddlers one at a time with automatic permalink, or always open tiddlers at top/bottom of page.|
This plugin allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one tiddler displayed at a time.
!!!!!Documentation
>see [[SinglePageModePluginInfo]]
!!!!!Configuration
<<<
<<option chkSinglePageMode>> Display one tiddler at a time
><<option chkSinglePagePermalink>> Automatically permalink current tiddler
><<option chkSinglePageKeepFoldedTiddlers>> Don't close tiddlers that are folded
><<option chkSinglePageKeepEditedTiddlers>> Don't close tiddlers that are being edited
<<option chkTopOfPageMode>> Open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Open tiddlers at the bottom of the page
<<option chkSinglePageAutoScroll>> Automatically scroll tiddler into view (if needed)

Notes:
* The "display one tiddler at a time" option can also be //temporarily// set/reset by including a 'paramifier' in the document URL: {{{#SPM:true}}} or {{{#SPM:false}}}.
* If more than one display mode is selected, 'one at a time' display takes precedence over both 'top' and 'bottom' settings, and if 'one at a time' setting is not used, 'top of page' takes precedence over 'bottom of page'.
* When using Apple's Safari browser, automatically setting the permalink causes an error and is disabled.
<<<
!!!!!Revisions
<<<
2008.10.17 [2.9.6] changed chkSinglePageAutoScroll default to false
| Please see [[SinglePageModePluginInfo]] for previous revision details |
2005.08.15 [1.0.0] Initial Release.  Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts.
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageModePlugin= {major: 2, minor: 9, revision: 6, date: new Date(2008,10,17)};
//}}}
//{{{
config.paramifiers.SPM = { onstart: function(v) {
	config.options.chkSinglePageMode=eval(v);
	if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
		config.lastURL = window.location.hash;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
} };
//}}}
//{{{
if (config.options.chkSinglePageMode==undefined)
	config.options.chkSinglePageMode=false;
if (config.options.chkSinglePagePermalink==undefined)
	config.options.chkSinglePagePermalink=true;
if (config.options.chkSinglePageKeepFoldedTiddlers==undefined)
	config.options.chkSinglePageKeepFoldedTiddlers=false;
if (config.options.chkSinglePageKeepEditedTiddlers==undefined)
	config.options.chkSinglePageKeepEditedTiddlers=false;
if (config.options.chkTopOfPageMode==undefined)
	config.options.chkTopOfPageMode=false;
if (config.options.chkBottomOfPageMode==undefined)
	config.options.chkBottomOfPageMode=false;
if (config.options.chkSinglePageAutoScroll==undefined)
	config.options.chkSinglePageAutoScroll=false;
//}}}
//{{{
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
	if (!config.options.chkSinglePageMode)
		{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
	if (config.lastURL == window.location.hash) return; // no change in hash
	var tids=decodeURIComponent(window.location.hash.substr(1)).readBracketedList();
	if (tids.length==1) // permalink (single tiddler in URL)
		story.displayTiddler(null,tids[0]);
	else { // restore permaview or default view
		config.lastURL = window.location.hash;
		if (!tids.length) tids=store.getTiddlerText("DefaultTiddlers").readBracketedList();
		story.closeAllTiddlers();
		story.displayTiddlers(null,tids);
	}
}


if (Story.prototype.SPM_coreDisplayTiddler==undefined)
	Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,tiddler,template,animate,slowly)
{
	var title=(tiddler instanceof Tiddler)?tiddler.title:tiddler;
	var tiddlerElem=document.getElementById(story.idPrefix+title); // ==null unless tiddler is already displayed
	var opt=config.options;
	var single=opt.chkSinglePageMode && !startingUp;
	var top=opt.chkTopOfPageMode && !startingUp;
	var bottom=opt.chkBottomOfPageMode && !startingUp;
	if (single) {
		story.forEachTiddler(function(tid,elem) {
			// skip current tiddler and, optionally, tiddlers that are folded.
			if (	tid==title
				|| (opt.chkSinglePageKeepFoldedTiddlers && elem.getAttribute("folded")=="true"))
				return;
			// if a tiddler is being edited, ask before closing
			if (elem.getAttribute("dirty")=="true") {
				if (opt.chkSinglePageKeepEditedTiddlers) return;
				// if tiddler to be displayed is already shown, then leave active tiddler editor as is
				// (occurs when switching between view and edit modes)
				if (tiddlerElem) return;
				// otherwise, ask for permission
				var msg="'"+tid+"' is currently being edited.\n\n";
				msg+="Press OK to save and close this tiddler\nor press Cancel to leave it opened";
				if (!confirm(msg)) return; else story.saveTiddler(tid);
			}
			story.closeTiddler(tid);
		});
	}
	else if (top)
		arguments[0]=null;
	else if (bottom)
		arguments[0]="bottom";
	if (single && opt.chkSinglePagePermalink && !config.browser.isSafari) {
		window.location.hash = encodeURIComponent(String.encodeTiddlyLink(title));
		config.lastURL = window.location.hash;
		document.title = wikifyPlain("SiteTitle") + " - " + title;
		if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
	}
	if (tiddlerElem && tiddlerElem.getAttribute("dirty")=="true") { // editing... move tiddler without re-rendering
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		if (!isTopTiddler && (single || top))
			tiddlerElem.parentNode.insertBefore(tiddlerElem,tiddlerElem.parentNode.firstChild);
		else if (bottom)
			tiddlerElem.parentNode.insertBefore(tiddlerElem,null);
		else this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	} else
		this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
	var tiddlerElem=document.getElementById(story.idPrefix+title);
	if (tiddlerElem&&opt.chkSinglePageAutoScroll) {
		// scroll to top of page or top of tiddler
		var isTopTiddler=(tiddlerElem.previousSibling==null);
		var yPos=isTopTiddler?0:ensureVisible(tiddlerElem);
		// if animating, defer scroll until after animation completes
		var delay=opt.chkAnimate?config.animDuration+10:0;
		setTimeout("window.scrollTo(0,"+yPos+")",delay); 
	}
}

if (Story.prototype.SPM_coreDisplayTiddlers==undefined)
	Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function() {
	// suspend single/top/bottom modes when showing multiple tiddlers
	var opt=config.options;
	var saveSPM=opt.chkSinglePageMode; opt.chkSinglePageMode=false;
	var saveTPM=opt.chkTopOfPageMode; opt.chkTopOfPageMode=false;
	var saveBPM=opt.chkBottomOfPageMode; opt.chkBottomOfPageMode=false;
	this.SPM_coreDisplayTiddlers.apply(this,arguments);
	opt.chkBottomOfPageMode=saveBPM;
	opt.chkTopOfPageMode=saveTPM;
	opt.chkSinglePageMode=saveSPM;
}
//}}}
A Simulator for a Precision Timed (PRET) Architecture
"""PRET""" Simulator v1.0 Documentation
If you have access to the repository, you can check it out from SVN over ssh:
{{{
svn co svn+ssh://source.eecs.berkeley.edu/chess/pret/trunk/pret_iss
}}}
Even if you do not have SVN access, you can still check out the source anonymously with:
{{{
svn co svn://source.eecs.berkeley.edu/chess/pret/trunk/pret_iss
}}}
/*{{{*/
/*Mocha TiddlyWiki Theme*/
/*Version 1.0*/
/*Design and CSS originally by Anthonyy, ported to TiddlyWiki by Saq Imtiaz.*/
/*}}}*/
/*{{{*/

 #contentWrapper{
margin: 0 auto; border-right: 2px solid #999; border-left: 2px solid #999; 

			font-family: Lucida Grande, Tahoma, Arial, Helvetica, sans-serif; /* Lucida Grande for the Macs, Tahoma for the PCs */
font-size: 11px;
			line-height: 1.6em;
			color: #666;

width: 1000px;
}

.header {
 background: #fff; 
			clear: both;
width:100%;
border-bottom: 4px solid #948979;
}

.headerShadow {	padding: 2.6em 0em 1em 0em; }

.siteTitle {
			font-family: 'Trebuchet MS' sans-serif;
			font-weight: bold;
			font-size: 32px;
			color: #CC6633;
			margin-bottom: 30px;
			//background-color: #FFF;
                        margin-left: 10px;
}

.siteTitle a{color:#CC6633; border-bottom:1px dotted #cc6633;}

.siteSubtitle {
	font-size: 1.0em;
        display: block;
        margin: .5em 3em; color: #999999;
}

#mainMenu {
position:relative;
float:left;
margin-bottom:1em;
display:inline;
text-align:left;
padding: 15px 0.5em 0.5em 0em;
width:13em;
font-size:1em;
margin-left: 10px;
}

#sidebar{
position:relative;
float:right;
margin-bottom:1em;
padding-top:0px;
display:inline;
margin-right: 10px;

}

#displayArea {
	margin-top: 10px;
       width: auto;
}

.tagClear {clear:none;}

#contentFooter {background:#575352; color:#BFB6B3; clear: both; padding: 0.5em 1em;}

		
		#contentFooter a {
			color: #BFB6B3;
			border-bottom: 1px dotted #BFB6B3;
		}
		
		#contentFooter a:hover {
			color: #FFFFFF;
			background-color:#575352;
		}

		a,#sidebarOptions .sliderPanel a{
			color:#CC6714;
			text-decoration: none;
		}

		a:hover,#sidebarOptions .sliderPanel a:hover {
			color:#CC6714;
			background-color: #F5F5F5; 
		}

.viewer .button, .editorFooter .button{
	color: #666;
	border: 1px solid #CC6714;
}

.viewer .button:hover, 
.editorFooter .button:hover{
	color: #fff;
	background: #CC6714;
	border-color: #CC6714;
}

.viewer .button:active, .viewer .highlight,.editorFooter .button:active, .editorFooter .highlight{color:#fff; background:#575352;border-color:#575352;}


		#mainMenu a {
			display: block;
			padding: 5px;
			border-bottom: 1px solid #CCC;
		}

		#mainMenu a:link, #navlist a:visited {
			color:#CC6714;
			text-decoration: none;
		}
		
		#mainMenu a:hover {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}
		
		#mainMenu a:hover, #mainMenu a:active, #mainMenu .highlight, #mainMenu .marked {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}

#mainMenu span {position:relative;}

#mainMenu br {display:none;}

#sidebarOptions a {
			color:#999;
			text-decoration: none;
		}

#sidebarOptions	a:hover {
			color:#4F4B45;
			background-color: #F5F5F5;border:1px solid #fff;
		}

#sidebarOptions {line-height:1.4em;}

		.tiddler {
			padding-bottom: 20px;
			
                        
		}
.title {color:#CC6633; border-bottom:1px solid #ccc; padding-bottom:6px; font-size: 23px; font-variant: small-caps;}
.subtitle, .subtitle a { color: #999999; font-size: 1.0em;margin:0.2em;}
.shadow .title{color:#948979;}

.selected .toolbar a {color:#999999;}
.selected .toolbar a:hover {color:#4F4B45; background:transparent;border:1px solid #fff;}

.toolbar .button:hover, .toolbar .highlight, .toolbar .marked, .toolbar a.button:active{color:#4F4B45; background:transparent;border:1px solid #fff;}

 .listLink,#sidebarTabs .tabContents {line-height:1.5em;}
 .listTitle {color:#888;}

#sidebarTabs .tabContents {background:#fff;}
#sidebarTabs .tabContents .tiddlyLink, #sidebarTabs .tabContents .button{color:#999;}
#sidebarTabs .tabContents .tiddlyLink:hover,#sidebarTabs .tabContents .button:hover{color:#4F4B45;background:#fff}

#sidebarTabs .tabContents .button:hover, #sidebarTabs .tabContents .highlight, #sidebarTabs .tabContents .marked, #sidebarTabs .tabContents a.button:active{color:#4F4B45;background:#fff}

.tabSelected{color:#fff; background:#948979;}

.tabUnselected {
 background: #ccc;
}

 .tabSelected, .tabSelected:hover {
 color: #fff;
 background: #948979;
 border: solid 1px #948979;
padding-bottom:1px;
}

 .tabUnselected {
 color: #999;
 background: #eee;
 border: solid 1px #ccc;
padding-bottom:1px;
}

#sidebarTabs .tabUnselected { border-bottom: none;padding-bottom:3px;}
#sidebarTabs .tabSelected{padding-bottom:3px;}


#sidebarTabs .tabUnselected:hover { border-bottom: none;padding-bottom:3px;color:#4F4B45}

#sidebarOptions .sliderPanel {
	background: #fff; border:none;
	font-size: .9em;
}
#sidebarOptions .sliderPanel a {font-weight:normal;}
#sidebarOptions .sliderPanel input {border:1px solid #999;}

.viewer blockquote {
	border-left: 3px solid #948979;
}

.viewer table {
	border: 2px solid [[ColorPalette::TertiaryDark]];
}

.viewer th, thead td {
	background: #948979;
	border: 1px solid #948979;
	color: #fff;
}
.viewer pre {
	border: 1px solid #948979;
	background: #f5f5f5;
}

.viewer code {
	color: #2F2A29;
}

.viewer hr {
	border-top: dashed 1px #948979;
}

.editor input {
	border: 1px solid #948979;
}

.editor textarea {
	border: 1px solid #948979;
}

.popup {
	background: #948979;
	border: 1px solid #948979;
}

.popup li.disabled {
	color: #000;
}

.popup li a, .popup li a:visited {
	color: #eee;
	border: none;
}

.popup li a:hover {
	background: #575352;
	color: #fff;
	border: none;
}

.tagging, .tagged {
	border: 1px solid #eee;
	background-color: #F7F7F7;
}

.selected .tagging, .selected .tagged {
	background-color: #eee;
	border: 1px solid #BFBAB3;
}

 .tagging .listTitle, .tagged .listTitle {
	color: #bbb;
}

.selected .tagging .listTitle, .selected .tagged .listTitle {
	color: #666; 
}

.tagging .button, .tagged .button {
		color:#aaa;
}
.selected .tagging .button, .selected .tagged .button {
		color:#4F4B45;
}

.highlight, .marked {background:transparent; color:#111; border:none; text-decoration:underline;}

.tagging .button:hover, .tagged .button:hover, .tagging .button:active, .tagged .button:active {
		border: none; background:transparent; text-decoration:underline; color:#000;
}

h1,h2,h3,h4,h5 { color: #666; background: transparent; padding-bottom:2px; font-family: Arial, Helvetica, sans-serif; }
h1 {font-size:18px;}
h2 {font-size:16px;}
h3 {font-size: 14px;}

#messageArea {
	border: 4px solid #948979;
	background: #f5f5f5;
	color: #999;
        font-size:90%;
}

#messageArea a:hover { background:#f5f5f5;}

#messageArea .button{
	color: #666;
	border: 1px solid #CC6714;
}

#messageArea .button:hover {
	color: #fff;
	background: #948979;
	border-color: #948979;
}


* html .viewer pre {
	margin-left: 0em;
}

* html .editor textarea, * html .editor input {
	width: 98%;
}

.searchBar {float:right;font-size: 1.0em;}
.searchBar .button {color:#999;display:block;}
.searchBar .button:hover {border:1px solid #fff;color:#4F4B45;}

#siteNav .input {			
                        background-color: #FFF;
			color: #999999;
			border: 1px solid #CCC;		margin-right:10px;
}

#sidebarOptions .button:active, #sidebarOptions .highlight {background:#F5F5F5;}

*html #contentFooter { padding:0.25em 1em 0.5em 1em;}

#noticeBoard {font-size: 0.9em; color:#999; position:relative;display:block;background:#fff; clear: both; margin-right:0.5em; margin-top: 20px; padding:5px; border-bottom: 1px dotted #CCC; border-top: 1px dotted #CCC;}
#mainMenu #noticeBoard a,#mainMenu #noticeBoard .tiddlyLink {display:inline;border:none;padding:5px 2px;color:#DF9153 }
#noticeBoard a:hover {border:none;}	

#noticeBoard br {display:inline;}

#mainMenu #noticeBoard  .button{
	color: #666;
	border: 1px solid #DF9153;padding:2px;
}

#mainMenu #noticeBoard  .button:hover{
	color: #fff;
	background: #DF9153;
	border-color: #DF9153;
}

.searchbar {position:relative; width:11em;}
.searchbar .button{margin:0; width:11em;}
#header {display:inline-block;}
/*}}}*/
/*{{{*/
.downloadButton {font-size: 2em; border: 1px dotted; padding: 5px;}
#tiddlerInstallation .button{font-size: 1.3em; line-height: 2em;}
#tiddlerInstallation .toolbar a{font-size: 1em; margin-bottom: 0;}
.searchButton {display: block;}
#siteNav {font-size: .9em;}
#siteNav .button {color:#999; border: 0px solid #000;}
#siteNav a{padding-top: 5px;}
#siteNav .button:hover {border:0px solid #fff;color:#4F4B45;}
#siteNav input {			
                        background-color: #FFF;
			color: #999999;
			border: 1px solid #CCC;		margin-right:3px;
}

#sidebarMenu a {
			display: block;
			padding: 5px;
			border-bottom: 1px solid #CCC;
                        font-size:11px; font-weight: normal;
		}

		#sidebarMenu a:link, #navlist a:visited {
			color:#CC6714;
			text-decoration: none;
		}
		
		#sidebarMenu a:hover {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}
		
		#sidebarMenu a:hover, #sidebarMenu a:active, #sidebarMenu .highlight, #sidebarMenu .marked {
			background: #000000 url(arrow.gif) 96% 50% no-repeat;
			background-color: #F5F5F5;
			color:#CC6714;
		}
#sidebarMenu span {position:relative;}

#sidebarMenu br {display:none;}

#noticeBoard {font-size: 10px;}

#contentHeader {background:#575352; color:#BFB6B3; clear: both; padding: 0.25em 1em 0.5em 1em;}

		
		#contentHeader a {
			color: #BFB6B3;
			border-bottom: 1px dotted #BFB6B3;
		}
		
		#contentHeader a:hover {
			color: #FFFFFF;
			background-color:#575352;
		}
.searchBar input {			
                        background-color: #FFF;
			color: #999999;
			border: 1px solid #CCC;		margin-right:3px;
}

.siteSubtitle { color: #666; }
/*}}}*/
OSCI SystemC simulator available for download from [[SystemC Website|http://www.systemc.org.]]
* explain more about examples
|~ViewToolbar|+editTiddler permalink|
|~EditToolbar|+saveTiddler -cancelTiddler deleteTiddler|
* These instructions are for the ''bash'' shell.
* Download the version appropriate for your platform from [[SPARC ELF GCC 3.4.4|ftp://gaisler.com/gaisler.com/bcc/bin/]] (Windows and linux), or [[SPARC ELF GCC 3.4.4|http://chess.eecs.berkeley.edu/pret/src/sparc-elf-3.4.4.tar.bz2]] (Mac OSX or [[build from source|Building sparc toolchains for Mac users]])  and store it in a temporary path such as ''/tmp''.
* Untar the downloaded file to the directory you wish to install it.
{{{
$ cd <path-to-install-toolchain>
$ tar -jxvf /tmp/<name-of-downloaded-file>
}}}
* Add the path of the toolchain to the ''PATH'' environment variable.
{{{
$ export PATH=$PATH:<path-to-install-toolchain>/sparc-elf-3.4.4/bin/
}}}
* Check if the ''sparc-elf-gcc'' binary is in the path
{{{
$ sparc-elf-gcc --version
sparc-elf-gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
}}}
* The simulator binary is compiled in ''$PRET_ISS/src/''. The simulator must be executed with the following arguments:
** {{{<path-to-srec-folder>}}}: A folder location with the programs that are going to be loaded in the simulator. For every thread there is a ''.c'' file. We compile this into [[SREC files|http://en.wikipedia.org/wiki/SREC_(file_format)]]. Please look at one of the samples in ''$PRET_ISS/examples''. The ''Makefile''s can be reused from there. 
** {{{<# cycles>}}}: An integer value for the number of cycles the simulation must execute. To continue execution until the termination of a program use ''-1''.
* The usage is as follows:
{{{
$ ./src/pret <path-to-srec-folder> <# cycles>
}}}
<!--{{{-->
<div style='float: right;' class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
<div class='title' macro='view title'></div>
<div class='viewer' macro='view text wikified'></div>
<span macro="tiddler ReplaceDoubleClickPlugin with: alt click"></span>
<div class='tagClear'></div>
<!--}}}-->
[[Copyright © 2008 - 2009 UC Regents; all rights reserved.|Copyright]] 
University of California, Berkeley EECS Dept. & Columbia University CS Dept.
/*{{{*/
store.addNotification("StyleSheetCustom", refreshStyles);

// Backstage
merge(config.tasks,{
	settingsPage: {text: "settings", tooltip: "settings", content: '<<tiddler Settings>>'}
});
config.backstageTasks.push("settingsPage");


config.commands.editTiddler.readOnlyText = " ";
/*}}}*/

//{{{
//This ensures that the footer sticks to the bottom of the screen when there are no tiddlers open. If that is not desirable, it can be deleted.
function setFooter() {
         if (document.getElementById && document.getElementById("contentFooter") ) {
            var windowHeight=findWindowHeight();
         if (windowHeight>0) {
            var contentHeight= document.getElementById('mainMenu').offsetHeight + document.getElementById("header").offsetHeight + document.getElementById("contentFooter").offsetHeight;
            var menu= document.getElementById('mainMenu');
            if (windowHeight-(contentHeight)>=0) {
               menu.style.position='relative';
               menu.style.marginBottom=(windowHeight-(contentHeight))+'px';
               }
            else {
                 menu.style.position='';
                 menu.style.marginBottom='';
                 }
            }
         }
}
window.onresize = function() {
  setFooter();
}

Story.prototype.refreshTiddler_footerhack=Story.prototype.refreshTiddler;
Story.prototype.refreshTiddler = function (title,template,force)
{    
var theTiddler = Story.prototype.refreshTiddler_footerhack.apply(this,arguments);
setFooter();
   return theTiddler;}

//}}}
1. Go to the $PRET_ISS top directory.
{{{
$ cd $PRET_ISS
}}}
2. Compile the example.
* When the source is untarred from the tarball:
{{{
$ ./scripts/compile_threads.py examples/graphic/
}}}
* When the source is checked out from SVN:
{{{
$ ./scripts/compile_threads.py tests/tests/pret/dma/graphic/graphic/
}}}
3. Executing the example.
* When the source is untarred from the tarball:
{{{
$ ./src/pret examples/graphic 450000000
}}}
* When the source is checked out from SVN:
{{{
$ ./src/pret tests/tests/pret/dma/graphic/graphic/ 450000000
}}}
4. Sample output.
{{{
----------------------------------------------------
	PRET Configuration
----------------------------------------------------
Number of threads         : 6
Number of register windows: 128
Number of deadline timers : 8
Number of PLL timers      : 1

Clock setup

Memory hierarchy
Main memory delay          : 15
Instruction/Data scratchpads
----------------------------------------------------

----------------------------------------------------
         Start Simulation
----------------------------------------------------
VGA emul mode

vga initial refresh

vga refreshed

vga refreshed

vga refreshed

start dump

end dump

vga refreshed

vga refreshed

vga refreshed

vga refreshed

----------------------------------------------------

----------------------------------------------------
         Simulation Statistics
----------------------------------------------------
Cycles executed : 450000000

thread[0], , # cycles: 89999994
thread[0], # instructions: 14999999
thread[1], , # cycles: 89999994
thread[1], # instructions: 14999999
thread[2], , # cycles: 89999994
thread[2], # instructions: 14388455
thread[3], , # cycles: 89999994
thread[3], # instructions: 789474
thread[4], , # cycles: 89999994
thread[4], # instructions: 789474
thread[5], , # cycles: 89999994
thread[5], # instructions: 789473
}}}
5. Output file is stored in a dump out_fd.dmp. Rename to pbm file.
{{{
$ mv out_fd.dmp out_fd.pbm.
}}}
{{{
6. Use a PBM viewer to open the file.
}}}
1. Go to the $PRET_ISS top directory.
{{{
$ cd $PRET_ISS
}}}
2. Compile the example.
* When the source is untarred from the tarball:
{{{
$ ./scripts/compile_threads.py examples/janne/
}}}
* When the source is checked out from SVN:
{{{
$ ./scripts/compile_threads.py tests/tests/pret/dma/janne/
}}}
3. Executing the example.
* When the source is untarred from the tarball:
{{{
$ ./src/pret examples/janne -1
}}}
* When the source is checked out from SVN:
{{{
$ ./src/pret tests/tests/pret/dma/janne/
}}}
4. Sample output
{{{
----------------------------------------------------
	PRET Configuration
----------------------------------------------------

Number of threads         : 6
Number of register windows: 128
Number of deadline timers : 8
Number of PLL timers      : 1

Clock setup

Memory hierarchy
Main memory delay          : 15
Instruction/Data scratchpads
----------------------------------------------------

----------------------------------------------------
         Start Simulation
----------------------------------------------------
(a,b) = (3,-9)
(a,b) = (14,11)
(a,b) = (17,23)
(a,b) = (19,13)
(a,b) = (22,29)
(a,b) = (24,19)
(a,b) = (27,47)
(a,b) = (29,37)
(a,b) = (31,27)
----------------------------------------------------
----------------------------------------------------
         Simulation Statistics
----------------------------------------------------
Cycles executed : -1

thread[0], , # cycles: 114024
thread[0], # instructions: 19004
thread[1], , # cycles: 114024
thread[1], # instructions: 1001
thread[2], , # cycles: 114018
thread[2], # instructions: 1000
thread[3], , # cycles: 114018
thread[3], # instructions: 1000
thread[4], , # cycles: 114018
thread[4], # instructions: 1000
thread[5], , # cycles: 114018
thread[5], # instructions: 1000
}}}
1. Go to the $PRET_ISS top directory.
{{{
$ cd $PRET_ISS
}}}
2. Compile the example.
* When the source is untarred from the tarball:
{{{
$ ./scripts/compile_threads.py examples/smile/
}}}
* When the source is checked out from SVN:
{{{
$ ./scripts/compile_threads.py tests/tests/pret/sys/smile/smile/
}}}
3. Executing the example.
* When the source is untarred from the tarball:
{{{
$ ./src/pret examples/smile/ 60000000
}}}
* When the source is checked out from SVN:
{{{
$ ./src/pret tests/tests/pret/sys/smile/smile/ 60000000
}}}
4. Sample output.
{{{
----------------------------------------------------
        PRET Configuration
----------------------------------------------------

Number of threads         : 6
Number of register windows: 128
Number of deadline timers : 8
Number of PLL timers      : 1

Clock setup

Memory hierarchy
Main memory delay          : 15
Instruction/Data scratchpads
----------------------------------------------------
         Start Simulation
----------------------------------------------------
   ooooo
  /     \
 |  o o  |
(|   |   |)
 |  ___  |
  \ \_/ /
   \___/
   ooooo
  /     \
 |  o o  |
(|   |   |)
 |  ___  |
  \ \_/ /
   \___/
   ooooo
  /     \
 |  o o  |
(|   |   |)
 |  ___  |
  \ \_/ /
   \___/
   ooooo
  /     \
 |  ^ ^  |
(|   |   |)
 |  ___  |
  \ \_/ /
   \___/
----------------------------------------------------

----------------------------------------------------
         Simulation Statistics
----------------------------------------------------
Cycles executed : 60000000

thread[0], , # cycles: 11999994
thread[0], # instructions: 3012
thread[1], , # cycles: 11999994
thread[1], # instructions: 3016
thread[2], , # cycles: 11999994
thread[2], # instructions: 3053
thread[3], , # cycles: 11999994
thread[3], # instructions: 3016
thread[4], , # cycles: 11999994
thread[4], # instructions: 5173
thread[5], , # cycles: 11999994
thread[5], # instructions: 5148
}}}
1. Go to the $PRET_ISS top directory.
{{{
$ cd $PRET_ISS
}}}
2. Compile the example.
* When the source is untarred from the tarball:
{{{
$ ./scripts/compile_threads.py examples/sync_example_cases/
}}}
* When the source is checked out from SVN:
{{{
$ ./scripts/compile_threads.py tests/tests/pret/dma/sync_example_cases/
}}}
3. Executing the example.
* When the source is untarred from the tarball:
{{{
$ ./src/pret examples/sync_example_cases/ -1
}}}
* When the source is checked out from SVN:
{{{
$ ./src/pret tests/tests/pret/dma/sync_example_cases/ -1
}}}
4. Sample output.
{{{
----------------------------------------------------
	PRET Configuration
----------------------------------------------------

Number of threads         : 6
Number of register windows: 128
Number of deadline timers : 8
Number of PLL timers      : 1

Clock setup

Memory hierarchy
Main memory delay          : 15
Instruction/Data scratchpads
----------------------------------------------------

----------------------------------------------------
         Start Simulation
----------------------------------------------------
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}\
~
 
----------------------------------------------------

----------------------------------------------------
         Simulation Statistics
----------------------------------------------------
Cycles executed : -1

thread[0], , # cycles: 21600
thread[0], # instructions: 480
thread[1], , # cycles: 21600
thread[1], # instructions: 954
thread[2], , # cycles: 21600
thread[2], # instructions: 676
thread[3], , # cycles: 21600
thread[3], # instructions: 190
thread[4], , # cycles: 21594
thread[4], # instructions: 189
thread[5], , # cycles: 21594
thread[5], # instructions: 189
}}}