examples/gw5a/ides4.v
raw| 1 | `default_nettype none |
| 2 | module top(input wire clk, |
| 3 | input wire rst_i, |
| 4 | input wire fclk_i, |
| 5 | input wire data_i, |
| 6 | output wire pclk_o, |
| 7 | output wire [7:0]mled); |
| 8 | |
| 9 | wire rst = rst_i ^ `INV_BTN; |
| 10 | IDES4 ides( |
| 11 | .D(data_i), |
| 12 | .FCLK(fclk_i), |
| 13 | .PCLK(pclk_o), |
| 14 | .CALIB(1'b0), |
| 15 | .RESET(!rst), |
| 16 | .Q0(mled[0]), |
| 17 | .Q1(mled[1]), |
| 18 | .Q2(mled[2]), |
| 19 | .Q3(mled[3]) |
| 20 | ); |
| 21 | |
| 22 | |
| 23 | reg pclk_r; |
| 24 | always @(posedge fclk_i) begin |
| 25 | pclk_r <= !pclk_r; |
| 26 | end |
| 27 | assign pclk_o = pclk_r; |
| 28 | |
| 29 | endmodule |