From e44f6b083b903493e886ef94b9b8edf8ce9b456f Mon Sep 17 00:00:00 2001 From: Yehowshua Immanuel Date: Wed, 20 Mar 2024 02:25:31 -0400 Subject: [PATCH] it's been a while --- .DS_Store | Bin 0 -> 8196 bytes .gitignore | 17 +++++++++++++++++ Makefile | 4 ++-- README.md | 18 ++++++++++++++++-- experiments/.DS_Store | Bin 0 -> 6148 bytes experiments/bram/.DS_Store | Bin 0 -> 6148 bytes .../bram}/Testbench.bsv | 0 {bram_tests => experiments/bram}/bram2.txt | 0 experiments/bram/sim_inspect.tcl | 14 ++++++++++++++ shell.nix | 14 ++++++++++++++ sim_inspect.tcl | 15 +++++++++++++++ 11 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 .DS_Store create mode 100644 experiments/.DS_Store create mode 100644 experiments/bram/.DS_Store rename {bram_tests => experiments/bram}/Testbench.bsv (100%) rename {bram_tests => experiments/bram}/bram2.txt (100%) create mode 100644 experiments/bram/sim_inspect.tcl create mode 100644 shell.nix create mode 100644 sim_inspect.tcl diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..72a088143423ac2578fb9196b119603dcd100a6d GIT binary patch literal 8196 zcmZQzU|@7AO)+F(kYHe7;9!8z0^AH(0Z1N%F(jFwBB~(s7#IW?a?%Zhlk;;6pyH#{ zXb6mkz-S1JhQMeDjE2DA3js!mlQ?kH`w-btax?@+LtsRP0H}OWfVAxy9H4Xqga%15 zFfuTJy8w&~3@oq!Vg&UAAZkEbL25u+K{QA!10#q9mIrHPV1#OA1b0Ii7#JA@z(z4L zfVDF)f^7zggS9g-f^BACV1#IAV1(Mt2<@RTLbNk5LbNk5f^7#IIZBL%z-S1dg#f7U z&cdL_kj{|FP=eZj{~FBz%Ggl3+19EKEzc!n|*S1}fV(gZsLiV9@6?PU;sW0(q!Z!}d17vffh;!Y-TEy2x@%22^j zz>vyN#E{95%aF>D$56shjN&dxfZ|Yz?7k_VSL|`S3U(h()d+VIR*m9bh%1;GiW!O+ zl2P3!&&j~R0F^;@k6p-ZMbAXAd*HGN`!Quv?MndJ2-Sxci(Cw)3^@!H48{z_4Dk$U z3H4`nGxEacz2|I@&pCO$go*{@Kguw^Z zH}w$=3=B9_BKzm~W)WEC!>JnKBf_dt{KRMgiJDQ8&LO}Iu}=cj|953zz%~94Q8h}A zhQMeD49gH;WN`_0ae_9|u=xi@0Z1N%F(jFwB5WY@KxQPB7Z)VuvOFzkfN zjZ%X<1VC}e!jQyJ#E{64iyVJR1v#0;B?bo97@3$^SlQS)*g3d4VuLgC%Y#c2OG=BK z5{sfiypa6-oFo`KF)1uFwLD%x#5q5&Br!8DwFsmnI5Q* zMn(wDzzd~eR1X6K1KdM7>4w3{`MCvPN%r{>$a1;)E-ui-%8~FV%RD6as3WR;3SRkw z3?#ET0zg*4?JWx~%FD^mONV3(kklw14S~@R7!85J6avs9l!JRPIcn4`qaiRF0)rw1 zK;?r1v zh<30Yqr_+kjD`Rr1ehUA0Z{$#%D{lD{|`|$N{)uWXb23;5MX3+33hP;Rhl@w2dZm9 z^=SfB9#s2-s$)h_J&h0pSH(<_0YwR@FsQl*X$8^Xs+f@hQj?E11YjXFN{@yB{X+l% Do&;t- literal 0 HcmV?d00001 diff --git a/experiments/bram/.DS_Store b/experiments/bram/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmZQzU|@7AO)+F(5MW?n;9!8z45|!R0Z1N%F(jFgL>QrFAPJ2!M?+vV1V%$(Gz3ON zU^D~25V%SxcdJP zRior+2#kinunYl47MEZbCs3t{!+W4QHvuXKVuPw;Mo^s$(F3lEVT}ML$bg~*R5_@+ b2Uo?6kTwK}57Iu`5P${HC_Nei0}uiLNUI8I literal 0 HcmV?d00001 diff --git a/bram_tests/Testbench.bsv b/experiments/bram/Testbench.bsv similarity index 100% rename from bram_tests/Testbench.bsv rename to experiments/bram/Testbench.bsv diff --git a/bram_tests/bram2.txt b/experiments/bram/bram2.txt similarity index 100% rename from bram_tests/bram2.txt rename to experiments/bram/bram2.txt diff --git a/experiments/bram/sim_inspect.tcl b/experiments/bram/sim_inspect.tcl new file mode 100644 index 0000000..e691f96 --- /dev/null +++ b/experiments/bram/sim_inspect.tcl @@ -0,0 +1,14 @@ +# bluetcl sim_inspect.tcl +namespace import ::Bluetcl::* +package require Bluesim + +sim load simBRAM.so mkTestbench +set count_hdl [sim lookup count] +set bram [sim lookup dut1_memory] + +sim step +sim step +sim step + +puts "Value of count: [sim get $count_hdl]" +puts "Value of bram\[0:3\]: [sim getrange $bram 0 3]" diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..328453b --- /dev/null +++ b/shell.nix @@ -0,0 +1,14 @@ +{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d34a98666913267786d9ab4aa803a1fc75f81f4d.tar.gz") {} }: + +pkgs.mkShell { + buildInputs = [ + pkgs.yosys + pkgs.nextpnr + pkgs.bluespec + pkgs.yosys-bluespec + ]; + + shellHook = '' + echo "Dev environment for Manna Chip." + ''; +} \ No newline at end of file diff --git a/sim_inspect.tcl b/sim_inspect.tcl new file mode 100644 index 0000000..a4e560f --- /dev/null +++ b/sim_inspect.tcl @@ -0,0 +1,15 @@ +# bluetcl sim_inspect.tcl +namespace import ::Bluetcl::* +package require Bluesim + +cd bram_tests +sim load simBRAM.so mkTestbench +set count_hdl [sim lookup count] +set bram [sim lookup dut1_memory] + +sim step +sim step +sim step + +puts "Value of count: [sim get $count_hdl]" +puts "Value of bram\[0:3\]: [sim getrange $bram 0 3]" \ No newline at end of file