You now instantiate the IP customization
into the design by copying and pasting the Verilog Instantiation Template into the
appropriate Verilog source file in your project. Then, you modify the signals.
- In the IP Sources tab of the Sources window, click the Instantiation Template to expand it and double-click the char_fifo.veo file to open the template in the AMD Vivado™ Text Editor.
- Scroll to line 57 of the template file, and select and copy the module
instantiation text.
Paste the instantiation template into the appropriate RTL source file. In this case, paste the module into the top-level of the design, in the wave_gen.v source file.
- Open this file for editing from the Hierarchy tab of the Sources view, by
double-clicking wave_gen.v. The following
figure shows the file.
- You go to line 337, where a comment states that the Character FIFO must be instanced at this point.
- Paste the template code into the file as shown in the following figure.
Because it is only a template for the module, you need to do some local editing to make the module work in your design.
- In line 338 (approximately) above where you pasted the
instantiation, change the module name from
your_instance_nametochar_fifo_i0. - Change the wire names as follows, to connect the ports of the module into
the design:
char_fifo char_fifo_i0 ( .rst(rst_i), // input wire rst .wr_clk(clk_rx), // input wire wr_clk .rd_clk(clk_tx), // input wire rd_clk .din(char_fifo_din), // input wire [7 : 0] din .wr_en(char_fifo_wr_en), // input wire wr_en .rd_en(char_fifo_rd_en), // input wire rd_en .dout(char_fifo_dout), // output wire [7 : 0] dout .full(char_fifo_full), // output wire full .empty(char_fifo_empty), // output wire empty .wr_rst_busy(wr_rst_busy), // output wire wr_rst_busy .rd_rst_busy(rd_rst_busy) // output wire rd_rst_busy );
- In line 338 (approximately) above where you pasted the
instantiation, change the module name from
- In the Text Editor menu, click the Save
File button (
) to save the changes to the wave_gen.v file.
The Hierarchy, Libraries, and Compile Order tabs update to indicate that the IP is instanced into the design.