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
vlib work | |
vlog -f filelist tb1.sv | |
# "-c": command line mode | |
vsim -voptargs=+acc -c -do "run 100ns; exit" work.tb1_ref |
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
# gtk3 in Rocky Linux 8.5 | |
./configure --with-features=huge --enable-gui=gtk3 --enable-python3interp --prefix=/usr | |
make -j`nproc` | |
sudo make install |
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
import uvm_pkg :: *; | |
class my_seq_item extends uvm_sequence_item; | |
rand logic [7:0] addr; | |
rand logic [7:0] data; | |
constraint addr_range_cn { | |
addr inside {[10:20]}; | |
} | |
constraint data_range_cn { |
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
# uvm 1.1 customized | |
export VCS_UVM_HOME="path/to/uvm-1.1d/src" | |
vcs -full64 -debug_access+all -kdb -sverilog -ntb_opts uvm -timescale=1ns/1ps -f filelist.f | |
./simv -gui=verdi |
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
initial begin | |
$fsdbDumpfile("seq_1011.fsdb"); | |
$fsdbDumpvars(0); | |
end |
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
cmake_minimum_required(VERSION 3.10) | |
# set the project name | |
project(useGlog) | |
find_package(gflags REQUIRED) | |
find_package(glog REQUIRED) | |
INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIR}) |
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
cmake_minimum_required(VERSION 3.16) | |
set(CMAKE_CXX_STANDARD 11) | |
project(gtestTest) | |
find_package(Threads REQUIRED) | |
find_package(GTest REQUIRED) | |
include_directories(${GTEST_INCLUDE_DIRS}) | |
add_executable(hello_test hello_test.cc) |
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
#!/bin/sh | |
tree -if | grep 'cdslck' > txt | |
var=`cat txt` | |
for i in $var; do | |
rm -i $i | |
done | |
rm -i txt |
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
function [ENOB, SNDR, SFDR, SNR] = prettyFFT(wave,f_S,maxh,no_annotation,no_plot,baseline); | |
% Programmed by: Skyler Weaver, Ph.D. | |
% Date: December 7, 2010 | |
% Version: 1.0 | |
% | |
% This function plots a very pretty FFT plot and annotates all of the | |
% relevant data. This is intended to be used by Nyquist guys and expects | |
% coherently sampled data. Maybe in the future I will modify it to | |
% automatically detect windowed data for Delta-Sigma or allow two input | |
% tones. As for now, it is just for single sine-wave test, coherent data. |
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
// image convolution (3x3 conv) | |
int WIDTH = 1024; | |
int HEIGHT = 1024; | |
float input[(WIDTH + 2) * (HEIGHT + 2)]; | |
float output[WIDTH * HEIGHT]; | |
float weights[] = {1.0 / 9, 1.0 / 9, 1.0 / 9, | |
1.0 / 9, 1.0 / 9, 1.0 / 9, | |
1.0 / 9, 1.0 / 9, 1.0 / 9}; | |
for (int j = 0; j < HEIGHT; j++) |