摘要: 1 CC?=gcc 2 CFLAGS?=-O2 -g -Wall 3 LDLIBS+= -lpthread -lm -lsdrplay_api 4 5 all: play_sdr 6 7 %.o: %.c 8 $(CC) $(CFLAGS) -c $< 9 10 play_sdr: play_sdr 阅读全文
posted @ 2021-10-24 22:38 BH5HSV 阅读(414) 评论(0) 推荐(0) 编辑
摘要: # OpenOCD MicroZus interface ftdi ftdi_vid_pid 0x0403 0x6014 ftdi_layout_init 0x2088 0x3f8b transport select jtag reset_config srst_only srst_push_pul 阅读全文
posted @ 2021-08-14 21:43 BH5HSV 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1 #include "verilated_vcd_c.h" 2 #include "Vtop.h" 3 4 vluint64_t main_time = 0; 5 6 double sc_time_stamp() 7 { 8 return main_time; 9 } 10 11 int main 阅读全文
posted @ 2021-07-11 23:49 BH5HSV 阅读(2119) 评论(0) 推荐(1) 编辑
摘要: 1 #include <iostream> 2 #include <sstream> 3 #include "systemc.h" 4 5 #define WIDTH 8 6 #define VEC_NUM 4 7 #define VEC_WIDTH 4 8 9 SC_MODULE(vector_m 阅读全文
posted @ 2021-04-11 13:57 BH5HSV 阅读(455) 评论(0) 推荐(1) 编辑
摘要: 首先安装构建环境(我用的系统是LinuxMint): 安装scala: sudo apt install scala; chisel是scala语言编写的库,而scala语言编译出来的字节码运行于JVM;所以会一并安装java运行时环境。 安装sbt: sudo apt install sbt; 安 阅读全文
posted @ 2021-01-24 12:13 BH5HSV 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include "platform.h" 3 #include "xil_types.h" 4 #include "xscugic.h" 5 #include "xscutimer.h" 6 #include "xscuwdt.h" 7 #includ 阅读全文
posted @ 2021-01-02 23:31 BH5HSV 阅读(185) 评论(0) 推荐(0) 编辑
摘要: SystemVerilog测试代码: 1 `timescale 1ns / 1ns 2 module dpi_test; 3 4 real a; 5 real s; 6 string str; 7 8 import "DPI-C" function real c_sin(real x); 9 10 阅读全文
posted @ 2020-08-21 22:01 BH5HSV 阅读(1140) 评论(0) 推荐(0) 编辑
摘要: %% Parameters Tm=5;% Length of signal (s) Fd=512;% Sampling frequency (Hz) Ak=0.5;% Constant component (Unit) A1=1;% The amplitude of the first sinuso 阅读全文
posted @ 2020-08-02 17:45 BH5HSV 阅读(570) 评论(0) 推荐(0) 编辑
摘要: % Root Mean Square Value function [retval] = rms1(sig) N = 20; for k = 1 : length(sig)/N - 1 sig_sum = sum(sig((k-1)*N+1 : k*N)); squ_sum = sum(sig((k-1)*N+1 : k*N).^2); retval(k) = sqrt(squ_sum/N); e 阅读全文
posted @ 2019-12-22 13:34 BH5HSV 阅读(985) 评论(0) 推荐(0) 编辑
摘要: 1 # 2 # Vivado Non-Project Flow 3 # 4 set DESIGN [lindex $argv 0] 5 6 # 7 config_webtalk -user off 8 9 # 10 create_project -in_memory 11 12 # 13 proc 阅读全文
posted @ 2019-12-15 17:21 BH5HSV 阅读(582) 评论(0) 推荐(0) 编辑