How to wire two modules in Verilog?

前端 未结 3 880
借酒劲吻你
借酒劲吻你 2020-12-12 00:17

I have written two modules DLatch and RSLatch and i want to write verilog code to join those two.

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-12 00:53

    You will need to create an outer module, with the ports as shown in your schematic (D, Clk, Q, NQ). Inside this module you instantiate the two submodules DLatch and RSLatch, and wire the ports appropriately. (You will need to declare extra wires for the internal interconnects.)

提交回复
热议问题