Skip to content

Instantly share code, notes, and snippets.

View dvtalk's full-sized avatar
🎯
Focusing

dvtalk dvtalk

🎯
Focusing
View GitHub Profile
@dvtalk
dvtalk / sv_var_default_notes.md
Last active September 22, 2022 08:38
Systemverilog primitive data type notes

SV-IEEE 2017 Chapter 6

  • Default initial value:
Type
4-state integral 'X
2-state integral '0
real, shortreal 0.0
Enumeration Base type default initial value
@dvtalk
dvtalk / sv_stream_operator_example_tb.sv
Last active June 10, 2022 07:24
SystemVerilog stream operator example
// https://dvtalk.me
// systemverilog stream operator example:
// stream_op_pack():
// queue to var
// var to queue
// bit re-ordering
// stream_op_unpack():
// var to 3 different var
// stream_op_complex():
// converse 8-bit queue to 32-bit queue
Assuming you have followed all the steps to install / setup WSL2 -> https://docs.microsoft.com/en-us/windows/wsl/install-win10
**Tested on Ubuntu 20.04**
Step 1 - Find out default gateway and DNS servers
- Navigate to `Control Panel\Network and Internet\Network Connections`
- Right click on relevant connection type WiFi or Ethernet and select `Status`
- Status screen will be displayed, click on `Details` button
- Network Connection details screen will be displayed
- Note down `IPv4 default gateway` and `IPv4 DNS Servers` if available
@dvtalk
dvtalk / vimsend.sh
Last active January 24, 2021 14:19
Use when inside vim terminal, sh script to send file from vim terminal to open in current vim.
#!/bin/sh
pathdir="$( pwd )"
if [ -e ./$1 ]; then
pathdir="${pathdir}/${1}"
elif [ -e $1 ]; then
pathdir=$1
else
pathdir="${pathdir}/${1}"
fi
@dvtalk
dvtalk / vimsend.zsh
Last active August 15, 2020 04:38
Use when inside vim terminal, zsh function to send file from vim terminal to open in current vim.
function vimsend() {
local path=""
if [ -e ./$1 ]; then
path="$PWD/${1}"
echo "$path"
elif [ -e $1 ]; then
path=$1
echo "$path"
else
echo "Oops, file not found yo!! $1"
@JJunShim
JJunShim / profiles.json
Last active April 11, 2023 22:58
Windows Terminal settings json color schemes
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"profiles":
[
{
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
module top();
// Function with Static Lifetime
// By default lifetime of function/task is Static in Verilog/SV
function void print_s();
int a;
a = a + 1;
$write("%0d ", a);
endfunction : print_s
// Function with Automatic Lifetime