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

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

1.9.1.3. altera_pr_wrapper_mux_out Module

altera_pr_wrapper_mux_out模块使您能够将所有PR persona的输出多路复用到PR region wrapper的输出。
每个输出端口例化一个多路复用器。使用多路复用器的sel端口指定活动角色。pr_activate端口使您能够驱动多路复用器输出到“x”,在PR操作期间仿真PR区域输出的未知值。对组件进行参数化,指定角色输入的数量,多路复用器宽度和MUX输出值(当pr_activate置位时)。
module altera_pr_wrapper_mux_out #(
   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 [NUM_PERSONA-1:0],
   output reg [WIDTH-1:0]   mux_out,
   input wire               pr_activate
);
 
   always_comb begin
      if ((sel < NUM_PERSONA) && (!pr_activate))
         mux_out = mux_in[sel];
      else
         mux_out = {WIDTH{DISABLED_OUTPUT_VAL}};
   end
 
endmodule : altera_pr_wrapper_mux_out
<QUARTUS_INSTALL_DIR> /eda/sim_lib/altera_lnsim.sv文件定义altera_pr_wrapper_mux_out组件。