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++) |
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<iostream> | |
using namespace std; | |
//大小为4 | |
class A | |
{ | |
public: | |
int a; | |
}; |
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 <iostream> | |
using std::cout; | |
using std::endl; | |
class A { | |
public: | |
A(int x): mem_(x){} | |
A& operator=(const A& other) { | |
cout << "copy assignment operator" << endl; | |
mem_ = other.mem_; |
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
class Singleton{ | |
private: | |
Singleton(); | |
Singleton(const Singleton& other); | |
public: | |
static Singleton* getInstance(); | |
static Singleton* m_instance; | |
}; | |
Singleton::Singleton() {} |