More Related Content
Viewers also liked (20)
PPTX
Verilog Tutorial - Verilog HDL Tutorial with ExamplesE2MATRIX
PDF
Verilog codes and testbench codes for basic digital electronic circuits. shobhan pujari
PDF
Experiment write-vhdl-code-for-realize-all-logic-gatesRicardo Castro
PDF
Presentatie Happy Customers - Event Durf te weten! - Kom in beweging!Etienne Jager
Recently uploaded (9)
PPTX
2025_7_25_吉祥寺_設計ナイト_ADR運用におけるデータ利活用の考え方.pptxssuserfcafd1
たぶんできる!Verilog hdl
- 2. Syntax
1 module adder(a, b, y);
2 input [7:0] a, b;
3 output [7:0] y;
4
5 assign y = a + b;
6
7 endmodule adder
a
b
8
8
8
y
2
- 4. 16bit Counter
7 reg [15:0] creg; //16bit register
8 always @(posedge clk) begin
9 if(rst == 1’b0)
10 creg <= 0;
11 else
12 creg <= creg + 1;
13 end
14 assign out = creg;
15 endmodule
4