当前位置:网站首页>利用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
边栏推荐
- stm32F407-------串行(串口)通信
- oracle 去掉html标签
- 6.28 学习内容
- 【LeetCode】21. Merge two ordered linked lists - go language solution
- 随笔记:重新认识 else if
- Online yaml to JSON tool
- [200 opencv routines] 101 adaptive median filter
- 12.物體檢測Mask-Rcnn
- Daily question 1: missing numbers
- Daily question 1: the number of numbers in the array
猜你喜欢

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

Trois questions PWN

Haskell 配置 VS code 开发环境 (2022年6月)

Along with the notes: methods simulating array like classes

Yyds dry goods inventory building knowledge map from scratch with neo4j (I)

剑指 Offer 12. 矩阵中的路径

Stm32f407------- general timer

TypeScript--第四节:函数

What are some tips to improve your interview success rate?

stm32F407-------电容触摸按键
随机推荐
Common mistakes in software testing
ES6 module
With notes: re understanding else if
scp拷贝文件夹
Edge extraction based on Halcon learning [2] circles Hdev routine
《英语语法新思维 基础版2》读书笔记(一)
Leetcode 178 Score ranking (June 27, 2022)
With notes: insert sort --from WCC
Daily question 1: the number of numbers in the array 2
10、YOLO系列
Chrome浏览器的基本使用
Easy to use free ppt template
TypeScript--第五节:类
Give you a project, how will you carry out performance testing (I)
Mysql的四种引擎介绍
Typescript -- Section 1: basic types
Stm32f407----- register address name mapping analysis
Stm32f407 ------ clock system (systeminit clock initialization, systick tick timer)
TypeScript--第四节:函数
[C Primer Plus Chapter II after class programming questions]