Intel® Quartus® Prime Pro Edition用户指南: 部分重配置

ID 683834
日期 5/11/2020
Public
文档目录

1.9.1.4. altera_pr_wrapper_mux_in Module

altera_pr_wrapper_mux_in模块使您能够对所有PR角色的PRpartition wrapper的输入进行解复用。
每个输入端口例化一个多路复用器。使用多路复用器的sel端口指定活动角色。对组件进行参数化,指定角色输出的数量,多路复用器宽度和任何禁用输出的MUX输出。当使用altera_pr_wrapper_mux_in多路复用一个时钟输入时,使用值为0的DISABLED_OUTPUT_VAL,要确保没有禁用角色的仿真时钟事件。
module altera_pr_wrapper_mux_in#(
   parameter NUM_PERSONA = 1,
   parameter WIDTH = 1,
   parameter [0:0] DISABLED_OUTPUT_VAL = 1'bx
) (
    
   input int sel,
   input wire [WIDTH-1:0] mux_in,
   output reg [WIDTH-1 : 0] mux_out [NUM_PERSONA-1:0]
);
   always_comb begin
      for (int i = 0; i < NUM_PERSONA; i++)
         if (i == sel)
            mux_out[i] = mux_in;
         else
            mux_out[i] = {WIDTH{DISABLED_OUTPUT_VAL}};
   end
 
    
endmodule : altera_pr_wrapper_mux_in
<QUARTUS_INSTALL_DIR> /eda/sim_lib/altera_lnsim.sv文件定义altera_pr_wrapper_mux_in组件。