当前位置:网站首页>利用verilogA模块采样
利用verilogA模块采样
2022-06-29 00:11:00 【Riching5】
利用verilogA模块采样
转自http://rt2innocence.net/integrated-circuit/sampling-data-using-verilog-a/comment-page-1/#comment-407652
在 Cadence ADE 中有很多方法可以实现数据的采样,例如在 tran 分析中设置 strobe period 或是利用 calculator 中的 函数实现 re-sample。这里介绍一下利用 verilog-A model 来实现的数据采样,这种方法的一个优点是可以直接将采样数据保存到文件(而不用像前两种方法需要用再利用 calculator print 到文件)以方便后续分析。
具体的 Verilog-A 实现如下,主要是利用的 Verilog-A 中的文件相关命令 fopen,fstrobe 和 fclose。注意最后保存的文件 data_save.txt 是在仿真路径下面的 netlist 目录下而不是 psf 目录下。
// VerilogA for Model_HL, data_sample, verilogainclude “constants.vams" include “disciplines.vams”
module data_sample(clk,in,out);
input clk, in;
output out;
electrical clk, in, out;
parameter real vth=1.5;
integer out_file;
real sig_out;
analog begin
@(initial_step) begin
out_file=$fopen(“date_save.txt”);
end
@(cross(V(clk)-vth, 1)) begin
sig_out=V(in);
$fstrobe(out_file, “%f”, sig_out);
end
@(final_step) begin
$fclose(out_file);
end
V(out) <+ sig_out;
end
endmodule
边栏推荐
- 12. Détection d'objets Mask rcnn
- With notes: insert sort --from WCC
- 炒股开户万一免五是靠谱么,安全么
- stm32F407-------串行(串口)通信
- How to guarantee the delivery quality through the cloud effect test plan
- 【C Primer Plus第二章課後編程題】
- Typescript-- section 4: Functions
- 三個pwn題
- Notes: three ways to define setters and Getters
- 毕业三年的25岁码农总结
猜你喜欢

【LeetCode】21. 合并两个有序链表 - Go 语言题解

Stm32f407 ------- IO pin multiplexing mapping

What are some tips to improve your interview success rate?

每日一题:消失的数字

转载:VTK笔记-裁剪分割-不规则闭合圈选裁剪-vtkSelectPolyData类(黑山老妖)
How does the JVM bottom layer implement synchronized

Software testing tools: complete and precise

MSYQL is abnormal. Don't worry. Mr. Allen will point out the puzzle

Stm32f407----- register address name mapping analysis

Daily question 1: missing numbers
随机推荐
stm32F407-------通用定时器
mysql 高可用双主同步
How to guarantee the delivery quality through the cloud effect test plan
What are some tips to improve your interview success rate?
【LeetCode】21. Merge two ordered linked lists - go language solution
TypeScript --第三节:接口
每日一练:删除有序数组中的重复项
TypeScript--第五节:类
MapReduce案例
请问指南针股票软件可靠吗?在上面交易股票安全吗?
Daily question 1: the number of numbers in the array 2
stm32F407-------寄存器地址名称映射分析
Basic operation of MySQL database: import hellodb SQL and query as required; Create account and authorize
力扣(LeetCode)178. 分数排名(2022.06.27)
Give you a project, how will you carry out performance testing (I)
Easy to use free ppt template
[machine learning] numerical analysis 02 -- finding roots of arbitrary equations
stm32F407-------外部中断
Software testing tools: complete and precise
Zoom with mouse wheel