当前位置:网站首页>This usage, SystemVerilog syntax
This usage, SystemVerilog syntax
2022-07-24 10:25:00 【Cored】
`timescale 1ns/1ps
// Define variable name
logic [3:0] DIV_CLKA;
...
logci [3:0] DIV_CLKD;
// Defining classes
class pll_params;
rand bit[3:0] refclk_div;
...
rand bit[5:0] div_clk_6bit;
// Defining variables
int ref_clk;
function set_refclk(int ref_clk); //ref_clk Call parameters
this.ref_clk = ref_clk;
endfunction
function new(int seed);
this.srandom(seed);
endfunction
constraint c{
if(this.ref_clk>200){
div_clk_6bit ==6`b0;
}
else{
...
}
}
endclass
In the class function、task、constraint Use in class The variables inside , You need to precede the variable with this. marked . Be careful : use this, Whether it has the same name with parameters and variables , It doesn't matter.
边栏推荐
- 多表查询之子查询_单行单列情况
- Set up mail server with dynamic ip+mdaemon
- zoj-Swordfish-2022-5-6
- Homologous policy solutions
- Scan line, weight segment tree
- Configuration description and componentization development steps of various documents in the scaffold
- js函数调用下载文件链接
- CMS vulnerability recurrence - ultra vires vulnerability
- cannot unpack non-iterable NoneType object
- NIO知识点
猜你喜欢

Can the "self-help master" who has survived the economic crisis twice continue to laugh this time?

CRC Coding in C language
![[STM32 learning] (14) two 74HC595 controls four nixie tube displays](/img/22/c83e29bead8e6298a0a3564419022c.png)
[STM32 learning] (14) two 74HC595 controls four nixie tube displays

OSPF含特殊区域实验,MGRE构建和重发布

The heads of the five major international institutions called for urgent action to deal with the global food security crisis
![[STM32 learning] (15) STM32 realizes DHT11 temperature and humidity acquisition and display](/img/f2/6fcd4b2e747b4ceb52a52eda0c1af4.png)
[STM32 learning] (15) STM32 realizes DHT11 temperature and humidity acquisition and display

Golang migrate is easy to use

分布式锁-Redission 原理分析

Uniapp calendar component

差分约束系统---1且2--2022年5月27日
随机推荐
图像处理:浮点数转定点数
NIO知识点
[STM32 learning] (5) press the key to control the flow light (interrupt Implementation)
Segment tree--
Adobe Substance 3D Designer 2021软件安装包下载及安装教程
Basic SQL operations
[STM32 learning] (11) STM32 Mifare_ Use of one (S50) m1s50 (read, write, key modification, control bit interpretation)
Ask you to build a small program server
ffmpeg花屏解决(修改源码,丢弃不完整帧)
[STM32 learning] (16) STM32 realizes LCD1602 display (74HC595 drive) - 4-bit bus
Erlang learning 01
Wechat applet
Set up mail server with dynamic ip+mdaemon
分布式锁-Redission 原理分析
【剑指 Offer II 115. 重建序列】
Mysql database JDBC programming
Mina framework introduction "suggestions collection"
The best time to buy and sell stocks Ⅲ (leetcode-123)
Record AP and map calculation examples
Add a love power logo to your website