Tree at https://github.com/dramforever/kagome/tree/rollup-not-working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sizeof(int) = 4 | |
| RAND_MAX = 2147483647 | |
| NUM = 536870911 | |
| BLOCK_LEN = 2097152 | |
| block = 4.859 s | |
| naive = 6.024 s | |
| 1 - (block / naive) = 0.193 | |
| block = 4.637 s | |
| naive = 5.826 s | |
| 1 - (block / naive) = 0.204 |
dram.like || (wip && interesting)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Parser where | |
| newtype Parser a = P { parse :: String -> [(a, String)] } | |
| instance Functor Parser where | |
| fmap g p = P (\inp -> case parse p inp of | |
| [] -> [] | |
| [(v, out)] -> [(g v, out)]) | |
| instance Applicative Parser where |
This is a link to something, which is cleaner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ltac detect := | |
| match goal with | |
| | [ |- context G [ forall x : ?T, _ (* ?E *) ] ] => | |
| idtac G T; fail | |
| end. | |
| Theorem test : (forall x, x = 1) = (forall x, x = 2). | |
| Proof. | |
| try detect. | |
| (* As shown above: _ matches inside binders expectedly |
This is a description of the mirroring script at tuna/tunasync-scripts#49 (and other related things)
Links:
- NixOS/nixpkgs#32659 (Asking about how to create a mirror)
- tuna/issues#323 (TUNA mirror request)
- tuna/tunasync-scripts#49 (PR with script to TUNA mirror)
- ustclug/mirrorrequest#165 (USTC mirror request)
- ustclug/ustcmirror-images#57 (PR with script to USTC mirror)
- http://www.shlug.org/discuss/2020/01/11/nixos_mirror.html (Discussion by @yuchangyuan, in Chinese)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Hs8b.Register where | |
| import Clash.Prelude | |
| type Reg = Unsigned 4 | |
| type Value = Unsigned 8 | |
| {-# ANN registerFileMono Synthesize | |
| { t_name = "register_file" | |
| , t_inputs = PortName <$> words "clk rst write read" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AccModule extends Module { | |
| val io = IO(new Bundle{ | |
| val in = Input(UInt(32.W)) | |
| val out = Output(UInt(32.W)) | |
| }) | |
| val reg = RegInit(0.U(32.W)) | |
| reg := reg + io.in | |
| io.out := reg | |
| } |