当前位置:网站首页>Verilog size and +: Using
Verilog size and +: Using
2022-06-29 09:01:00 【Da Xi】
module test;
reg [7:0] vect_1;
reg [0:7] vect_2;
initial
begin
vect_1 = 'b0001_1010;
vect_2 = 'b0010_0010;
$display("vect_1[3] = %b, vect_2[3] = %b", vect_1[3], vect_2[3]);
$display("vect_1[7:0] = %b, vect_2[0:7] = %b", vect_1, vect_2);
$display("vect_1[4+:3] = %b, vect_1[4-:3] = %b", vect_1[4+:3], vect_1[4-:3]);
$display("vect_2[4+:3] = %b, vect_2[4-:3] = %b", vect_2[4+:3], vect_2[4-:3]);
// vect_1[3] = 1, vect_2[3] = 0
// vect_1[7:0] = 00011010, vect_2[0:7] = 00100010
// vect_1[4+:3] = 001, vect_1[4-:3] = 110
// vect_2[4+:3] = 001, vect_2[4-:3] = 100
$stop;
end
endmodule

边栏推荐
猜你喜欢

CDGA|交通行业做好数字化转型的核心是什么?

51单片机中断与定时器计数器,基于普中科技HC6800-ESV2.0

Unity C# 网络学习(十二)——Protobuf生成协议

Let you know today that the passing rate of the PMP Exam is 97%, is it believable

mysql insert 时出现Deadlock死锁场景分析

Does the SQL server run with administrator privileges? Or run it as a normal user?

2022年7月(软考高级)信息系统项目管理师认证招生简章
![[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)](/img/6d/4d8d90dd221de697f4c2ab5dcc7f96.png)
[most complete] download and installation of various versions of PS and tutorial of small test ox knife (Photoshop CS3 ~ ~ Photoshop 2022)

对比HomeKit、米家,智汀家庭云版有哪些场景化的体验

ThreadLocal thread variable
随机推荐
MySQL row column conversion example
首次触电,原来你是这样的龙蜥社区 | 龙蜥开发者说第8期
一般乘法器设计,verilog code
Self attention mechanism
mongoDB 持久化
Verilog 表达式
verilog 归约操作符
晋升或汇报,你真的把事情讲清楚了吗?
Operating system product key viewing method
MYSQL行转列例子
[microservices openfeign] timeout of openfeign
Unity C# 网络学习(十二)——Protobuf生成协议
First electric shock, so you are such a dragon lizard community | dragon lizard developer said that issue 8
Did you really make things clear when you were promoted or reported?
(pytorch进阶之路三)encoder self attention mask
Let you know today that the passing rate of the PMP Exam is 97%, is it believable
Cdga | what is the core of digital transformation in the transportation industry?
Some behaviors of Apple developers that are prone to investigation
2022年7月(软考高级)信息系统项目管理师认证招生简章
Summary of various series (harmonic, geometric)