File: i3c.v

package info (click to toggle)
apycula 0.31%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 26,576 kB
  • sloc: python: 16,977; asm: 1,815; makefile: 510; sh: 72; tcl: 56; vhdl: 26
file content (29 lines) | stat: -rw-r--r-- 478 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
*  Nothing meaningful is tested here other than compilation - a real I3C
*  system requires either a large state machine or an intricate connection to
*  the processor.
*/
module top (
	input clk,
	input key_i,
	input rst_i,
	output [`LEDS_NR-1:0] led,
	inout i3c
);

	wire rst = rst_i ^ `INV_BTN;
	wire key = key_i ^ `INV_BTN;

	reg dat;
	always @(posedge clk) begin
		dat <= ~dat; 
	end

	I3C_IOBUF inst(
		.IO(i3c),
		.O(led[0]),
		.I(dat),
		.MODESEL(key)
	);

endmodule