hdlbits-Zero

Zero

Build a circuit with no inputs and one output that outputs a constant 0

Now that you've worked through the previous problem, let's see if you can do a simple problem without the hints.

HDLBits uses Verilog-2001 ANSI-style port declaration syntax because it's easier to read and reduces typos. You may use the older Verilog-1995 syntax if you wish. For example, the two module declarations below are acceptable and equivalent:

1
2
3
4
5
module top_module ( zero );
output zero;
// Verilog-1995
endmodule

1
2
3
4
5
module top_module ( output zero ); 

// Verilog-2001
endmodule

Hint

Fun fact: For Quartus synthesis, not assigning a value to a signal usually results in 0. This problem is actually easier than the previous one.

solution

1
2
3
4
5
6
7
module top_module(
output zero
);// Module body starts after semicolon
assign zero = 0; //写1'b0更好
endmodule



hdlbits-Zero
http://456-xiao.github.io/2024/08/03/hdlbits-Zero/
作者
xyh
发布于
2024年8月3日
许可协议