Skip to content

Proper use of RS232 module #479

Answered by quark17
podhrmic asked this question in Q&A
May 17, 2022 · 2 comments · 4 replies
Discussion options

You must be logged in to vote

An interface (or subinterface) of an instantiated submodule can be directly assigned as the interface of the parent module. For example, this line:

  interface rs232 = uart.rs232;

in the following (abridged) example:

interface FPGA_Top_Ifc;
   (* prefix = "" *)
   interface RS232 rs232;
   (* prefix="PCIE" *)
   interface PCIE_EXP#(8) pcie;
   (* always_ready *)
   method Bit#(8) leds();
endinterface

(* synthesize, no_default_clock, no_default_reset *)
module fpga_top #(Clock sys_clk_p, Clock sys_clk_n,
               Clock pci_sys_clk_p, Clock pci_sys_clk_n,
               Reset pci_sys_reset_n)
              (FPGA_Top_Ifc);

  Clock sys_clk <- mkClockIBUFDS(..., sys_clk_p, sys_clk_n);…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by podhrmic
Comment options

You must be logged in to vote
4 replies
@podhrmic
Comment options

@rsnikhil
Comment options

@quark17
Comment options

@podhrmic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants