Skip to content

Instantly share code, notes, and snippets.

View robstewart57's full-sized avatar

Rob Stewart robstewart57

View GitHub Profile
@robstewart57
robstewart57 / image_sender.cal
Last active August 29, 2015 13:57
Example CAL image sending actor
actor image_sender() String ACK_IN ==> int(size=9) IMAGE_OUT :
List(type: int(size=9), size=9) image = [
123, 222, 242,
109, 13, 1,
209, 224, 96
];
bool sent := false;
@robstewart57
robstewart57 / image_receiver.cal
Last active August 29, 2015 13:57
Example CAL image receiving actor
actor image_receiver() int(size=9) IMAGE_IN ==> String ACK_OUT :
procedure showImage (List(type:int(size=9),size=9) img)
begin
println(img[0] + img[1] + img[2] + "\n" +
img[3] + img[4] + img[5] + "\n" +
img[6] + img[7] + img[8]
);
end
@robstewart57
robstewart57 / java.el
Created April 9, 2014 20:02
elisp generated from BNFC fork for deriving prog-mode from language grammar rules
;; define several class of keywords
(setq mylsl-keywords (quote (".*" "{" "}" "class" "extends" "implements" "interface" ";" "throws" "(" ")" ":" "=" "," "else" "finally" "while" "." "instanceof" "?" "||" "&&" "|" "^" "&" "==" "!=" "<" ">" "<=" ">=" "<<" ">>" ">>>" "+" "-" "*" "/" "%" "++" "--" "[" "]" ".this" ".class")))
(setq mylsl-types (quote (";" "abstract" "final" "public" "protected" "private" "transient" "volatile" "native" "synchronized" "static" "char" "short" "int" "long" "float" "double" "byte" "boolean" "[]" "super" "this" "null" "true" "false" "+" "-" "~" "!" "=" "*=" "/=" "%=" "+=" "-=" "<<=" ">>=" ">>>=" "&=" "^=" "|=")))
(setq mylsl-functions (quote ("package" "import" "final" "{" "case" "default" "if" "switch" "else if" "break" "continue" "return" "throw" "synchronized" "try" "catch" "while" "do" "for" "(" "++" "--" "new" "[")))
;; create the regex string for each class of keywords
(setq mylsl-keywords-regexp (regexp-opt mylsl-keywords (quote words)))
(setq mylsl-types-regexp (regexp-opt my
$ cabal install
Resolving dependencies...
In order, the following would be installed:
hashtables-1.1.2.1 (reinstall) changes: hashable-1.1.2.5 -> 1.2.1.0
unordered-containers-0.2.4.0 (reinstall) changes: hashable-1.1.2.5 -> 1.2.1.0
accelerate-0.14.0.0 (reinstall) changes: hashable-1.1.2.5 -> 1.2.1.0
accelerate-io-0.14.0.0 (reinstall)
$
$ cabal install hashtables-1.1.2.1 unordered-containers-0.2.4.0 accelerate-0.14.0.0 accelerate-io-0.14.0.0
Resolving dependencies...
@robstewart57
robstewart57 / ttanetgen.log
Created July 22, 2014 18:13
Output of ttanetgen targetting Zedboard xc7z020
./libs/ttanetgen -c .
*********************************************************************
* Compile the application for the TTA processors network
*********************************************************************
>> Compile code of processor_decoder_parser_parseheaders.
>> Compile code of processor_decoder_parser_mvseq.
>> Compile code of processor_decoder_texture_idct2d.
>> Compile code of processor_decoder_texture_IAP.
>> Compile code of processor_decoder_motion_interpolation.
@robstewart57
robstewart57 / gist:6a96f8302cd4c5f48beb
Created July 22, 2014 18:16
Output of ttanetgen targetting Virtex6 xc6vlx240t
>> ./libs/ttanetgen -c .
*********************************************************************
* Compile the application for the TTA processors network
*********************************************************************
>> Compile code of processor_decoder_parser_parseheaders.
>> Compile code of processor_decoder_parser_mvseq.
>> Compile code of processor_decoder_texture_IAP.
>> Compile code of processor_decoder_texture_DCsplit.
>> Compile code of processor_decoder_motion_interpolation.
>> Compile code of processor_decoder_texture_idct2d.
@robstewart57
robstewart57 / coregen.log
Created July 22, 2014 18:43
corgen.log of ttanetgen targetting Virtex6 xc6vlx240t
INFO:encore:314 - Created non-GUI application for batch mode execution.
INFO:sim:172 - Generating IP...
Resolving generics for 'dram_2p_smem_37'...
Applying external generics to 'dram_2p_smem_37'...
Delivering associated files for 'dram_2p_smem_37'...
Delivering EJava files for 'dram_2p_smem_37'...
Generating implementation netlist for 'dram_2p_smem_37'...
INFO:sim - Pre-processing HDL files for 'dram_2p_smem_37'...
Running synthesis for 'dram_2p_smem_37'
Running ngcbuild...
@robstewart57
robstewart57 / xmonad.hs
Last active August 29, 2015 14:13
My xmonad configuration
import XMonad
import XMonad.Hooks.SetWMName
import XMonad.Actions.SpawnOn
{- workspace 1: a terminal
workspace 2: emacs
workspace 3: web browser -}
main :: IO ()
main = xmonad defaultConfig
{ modMask = mod4Mask
/* C code */
int add(int x, int y)
{
return (x+y);
}
int main()
{
return (add (2,3) );
}
int a[10];
for (int i; i<100000; i++) {
a[i] = i * 4;
}
int b[10];
for (int i; i<100000; i++) {
b[i] = a[i] + 3;
}