From 8299c2ecae1701fa6060185a8aed25543e201eba Mon Sep 17 00:00:00 2001 From: azidar Date: Thu, 19 Feb 2015 10:13:51 -0800 Subject: Re-implemented resolve-kinds, passes preliminary test. Updated notes and TODO list, and started basic stanza-cheatsheet. --- notes/notes.02.17.15.txt | 8 -------- notes/stanza-cheatsheet.txt | 48 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 notes/stanza-cheatsheet.txt (limited to 'notes') diff --git a/notes/notes.02.17.15.txt b/notes/notes.02.17.15.txt index 133565fd..1a04d607 100644 --- a/notes/notes.02.17.15.txt +++ b/notes/notes.02.17.15.txt @@ -1,6 +1,5 @@ February 17, 2015. - Functions (defn) have (1) a static type signature and (2) an implementation You can define them seperately type signature -> defmulti @@ -12,19 +11,12 @@ However, you cannot have: defn a(x:Int) -> Int because it is unclear which to call (2 matching static type signatures) -TODO Implement resolve-kinds TODO Read initialization spec TODO Read through make-explicit-reset TODO If you feel up for it, rewrite make-explicit-reset TODO If you feel up for it, read through initialize-registers -TODO Look into testing framework TODO Make stanza a git repo -Write Makefile Write installation instructions for stanza -Add P-Money as admin to github/firrtl (CuppoJava) - -TOTHINK Need 2 different prints, one with IR-internal information, and another that matches correct FIRRTL -Add input file argument... diff --git a/notes/stanza-cheatsheet.txt b/notes/stanza-cheatsheet.txt new file mode 100644 index 00000000..d8f5c070 --- /dev/null +++ b/notes/stanza-cheatsheet.txt @@ -0,0 +1,48 @@ +Functions (defn) have (1) a static type signature and (2) an implementation +You can define them seperately + type signature -> defmulti + implementation -> defmethod + +Thus, you can have multiple defmethods per defmulti. +However, you cannot have: + defmulti a(x:?) -> ? + defn a(x:Int) -> Int +because it is unclear which to call (2 matching static type signatures) + +; [a b c] <- a tuple +; +; val rest = List(1,2,3) +; val b = List(0,rest) --> (0,1,2,3) +; val c = list(0,rest) --> (0,(1,2,3)) + +; label myret : +; for i in 0 to 10 do : +; if i == 5: +; myret(i) +; 0 + +; val v = Vector() +; add(v,10) +; add(v,20) +; add(v,32) +; for x in v do : +; println(x) + + +1. explain curly braces in + print{o, _} $ + match(k) : + (k:RegKind) : "reg:" + My guess is you are passing in a different function depending on the type of k, so you need to lazily evaluate the print, which signifies the {}'s. +2. explain where in + Circuit(modules*, main(c)) where : + val modules* = + for m in modules(c) map : + Module(name(m), ports(m), to-command(body(m))) + My guess is you are again evaluating modules* before Circuit, so you are passing in modules lazily? +3. difference between defn and defmethod? + +a typeof T +a and b +a or b +a as T -- cgit v1.2.3