- Backup any critical data.
- Launch an administrative PowerShell session.
- Change directory like
cd "C:\Users\andrew\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState"
- Run
optimize-vhd -Path ext4.vhdx -Mode full
- Wait a few minutes for the process to complete.
- Relaunch WSL.
This file contains 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
`include "fulladder.sv" | |
module fulladder_chain #(parameter WIDTH)(input carry_in, [WIDTH-1:0] a, [WIDTH-1:0] b, output carry_out, [WIDTH-1:0] sum); | |
const int sizes[] = {WIDTH-2, 0}; | |
const int CARRY_WIDTH = sizes.max; | |
wire [CARRY_WIDTH:0] carries; |
This file contains 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
$ make | |
------------------------------------------------------------ | |
making verilator in src | |
make -C src | |
make[1]: Entering directory '/home/ubuntu/go/src/github.com/verilator/verilator/src' | |
mkdir -p obj_dbg | |
make -C obj_dbg -j 1 TGT=../../bin/verilator_bin_dbg VL_DEBUG=1 -f ../Makefile_obj serial | |
make[2]: Entering directory '/home/ubuntu/go/src/github.com/verilator/verilator/src/obj_dbg' |
This file contains 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 half_adder( | |
input clk, | |
a, | |
b, | |
output reg [0:0] sum, | |
carry | |
); | |
always @(posedge clk) | |
begin | |
sum <= a ^ b; |
This file contains 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 half_adder( | |
input clk, | |
a, | |
b, | |
output reg sum, | |
carry | |
); | |
always @(posedge clk) | |
begin | |
sum <= a ^ b; |
This file contains 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
$ conan install -s compiler.cppstd=17 -s compiler=clang -s compiler.version=7.0 --build missing . | |
Configuration: | |
[settings] | |
arch=armv7 | |
arch_build=armv7 | |
build_type=Release | |
compiler=clang | |
compiler.cppstd=17 |
- Install Chocolatey.
- Launch a PowerShell terminal in administrator mode.
- Install
visualstudio2019community
. - Install the Visual Studio 2019 native C++ Desktop workload with the optional MSVC and clang components included:
PS C:\> choco install --force visualstudio2019-workload-nativedesktop --package-parameters "--includeOptional"
- Run
brew install llvm --HEAD
. - Update certain shell variables:
# Prefer newer LLVM with fuzzing enabled
# shellcheck source=/dev/null
export CC='clang'
export CXX='clang++'
export LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib"
PATH="$(brew --prefix)/opt/llvm/bin:$PATH"
This file contains 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
$ cat src/zag/main.zig | |
const std = @import("std"); | |
pub fn main() !void { | |
const stdout = std.io.getStdOut().writer(); | |
// | |
// The OK triples from: | |
// https://github.com/ziglang/zig-bootstrap#supported-triples | |
// |