随笔分类 -  20-Verilog

摘要:1.计数器的优秀编程思路 always@(posedge clk or negedge rst_n)begin if(rst_n == 1'b0) cnt <= MAX; else(cnt == MAX && flage == 1'b1) cnt <= cnt + 1'b1; else cnt <= 阅读全文
posted @ 2022-04-11 19:53 刘小颜 阅读(115) 评论(0) 推荐(0)
摘要:一、Getting Started 1.1 Step one module top_module( output one ); assign one = 1; endmodule 1.2 Zero module top_module(zero); output zero; assign zero = 阅读全文
posted @ 2022-04-10 10:56 刘小颜 阅读(708) 评论(0) 推荐(1)
摘要:符号: { } { } 有两个用途:复制、拼接 举例: 拼接 { 第1位,第2位...}:两个或多个信号拼接起来,表示一个整体的信号 //在移位寄存器中常使用下面语句实现:右移1位的操作 store <= {0, store[7:1]}; 复制 { 3 { a } }={a,a,a} //等同于 { 阅读全文
posted @ 2022-04-10 10:28 刘小颜 阅读(299) 评论(0) 推荐(0)