summaryrefslogtreecommitdiffstats
path: root/part_3/ex15/add_offset.v
blob: 02882fb4979dc4e7805ceca26170c4609a8eb9e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module add_offset(keys, tick, address);

	input [9:0] keys;
	input tick;
	output [9:0] address;
	
	reg [9:0] address;
	
	initial address = 10'b0;

	always @ (posedge tick)
		address = keys + address;

endmodule