examples/mipi-out.v
raw| 1 | module top ( |
| 2 | input clk, |
| 3 | input key_i, |
| 4 | input rst_i, |
| 5 | output [`LEDS_NR-1:0] led, |
| 6 | output [1:0] mipi_out |
| 7 | ); |
| 8 | |
| 9 | wire key = key_i ^ `INV_BTN; |
| 10 | wire reset = rst_i ^ `INV_BTN; |
| 11 | |
| 12 | reg [25:0] ctr_q; |
| 13 | wire [25:0] ctr_d; |
| 14 | |
| 15 | always @(posedge clk) begin |
| 16 | ctr_q <= ctr_d; |
| 17 | end |
| 18 | |
| 19 | assign ctr_d = ctr_q + 1'b1; |
| 20 | |
| 21 | MIPI_OBUF mipio( |
| 22 | .I(ctr_d[25]), |
| 23 | .IB(ctr_d[24]), |
| 24 | .O(mipi_out[0]), |
| 25 | .OB(mipi_out[1]), |
| 26 | .MODESEL(key) |
| 27 | ); |
| 28 | |
| 29 | endmodule |